interface OpenIDConnectClientInterface in OpenID Connect / OAuth client 8
Same name and namespace in other branches
- 2.x src/Plugin/OpenIDConnectClientInterface.php \Drupal\openid_connect\Plugin\OpenIDConnectClientInterface
Defines an interface for OpenID Connect client plugins.
Hierarchy
- interface \Drupal\Component\Plugin\ConfigurableInterface; interface \Drupal\Component\Plugin\DependentPluginInterface; interface \Drupal\Core\Plugin\PluginFormInterface; interface \Drupal\Component\Plugin\PluginInspectionInterface
- interface \Drupal\openid_connect\Plugin\OpenIDConnectClientInterface
Expanded class hierarchy of OpenIDConnectClientInterface
All classes that implement OpenIDConnectClientInterface
4 files declare their use of OpenIDConnectClientInterface
- OpenIDConnect.php in src/
OpenIDConnect.php - OpenIDConnectClaims.php in src/
OpenIDConnectClaims.php - OpenIDConnectRedirectController.php in src/
Controller/ OpenIDConnectRedirectController.php - OpenIDConnectTest.php in tests/
src/ Unit/ OpenIDConnectTest.php
File
- src/
Plugin/ OpenIDConnectClientInterface.php, line 13
Namespace
Drupal\openid_connect\PluginView source
interface OpenIDConnectClientInterface extends ConfigurableInterface, DependentPluginInterface, PluginFormInterface, PluginInspectionInterface {
/**
* Returns an array of endpoints.
*
* @return array
* An array with the following keys:
* - authorization: The full url to the authorization endpoint.
* - token: The full url to the token endpoint.
* - userinfo: The full url to the userinfo endpoint.
*/
public function getEndpoints();
/**
* Gets an array of of scopes.
*
* This method allows a client to override the default minimum set of scopes
* assumed by OpenIDConnectClaims::getScopes();
*
* @return string[]|null
* A space separated list of scopes.
*/
public function getClientScopes();
/**
* Redirects the user to the authorization endpoint.
*
* The authorization endpoint authenticates the user and returns them
* to the redirect_uri specified previously with an authorization code
* that can be exchanged for an access token.
*
* @param string $scope
* Name of scope(s) that with user consent will provide access to otherwise
* restricted user data. Defaults to "openid email".
*
* @return \Symfony\Component\HttpFoundation\Response
* A response object.
*/
public function authorize($scope = 'openid email');
/**
* Retrieve access token and ID token.
*
* Exchanging the authorization code that is received as the result of the
* authentication request for an access token and an ID token.
*
* The ID token is a cryptographically signed JSON object encoded in base64.
* It contains identity information about the user.
* The access token can be sent to the login provider to obtain user profile
* information.
*
* @param string $authorization_code
* Authorization code received as a result of the the authorization request.
*
* @return array|bool
* An associative array containing:
* - id_token: The ID token that holds user data.
* - access_token: Access token that can be used to obtain user profile
* information.
* - expire: Unix timestamp of the expiration date of the access token.
* Or FALSE if tokens could not be retrieved.
*/
public function retrieveTokens($authorization_code);
/**
* Decodes ID token to access user data.
*
* @param string $id_token
* The encoded ID token containing the user data.
*
* @return array
* User identity information.
*/
public function decodeIdToken($id_token);
/**
* Retrieves user info: additional user profile data.
*
* @param string $access_token
* Access token.
*
* @return array|bool
* User profile information array, or FALSE if retrieval failed.
*/
public function retrieveUserInfo($access_token);
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ConfigurableInterface:: |
public | function | Gets default configuration for this plugin. | 11 |
ConfigurableInterface:: |
public | function | Gets this plugin's configuration. | 12 |
ConfigurableInterface:: |
public | function | Sets the configuration for this plugin instance. | 12 |
DependentPluginInterface:: |
public | function | Calculates dependencies for the configured plugin. | 19 |
OpenIDConnectClientInterface:: |
public | function | Redirects the user to the authorization endpoint. | 1 |
OpenIDConnectClientInterface:: |
public | function | Decodes ID token to access user data. | 1 |
OpenIDConnectClientInterface:: |
public | function | Gets an array of of scopes. | 1 |
OpenIDConnectClientInterface:: |
public | function | Returns an array of endpoints. | 6 |
OpenIDConnectClientInterface:: |
public | function | Retrieve access token and ID token. | 1 |
OpenIDConnectClientInterface:: |
public | function | Retrieves user info: additional user profile data. | 1 |
PluginFormInterface:: |
public | function | Form constructor. | 36 |
PluginFormInterface:: |
public | function | Form submission handler. | 32 |
PluginFormInterface:: |
public | function | Form validation handler. | 18 |
PluginInspectionInterface:: |
public | function | Gets the definition of the plugin implementation. | 4 |
PluginInspectionInterface:: |
public | function | Gets the plugin_id of the plugin instance. | 2 |