0 follower

Interface Yiisoft\Auth\IdentityWithTokenRepositoryInterface

Identity repository is identity storage that is able to retrieve identity given a token.

Public Methods

Hide inherited methods

Method Description Defined By
findIdentityByToken() Finds an identity by the given token. Yiisoft\Auth\IdentityWithTokenRepositoryInterface

Method Details

Hide inherited methods

findIdentityByToken() public abstract method

Finds an identity by the given token.

public abstract Yiisoft\Auth\IdentityInterface|null findIdentityByToken ( string $token, string|null $type null )
$token string

The token to be looked for.

$type string|null

The type of the token. The value of this parameter depends on the implementation and should allow supporting multiple token types for a single identity.

return Yiisoft\Auth\IdentityInterface|null

The identity object that matches the given token. Null should be returned if such an identity cannot be found or the identity is not in an active state (disabled, deleted, etc.)

                public function findIdentityByToken(string $token, ?string $type = null): ?IdentityInterface;