ClientCredentialsBasicAuthGrant
trait ClientCredentialsBasicAuthGrant
Traits
Properties
| protected OAuthConfig|null | $oauthConfig | The immutable OAuth 2 configuration. |
from HasOAuthConfig |
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.
getAccessToken(array $scopes = [], string $scopeSeparator = ' ', bool $returnResponse = false, callable|null $requestModifier = null)
Request a client-credentials access token.
resolveAccessTokenRequest(OAuthConfig $oauthConfig, array $scopes = [], string $scopeSeparator = ' ')
Resolve the client-credentials request.
Details
in
CreatesOAuthAuthenticator at line 25
protected OAuthAuthenticator
createOAuthAuthenticatorFromResponse(Response $response, string|null $fallbackRefreshToken = null)
Create an OAuth authenticator from a token response.
in
CreatesOAuthAuthenticator at line 54
protected OAuthAuthenticator
createOAuthAuthenticator(string $accessToken, string|null $refreshToken = null, CarbonInterface|null $expiresAt = null)
Create an OAuth authenticator.
in
CreatesOAuthAuthenticator at line 67
protected CarbonInterface|null
resolveOAuthExpiry(mixed $expiresIn)
Resolve an OAuth token expiry.
in
HasOAuthConfig at line 24
OAuthConfig
oauthConfig()
Get the OAuth 2 configuration.
in
HasOAuthConfig at line 32
abstract protected OAuthConfig
defaultOAuthConfig()
Define the default OAuth 2 configuration.
in
ClientCredentialsGrant at line 31
OAuthAuthenticator|Response
getAccessToken(array $scopes = [], string $scopeSeparator = ' ', bool $returnResponse = false, callable|null $requestModifier = null)
Request a client-credentials access token.
at line 25
protected Request
resolveAccessTokenRequest(OAuthConfig $oauthConfig, array $scopes = [], string $scopeSeparator = ' ')
Resolve the client-credentials request.