abstract class BankIDCasePluginBase extends PluginBase implements BankIDCaseInterface

Base class for bank_id_case plugins.

Properties

protected array<string, mixed> $private

The private data.

protected string|null $hashSalt

The hash salt.

Methods

string
label()

Returns the translated plugin label.

void
setPrivateData(array $private_data)

Set the private data.

getBankIdRequestData()

Get the BankID request data.

orderCompleted(BankIDResponse $response)

Called when the authentication is complete.

orderCancelled(BankIDResponse $response)

Called when the order is cancelled.

orderFailed(BankIDResponse $response)

Called when the order fails.

void
setHashSalt(string|null $hashSalt)

Sets the hash salt.

string
hash(mixed $item)

Return hash of an item.

Details

at line 29
string label()

Returns the translated plugin label.

Return Value

string

at line 38
void setPrivateData(array $private_data)

Set the private data.

Parameters

array $private_data

The private data.

Return Value

void

at line 45
BankIDRequestDataInterface getBankIdRequestData()

Get the BankID request data.

Return Value

BankIDRequestDataInterface

The BankID request data.

at line 59
abstract BankIDOrderDoneData orderCompleted(BankIDResponse $response)

Called when the authentication is complete.

This method can be responsible, for example, for creating a user account or logging in an existing user based on the response from the BankID service.

Parameters

BankIDResponse $response

The authentication complete response from BankID.

Return Value

BankIDOrderDoneData

Data that will be sent to the client for further steps, such as userid of authenticated user, or any other relevant information.

Exceptions

BankIDException

at line 64
BankIDOrderDoneData orderCancelled(BankIDResponse $response)

Called when the order is cancelled.

Parameters

BankIDResponse $response

The response from the BankID service.

Return Value

BankIDOrderDoneData

Data that will be sent to the client for further steps, such as userid of authenticated user, or any other relevant information.

at line 71
BankIDOrderDoneData orderFailed(BankIDResponse $response)

Called when the order fails.

Parameters

BankIDResponse $response

The response from the BankID service.

Return Value

BankIDOrderDoneData

Data that will be sent to the client for further steps, such as userid of authenticated user, or any other relevant information.

at line 86
void setHashSalt(string|null $hashSalt)

Sets the hash salt.

Parameters

string|null $hashSalt

The hash salt.

Return Value

void

at line 99
protected string hash(mixed $item)

Return hash of an item.

Parameters

mixed $item

The item to hash.

Return Value

string

The hashed item.