class OpenIDConnectGenericClient in OpenID Connect / OAuth client 8
Same name and namespace in other branches
- 2.x src/Plugin/OpenIDConnectClient/OpenIDConnectGenericClient.php \Drupal\openid_connect\Plugin\OpenIDConnectClient\OpenIDConnectGenericClient
Generic OpenID Connect client.
Used primarily to login to Drupal sites powered by oauth2_server or PHP sites powered by oauth2-server-php.
Plugin annotation
@OpenIDConnectClient(
id = "generic",
label = @Translation("Generic")
)
Hierarchy
- class \Drupal\Component\Plugin\PluginBase implements DerivativeInspectionInterface, PluginInspectionInterface
- class \Drupal\openid_connect\Plugin\OpenIDConnectClientBase implements ContainerFactoryPluginInterface, OpenIDConnectClientInterface uses StringTranslationTrait
- class \Drupal\openid_connect\Plugin\OpenIDConnectClient\OpenIDConnectGenericClient
- class \Drupal\openid_connect\Plugin\OpenIDConnectClientBase implements ContainerFactoryPluginInterface, OpenIDConnectClientInterface uses StringTranslationTrait
Expanded class hierarchy of OpenIDConnectGenericClient
File
- src/
Plugin/ OpenIDConnectClient/ OpenIDConnectGenericClient.php, line 19
Namespace
Drupal\openid_connect\Plugin\OpenIDConnectClientView source
class OpenIDConnectGenericClient extends OpenIDConnectClientBase {
/**
* {@inheritdoc}
*/
public function defaultConfiguration() {
return [
'authorization_endpoint' => '',
'token_endpoint' => '',
'userinfo_endpoint' => '',
] + parent::defaultConfiguration();
}
/**
* {@inheritdoc}
*/
public function buildConfigurationForm(array $form, FormStateInterface $form_state) {
$form = parent::buildConfigurationForm($form, $form_state);
$form['authorization_endpoint'] = [
'#title' => $this
->t('Authorization endpoint'),
'#type' => 'textfield',
'#default_value' => $this->configuration['authorization_endpoint'],
];
$form['token_endpoint'] = [
'#title' => $this
->t('Token endpoint'),
'#type' => 'textfield',
'#default_value' => $this->configuration['token_endpoint'],
];
$form['userinfo_endpoint'] = [
'#title' => $this
->t('UserInfo endpoint'),
'#type' => 'textfield',
'#default_value' => $this->configuration['userinfo_endpoint'],
];
return $form;
}
/**
* {@inheritdoc}
*/
public function getEndpoints() {
return [
'authorization' => $this->configuration['authorization_endpoint'],
'token' => $this->configuration['token_endpoint'],
'userinfo' => $this->configuration['userinfo_endpoint'],
];
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
OpenIDConnectClientBase:: |
protected | property | The minimum set of scopes for this client. | |
OpenIDConnectClientBase:: |
protected | property | The datetime.time service. | |
OpenIDConnectClientBase:: |
protected | property | The HTTP client to fetch the feed data with. | |
OpenIDConnectClientBase:: |
protected | property | The language manager. | |
OpenIDConnectClientBase:: |
protected | property | The logger factory used for logging. | |
OpenIDConnectClientBase:: |
protected | property | Page cache kill switch. | |
OpenIDConnectClientBase:: |
protected | property | The request stack used to access request globals. | |
OpenIDConnectClientBase:: |
protected | property | The OpenID state token service. | |
OpenIDConnectClientBase:: |
public | function |
Redirects the user to the authorization endpoint. Overrides OpenIDConnectClientInterface:: |
3 |
OpenIDConnectClientBase:: |
public | function |
Calculates dependencies for the configured plugin. Overrides DependentPluginInterface:: |
|
OpenIDConnectClientBase:: |
public static | function |
Creates an instance of the plugin. Overrides ContainerFactoryPluginInterface:: |
|
OpenIDConnectClientBase:: |
public | function |
Decodes ID token to access user data. Overrides OpenIDConnectClientInterface:: |
3 |
OpenIDConnectClientBase:: |
public | function |
Gets an array of of scopes. Overrides OpenIDConnectClientInterface:: |
|
OpenIDConnectClientBase:: |
public | function |
Gets this plugin's configuration. Overrides ConfigurableInterface:: |
|
OpenIDConnectClientBase:: |
protected | function | Returns the redirect URL. | |
OpenIDConnectClientBase:: |
protected | function | Helper function for request options. | |
OpenIDConnectClientBase:: |
protected | function | Helper function for URL options. | |
OpenIDConnectClientBase:: |
public | function |
Retrieve access token and ID token. Overrides OpenIDConnectClientInterface:: |
|
OpenIDConnectClientBase:: |
public | function |
Retrieves user info: additional user profile data. Overrides OpenIDConnectClientInterface:: |
4 |
OpenIDConnectClientBase:: |
public | function |
Sets the configuration for this plugin instance. Overrides ConfigurableInterface:: |
|
OpenIDConnectClientBase:: |
public | function |
Form submission handler. Overrides PluginFormInterface:: |
|
OpenIDConnectClientBase:: |
public | function |
Form validation handler. Overrides PluginFormInterface:: |
|
OpenIDConnectClientBase:: |
public | function |
The constructor. Overrides PluginBase:: |
|
OpenIDConnectGenericClient:: |
public | function |
Form constructor. Overrides OpenIDConnectClientBase:: |
|
OpenIDConnectGenericClient:: |
public | function |
Gets default configuration for this plugin. Overrides OpenIDConnectClientBase:: |
|
OpenIDConnectGenericClient:: |
public | function |
Returns an array of endpoints. Overrides OpenIDConnectClientInterface:: |
|
PluginBase:: |
protected | property | Configuration information passed into the plugin. | 1 |
PluginBase:: |
protected | property | The plugin implementation definition. | 1 |
PluginBase:: |
protected | property | The plugin_id. | |
PluginBase:: |
constant | A string which is used to separate base plugin IDs from the derivative ID. | ||
PluginBase:: |
public | function |
Gets the base_plugin_id of the plugin instance. Overrides DerivativeInspectionInterface:: |
|
PluginBase:: |
public | function |
Gets the derivative_id of the plugin instance. Overrides DerivativeInspectionInterface:: |
|
PluginBase:: |
public | function |
Gets the definition of the plugin implementation. Overrides PluginInspectionInterface:: |
3 |
PluginBase:: |
public | function |
Gets the plugin_id of the plugin instance. Overrides PluginInspectionInterface:: |
|
PluginBase:: |
public | function | Determines if the plugin is configurable. | |
StringTranslationTrait:: |
protected | property | The string translation service. | 1 |
StringTranslationTrait:: |
protected | function | Formats a string containing a count of items. | |
StringTranslationTrait:: |
protected | function | Returns the number of plurals supported by a given language. | |
StringTranslationTrait:: |
protected | function | Gets the string translation service. | |
StringTranslationTrait:: |
public | function | Sets the string translation service to use. | 2 |
StringTranslationTrait:: |
protected | function | Translates a string to the current language or to a given language. |