20
20
class FluentAccessToken extends FluentAdapter implements AccessTokenInterface
21
21
{
22
22
/**
23
- * Get an instance of Entities\AccessToken
24
- * @param string $token The access token
25
- * @return null|AbstractTokenEntity
26
- */
23
+ * {@inheritdoc}
24
+ */
27
25
public function get ($ token )
28
26
{
29
27
$ result = $ this ->getConnection ()->table ('oauth_access_tokens ' )
@@ -40,11 +38,9 @@ public function get($token)
40
38
}
41
39
42
40
/**
43
- * Get the scopes for an access token
44
- * @param \League\OAuth2\Server\Entity\AbstractTokenEntity $token The access token
45
- * @return array Array of \League\OAuth2\Server\Entity\ScopeEntity
46
- */
47
- public function getScopes (AbstractTokenEntity $ token )
41
+ * {@inheritdoc}
42
+ */
43
+ public function getScopes (AccessTokenEntity $ token )
48
44
{
49
45
$ result = $ this ->getConnection ()->table ('oauth_access_token_scopes ' )
50
46
->select ('oauth_scopes.* ' )
@@ -65,12 +61,8 @@ public function getScopes(AbstractTokenEntity $token)
65
61
}
66
62
67
63
/**
68
- * Creates a new access token
69
- * @param string $token The access token
70
- * @param integer $expireTime The expire time expressed as a unix timestamp
71
- * @param string|integer $sessionId The session ID
72
- * @return \League\OAuth2\Server\Entity\AccessTokenEntity
73
- */
64
+ * {@inheritdoc}
65
+ */
74
66
public function create ($ token , $ expireTime , $ sessionId )
75
67
{
76
68
$ this ->getConnection ()->table ('oauth_access_tokens ' )->insert ([
@@ -87,12 +79,9 @@ public function create($token, $expireTime, $sessionId)
87
79
}
88
80
89
81
/**
90
- * Associate a scope with an access token
91
- * @param \League\OAuth2\Server\Entity\AbstractTokenEntity $token The access token
92
- * @param \League\OAuth2\Server\Entity\ScopeEntity $scope The scope
93
- * @return void
94
- */
95
- public function associateScope (AbstractTokenEntity $ token , ScopeEntity $ scope )
82
+ * {@inheritdoc}
83
+ */
84
+ public function associateScope (AccessTokenEntity $ token , ScopeEntity $ scope )
96
85
{
97
86
$ this ->getConnection ()->table ('oauth_access_token_scopes ' )->insert ([
98
87
'access_token_id ' => $ token ->getId (),
@@ -103,11 +92,9 @@ public function associateScope(AbstractTokenEntity $token, ScopeEntity $scope)
103
92
}
104
93
105
94
/**
106
- * Delete an access token
107
- * @param \League\OAuth2\Server\Entity\AbstractTokenEntity $token The access token to delete
108
- * @return void
109
- */
110
- public function delete (AbstractTokenEntity $ token )
95
+ * {@inheritdoc}
96
+ */
97
+ public function delete (AccessTokenEntity $ token )
111
98
{
112
99
$ this ->getConnection ()->table ('oauth_access_tokens ' )
113
100
->where ('oauth_access_tokens.id ' , $ token ->getId ())
0 commit comments