File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
src/Authentication/Traits Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 15
15
*/
16
16
trait HasAccessTokens
17
17
{
18
+ /**
19
+ * The current access token for the user.
20
+ */
21
+ private ?AccessToken $ currentAccessToken = null ;
22
+
18
23
/**
19
24
* Generates a new personal access token for this user.
20
25
*/
@@ -142,7 +147,7 @@ public function tokenCant(string $scope): bool
142
147
*/
143
148
public function currentAccessToken ()
144
149
{
145
- return $ this ->attributes [ ' activeAccessToken ' ] ?? null ;
150
+ return $ this ->currentAccessToken ;
146
151
}
147
152
148
153
/**
@@ -154,7 +159,7 @@ public function currentAccessToken()
154
159
*/
155
160
public function setAccessToken (?AccessToken $ accessToken )
156
161
{
157
- $ this ->attributes [ ' activeAccessToken ' ] = $ accessToken ;
162
+ $ this ->currentAccessToken = $ accessToken ;
158
163
159
164
return $ this ;
160
165
}
You can’t perform that action at this time.
0 commit comments