AccessTokenAuthenticator
class AccessTokenAuthenticator implements OAuthAuthenticator
Methods
__construct(string $accessToken, string|null $refreshToken = null, CarbonInterface|null $expiresAt = null)
Create an access token authenticator.
void
bool
hasExpired()
Check if the access token has expired.
bool
hasNotExpired()
Check if the access token has not expired.
string
getAccessToken()
Get the access token.
string|null
getRefreshToken()
Get the refresh token.
CarbonInterface|null
getExpiresAt()
Get the expiry.
bool
isRefreshable()
Determine if the authenticator is refreshable.
bool
isNotRefreshable()
Determine if the authenticator is not refreshable.
Details
at line 18
__construct(string $accessToken, string|null $refreshToken = null, CarbonInterface|null $expiresAt = null)
Create an access token authenticator.
at line 30
void
set(PendingRequest $pendingRequest)
Apply the authentication to the request.
at line 38
bool
hasExpired()
Check if the access token has expired.
at line 46
bool
hasNotExpired()
Check if the access token has not expired.
at line 54
string
getAccessToken()
Get the access token.
at line 62
string|null
getRefreshToken()
Get the refresh token.
at line 70
CarbonInterface|null
getExpiresAt()
Get the expiry.
at line 78
bool
isRefreshable()
Determine if the authenticator is refreshable.
at line 86
bool
isNotRefreshable()
Determine if the authenticator is not refreshable.