abstract class IntegrationBase extends PluginBase implements IntegrationInterface, ContainerFactoryPluginInterface

A base class to help developers implement their own sandwich plugins.

Constants

PROVIDER_NAME

Properties

protected ExternalAuthInterface $externalAuth

The externalauth service.

Methods

__construct(array $configuration, $plugin_id, $plugin_definition, ExternalAuthInterface $externalAuth)

Constructs a new \Drupal\bankid\IntegrationBase object.

static 
create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition)

{@inheritdoc}

string
getLabel()

Provide the Integration label.

UserInterface|null
getUser(array $response)

Get the user from the response.

UserInterface|null
createUser(array $response)

Create the user from the response.

string
hash(string $str)

Get the hash of a string.

Details

at line 34
__construct(array $configuration, $plugin_id, $plugin_definition, ExternalAuthInterface $externalAuth)

Constructs a new \Drupal\bankid\IntegrationBase object.

Parameters

array $configuration
$plugin_id
$plugin_definition
ExternalAuthInterface $externalAuth

at line 42
static create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition)

{@inheritdoc}

Parameters

ContainerInterface $container
array $configuration
$plugin_id
$plugin_definition

at line 54
string getLabel()

Provide the Integration label.

Return Value

string

A string label of the Integration.

at line 61
abstract UserInterface|null getUser(array $response)

Get the user from the response.

Parameters

array $response

The response from the BankID service.

Return Value

UserInterface|null

The user object.

at line 66
abstract UserInterface|null createUser(array $response)

Create the user from the response.

Parameters

array $response

The response from the BankID service.

Return Value

UserInterface|null

The user object.

at line 71
string hash(string $str)

Get the hash of a string.

Parameters

string $str

The string to hash.

Return Value

string

The hashed string.