interface AuthenticationTypeControllerInterface (View source)

Methods

User|null
authenticate()

Method used to verify the user and log them in.

deauthenticate(User $u)

Method used to clean up.

bool
isAuthenticated(User $u)

Test user authentication status.

string
buildHash(User $u)

Create a cookie hash to identify the user indefinitely.

bool
verifyHash(User $u, string $hash)

Verify cookie hash to identify user.

completeAuthentication(User $u)

tasks to finalize authentication, call on login events etc.

Details

User|null authenticate()

Method used to verify the user and log them in.

Returning user will cause finishAuthentication to run, otherwise it's expected that the subclass manage completion.

Return Value

User|null

Exceptions

AuthenticationTypeFailureException

deauthenticate(User $u)

Method used to clean up.

This method must be defined, if it isn't needed, leave it blank.

Parameters

User $u

bool isAuthenticated(User $u)

Test user authentication status.

Parameters

User $u

Return Value

bool

Returns true if user is authenticated, false if not

string buildHash(User $u)

Create a cookie hash to identify the user indefinitely.

Parameters

User $u

Return Value

string

Unique hash to be used to verify the users identity

bool verifyHash(User $u, string $hash)

Verify cookie hash to identify user.

Parameters

User $u

User object requesting verification.

string $hash

Return Value

bool

returns true if the hash is valid, false if not

completeAuthentication(User $u)

tasks to finalize authentication, call on login events etc.

Parameters

User $u