OAuthProvider
class OAuthProvider
This class, which represents an OAuth provider, stores the configuration parameters related to this provider.
Constants
TYPES |
|
Properties
private string | $name | ||
private string | $protocol | ||
private string | $version | ||
private string | $client_id | ||
private string | $client_secret | ||
private string | $redirect_uri | ||
private string | $discovery_endpoint | ||
private string | $authorization_endpoint | ||
private string | $token_endpoint | ||
private string | $registration_endpoint | ||
private string | $introspection_endpoint | ||
private string | $revocation_endpoint | ||
private string | $request_token_endpoint | ||
private string | $userinfo_endpoint | ||
private string | $end_session_endpoint | ||
private string | $pin_dialog_url | ||
private string | $pin | ||
private string | $jwks_uri | ||
private array | $scopes_supported | ||
private array | $response_types_supported | ||
private array | $response_modes_supported | ||
private array | $token_endpoint_auth_methods_supported | ||
private array | $subject_types_supported | ||
private array | $id_token_signing_alg_values_supported | ||
private array | $claims_supported | ||
private array | $mapping | ||
private string | $api_key | ||
private string | $username | ||
private string | $password | ||
private string | $realm |
Methods
Constructs a OAuthProvider instance with the registered data of the client with the OAuth provider.
Returns the name of the provider
Returns the OAuth-based protocol, either 'oauth' or 'openid'
Returns the version of the protocol supported by the OAuth provider
Returns the identifier of your application registered with the OAuth provider.
Returns the secret value assigned to your application.
Returns the URL of the current script page that is calling this class
Returns the discovery endpoint.
Returns the authorization endpoint.
Returns the token endpoint
Returns the client dynamic registration endpoint
Returns the introspection endpoint
Returns the revocation endpoint
Returns the request token endpoint
Returns the UserInfo endpoint
Returns the end session endpoint
Returns the pin dialog url
Returns the value of the PIN code
Returns the Jwks URI
Returns the scope values supported by the OAuth provider.
Returns the response_type values supported by the OAuth provider.
Returns the response_mode values supported by the OAuth provider.
Returns the authentication methods supported by the OAuth provider.
Returns the subject identifier types supported by the OAuth provider.
Returns the list of JWS signing algorithms supported by the OAuth provider.
Returns the claims supported by the OAuth provider.
Returns the field of the user info corresponding to the user identifier.
Returns the fields mapping between the OAuth client and the OAuth provider.
Returns the identifier of the API key provided by the OAuth provider.
Returns the OAuth user name to use with password authorization
Returns the OAuth password to use with password authorization
Returns the realm of authorization for OpenID Connect
Sets the OAuth-based protocol, either 'oauth' or 'openid'
Sets the version of the protocol supported by the OAuth provider
Sets the identifier of your application registered with the OAuth provider.
Sets the secret value assigned to your application.
Sets the URL of the current script page that is calling this class
Sets the discovery endpoint.
Sets the authorization endpoint.
Sets the token endpoint
Sets the client dynamic registration endpoint
Sets the introspection endpoint
Sets the revocation endpoint
Sets the request token endpoint
Sets the UserInfo endpoint
Sets the end session endpoint
Sets the pin dialog url
Sets the value of the PIN code
Sets the Jwks URI
Sets the scope values supported by the OAuth provider.
Sets the response_type values supported by the OAuth provider.
Sets the response_mode values supported by the OAuth provider.
Sets the authentication methods supported by the OAuth provider.
Sets the subject identifier types supported by the OAuth provider.
Sets the list of JWS signing algorithms supported by the OAuth provider.
Sets the claims supported by the OAuth provider.
Sets the field of the user info corresponding to the user identifier.
Sets the fields mapping between the OAuth client and the OAuth provider.
Sets the identifier of the API key provided by the OAuth provider.
Sets the OAuth user name to use with password authorization
Sets the OAuth password to use with password authorization
Sets the realm of authorization for OpenID Connect
Binds the configuration parameters to the properties of this instance of the OAuth provider.
Returns the OAuth provider configuration as an array
Constructs a default redirect URI from the superglobals.
Details
at line 370
__construct(string $name, string $client_id = '', string $client_secret = '', string $redirect_uri = '')
Constructs a OAuthProvider instance with the registered data of the client with the OAuth provider.
The name of the provider given in parameter can be that of a built-in provider or not. If it is not a built-in provider, you must provide the configuration parameters in the options argument of the initialize(...) function.
at line 382
string
getName()
Returns the name of the provider
at line 391
string
getProtocol()
Returns the OAuth-based protocol, either 'oauth' or 'openid'
at line 400
string
getVersion()
Returns the version of the protocol supported by the OAuth provider
at line 409
string
getClientId()
Returns the identifier of your application registered with the OAuth provider.
at line 418
string
getClientSecret()
Returns the secret value assigned to your application.
at line 427
string
getRedirectUri()
Returns the URL of the current script page that is calling this class
at line 436
string
getDiscoveryEndpoint()
Returns the discovery endpoint.
at line 445
string
getAuthorizationEndpoint()
Returns the authorization endpoint.
at line 454
string
getTokenEndpoint()
Returns the token endpoint
at line 463
string
getRegistrationEndpoint()
Returns the client dynamic registration endpoint
at line 472
string
getIntrospectionEndpoint()
Returns the introspection endpoint
at line 481
string
getRevocationEndpoint()
Returns the revocation endpoint
at line 490
string
getRequestTokenEndpoint()
Returns the request token endpoint
at line 499
string
getUserinfoEndpoint()
Returns the UserInfo endpoint
at line 508
string
getEndSessionEndpoint()
Returns the end session endpoint
at line 517
string
getPinDialogUrl()
Returns the pin dialog url
at line 526
string
getPin()
Returns the value of the PIN code
at line 535
string
getJwksUri()
Returns the Jwks URI
at line 544
array
getScopesSupported()
Returns the scope values supported by the OAuth provider.
at line 553
array
getResponseTypesSupported()
Returns the response_type values supported by the OAuth provider.
at line 562
array
getResponseModesSupported()
Returns the response_mode values supported by the OAuth provider.
at line 571
array
getTokenEndpointAuthMethodsSupported()
Returns the authentication methods supported by the OAuth provider.
at line 580
array
getSubjectTypesSupported()
Returns the subject identifier types supported by the OAuth provider.
at line 589
array
getIdTokenSigningAlgValuesSupported()
Returns the list of JWS signing algorithms supported by the OAuth provider.
at line 598
array
getClaimsSupported()
Returns the claims supported by the OAuth provider.
at line 607
string
getUserIdField()
Returns the field of the user info corresponding to the user identifier.
at line 616
array
getMapping()
Returns the fields mapping between the OAuth client and the OAuth provider.
at line 625
string
getApiKey()
Returns the identifier of the API key provided by the OAuth provider.
at line 634
string
getUsername()
Returns the OAuth user name to use with password authorization
at line 643
string
getPassword()
Returns the OAuth password to use with password authorization
at line 652
string
getRealm()
Returns the realm of authorization for OpenID Connect
at line 661
OAuthProvider
setProtocol(string $protocol)
Sets the OAuth-based protocol, either 'oauth' or 'openid'
at line 671
OAuthProvider
setVersion(string $version)
Sets the version of the protocol supported by the OAuth provider
at line 681
OAuthProvider
setClientId(string $client_id)
Sets the identifier of your application registered with the OAuth provider.
at line 691
OAuthProvider
setClientSecret(string $client_secret)
Sets the secret value assigned to your application.
at line 701
OAuthProvider
setRedirectUri(string $redirect_uri)
Sets the URL of the current script page that is calling this class
at line 711
OAuthProvider
setDiscoveryEndpoint(string $discovery_endpoint)
Sets the discovery endpoint.
at line 721
OAuthProvider
setAuthorizationEndpoint(string $authorization_endpoint)
Sets the authorization endpoint.
at line 731
OAuthProvider
setTokenEndpoint(string $token_endpoint)
Sets the token endpoint
at line 741
OAuthProvider
setRegistrationEndpoint(string $registration_endpoint)
Sets the client dynamic registration endpoint
at line 751
OAuthProvider
setIntrospectionEndpoint(string $introspection_endpoint)
Sets the introspection endpoint
at line 761
OAuthProvider
setRevocationEndpoint(string $revocation_endpoint)
Sets the revocation endpoint
at line 771
OAuthProvider
setRequestTokenEndpoint(string $request_token_endpoint)
Sets the request token endpoint
at line 781
OAuthProvider
setUserinfoEndpoint(string $userinfo_endpoint)
Sets the UserInfo endpoint
at line 791
OAuthProvider
setEndSessionEndpoint(string $end_session_endpoint)
Sets the end session endpoint
at line 801
OAuthProvider
setPinDialogUrl(string $pin_dialog_url)
Sets the pin dialog url
at line 811
OAuthProvider
setPin(string $pin)
Sets the value of the PIN code
at line 821
OAuthProvider
setJwksUri(string $jwks_uri)
Sets the Jwks URI
at line 831
OAuthProvider
setScopesSupported(array $scopes_supported)
Sets the scope values supported by the OAuth provider.
at line 841
OAuthProvider
setResponseTypesSupported(array $response_types_supported)
Sets the response_type values supported by the OAuth provider.
at line 851
OAuthProvider
setResponseModesSupported(array $response_modes_supported)
Sets the response_mode values supported by the OAuth provider.
at line 861
OAuthProvider
setTokenEndpointAuthMethodsSupported(array $token_endpoint_auth_methods_supported)
Sets the authentication methods supported by the OAuth provider.
at line 871
OAuthProvider
setSubjectTypesSupported(array $subject_types_supported)
Sets the subject identifier types supported by the OAuth provider.
at line 881
OAuthProvider
setIdTokenSigningAlgValuesSupported(array $id_token_signing_alg_values_supported)
Sets the list of JWS signing algorithms supported by the OAuth provider.
at line 891
OAuthProvider
setClaimsSupported(array $claims_supported)
Sets the claims supported by the OAuth provider.
at line 901
OAuthProvider
setUserIdField(string $user_id_field)
Sets the field of the user info corresponding to the user identifier.
at line 911
OAuthProvider
setMapping(array $mapping)
Sets the fields mapping between the OAuth client and the OAuth provider.
at line 921
OAuthProvider
setApiKey(string $api_key)
Sets the identifier of the API key provided by the OAuth provider.
at line 931
OAuthProvider
setUsername(string $username)
Sets the OAuth user name to use with password authorization
at line 941
OAuthProvider
setPassword(string $password)
Sets the OAuth password to use with password authorization
at line 951
OAuthProvider
setRealm(string $realm)
Sets the realm of authorization for OpenID Connect
at line 964
void
bind(array $configuration)
Binds the configuration parameters to the properties of this instance of the OAuth provider.
at line 995
array
toArray()
Returns the OAuth provider configuration as an array
at line 1031
protected string
makeDefaultRedirectUri()
Constructs a default redirect URI from the superglobals.