interface LoginLinkHandlerInterface

A class that is able to create and handle "magic" login links.

Methods

LoginLinkDetails
createLoginLink(UserInterface$user,Request$request =null,int$lifetime =null)

Generate a link that can be used to authenticate as the given user.

consumeLoginLink(Request$request)

Validates if this request contains a login link and returns the associated User.

Details

Generate a link that can be used to authenticate as the given user.

Parameters

UserInterface $user
Request $request
int $lifetime

Return Value

LoginLinkDetails

Validates if this request contains a login link and returns the associated User.

Throw InvalidLoginLinkExceptionInterface if the link is invalid.

Parameters

Request $request

Return Value

UserInterface