DefaultAuthorizationDecisionController
extends Controller
in package
An implementation of authorization decision endpoint.
Table of Contents
Methods
- __invoke() : Response
- The entry point of this controller.
- getAuthorizationRequestDecisionHandlerSpi() : AuthorizationRequestDecisionHandlerSpi
- Get an implementation of the AuthorizationRequestDecisionHandlerSpi interface.
- getUserAuthenticatedAt() : int
- Get the time at which the user was authenticated.
- username() : string
- Get the database column for unique user identifiers.
Methods
__invoke()
The entry point of this controller.
public
__invoke(AuthleteApi $api, Request $request) : Response
Parameters
- $api : AuthleteApi
-
An implementation of the
AuthleteApi
interface. - $request : Request
-
A request which has come from the authorization page.
Return values
Response —A response that should be returned to the client.
getAuthorizationRequestDecisionHandlerSpi()
Get an implementation of the AuthorizationRequestDecisionHandlerSpi interface.
protected
getAuthorizationRequestDecisionHandlerSpi(Request $request) : AuthorizationRequestDecisionHandlerSpi
The default implementation of this method returns an instance of
DefaultAuthorizationRequestDecisionHandlerSpi
.
Parameters
- $request : Request
-
A request which has come from the authorization page.
Return values
AuthorizationRequestDecisionHandlerSpi —An implementation of the AuthorizationRequestDecisionHandlerSpi
interface.
getUserAuthenticatedAt()
Get the time at which the user was authenticated.
protected
getUserAuthenticatedAt(User $user, Request $request) : int
The default implementation of this method returns 0. However, this
method must be implemented properly to support the auth_time
claim.
See OpenID Connect Core 1.0
for details.
Parameters
- $user : User
-
The user.
- $request : Request
Return values
int —The time at which the user was authenticated. The number of seconds since the Unix epoch (1970-Jan-1).
username()
Get the database column for unique user identifiers.
protected
username() : string
The default implementation of this method returns 'email'
.
Return values
string —The detabase column for unique user identifiers.