LoginLinkHandler
in package
implements
LoginLinkHandlerInterface
FinalYes
Tags
Table of Contents
Interfaces
- LoginLinkHandlerInterface
- A class that is able to create and handle "magic" login links.
Properties
- $options : array<string|int, mixed>
- $signatureHasher : mixed
- $urlGenerator : mixed
- $userProvider : mixed
Methods
- __construct() : mixed
- consumeLoginLink() : UserInterface
- Validates if this request contains a login link and returns the associated User.
- createLoginLink() : LoginLinkDetails
- Generate a link that can be used to authenticate as the given user.
Properties
$options
private
array<string|int, mixed>
$options
$signatureHasher
private
mixed
$signatureHasher
$urlGenerator
private
mixed
$urlGenerator
$userProvider
private
mixed
$userProvider
Methods
__construct()
public
__construct(UrlGeneratorInterface $urlGenerator, UserProviderInterface $userProvider, SignatureHasher $signatureHasher, array<string|int, mixed> $options) : mixed
Parameters
- $urlGenerator : UrlGeneratorInterface
- $userProvider : UserProviderInterface
- $signatureHasher : SignatureHasher
- $options : array<string|int, mixed>
consumeLoginLink()
Validates if this request contains a login link and returns the associated User.
public
consumeLoginLink(Request $request) : UserInterface
Throw InvalidLoginLinkExceptionInterface if the link is invalid.
Parameters
- $request : Request
Return values
UserInterfacecreateLoginLink()
Generate a link that can be used to authenticate as the given user.
public
createLoginLink(UserInterface $user[, Request $request = null ]) : LoginLinkDetails
Parameters
- $user : UserInterface
- $request : Request = null