trait CreatesOAuthAuthenticator

Methods

createOAuthAuthenticatorFromResponse(Response $response, string|null $fallbackRefreshToken = null)

Create an OAuth authenticator from a token response.

createOAuthAuthenticator(string $accessToken, string|null $refreshToken = null, CarbonInterface|null $expiresAt = null)

Create an OAuth authenticator.

CarbonInterface|null
resolveOAuthExpiry(mixed $expiresIn)

Resolve an OAuth token expiry.

Details

at line 25
protected OAuthAuthenticator createOAuthAuthenticatorFromResponse(Response $response, string|null $fallbackRefreshToken = null)

Create an OAuth authenticator from a token response.

Parameters

Response $response
string|null $fallbackRefreshToken

Return Value

OAuthAuthenticator

at line 54
protected OAuthAuthenticator createOAuthAuthenticator(string $accessToken, string|null $refreshToken = null, CarbonInterface|null $expiresAt = null)

Create an OAuth authenticator.

Parameters

string $accessToken
string|null $refreshToken
CarbonInterface|null $expiresAt

Return Value

OAuthAuthenticator

at line 67
protected CarbonInterface|null resolveOAuthExpiry(mixed $expiresIn)

Resolve an OAuth token expiry.

Parameters

mixed $expiresIn

Return Value

CarbonInterface|null