Authlete
AuthorizationRequestDecisionHandler Class Reference

Handler for end-user's decision on the authorization request. More...

Inheritance diagram for AuthorizationRequestDecisionHandler:
AuthorizationRequestBaseHandler BaseRequestHandler

Public Member Functions

 AuthorizationRequestDecisionHandler (IAuthleteApi api, IAuthorizationRequestDecisionHandlerSpi spi)
 Constructor. More...
 
async Task< HttpResponseMessage > Handle (string ticket, string[] claimNames, string[] claimLocales)
 Handle an end-user's decision on an authorization request. More...
 
- Public Member Functions inherited from AuthorizationRequestBaseHandler
 AuthorizationRequestBaseHandler (IAuthleteApi api)
 Consturctor with an implementation of the IAuthleteApi interface which will be passed to the constructor of the super class. More...
 
- Public Member Functions inherited from BaseRequestHandler
 BaseRequestHandler (IAuthleteApi api)
 Constructor with an implementation of the IAuthleteApi interface. The given value can be referred to as the value of the Api property later. More...
 

Additional Inherited Members

- Protected Member Functions inherited from AuthorizationRequestBaseHandler
async Task< HttpResponseMessage > AuthorizationIssue (string ticket, string subject, long authTime, string acr, IDictionary< string, object > claims, Property[] properties, string[] scopes, string sub)
 Call Authlete's /api/auth/authorization/issue API and generate an HttpResponseMessage instance according to the value of the "action" parameter in the response from the API. Read the description of AuthorizationIssueRequest for details about the parameters given to this method. More...
 
async Task< HttpResponseMessage > AuthorizationFail (string ticket, AuthorizationFailReason reason)
 Call Authlete's /api/auth/authorization/fail API and generate an HttpResponseMessage instance according to the value of the "action" parameter in the response from the API. Read the description of AuthorizationFailRequest for details about the parameters given to this method. More...
 
- Protected Member Functions inherited from BaseRequestHandler
HttpResponseMessage UnknownAction (string apiPath)
 A utility method to generate an HttpResponseMessage instance with "500 Internal Server Error" and an error message in JSON. This method is expected to be used when the value of the "action" parameter in a response from an Authlete API holds an unexpected value. More...
 
- Properties inherited from BaseRequestHandler
IAuthleteApi Api [get]
 The implementation of the IAuthleteApi interface. It is the value given to the constructor. More...
 

Detailed Description

Handler for end-user's decision on the authorization request.

An authorization endpoint returns an authorization page (HTML) to an end-user, and the end-user will select either "authorize" or "deny" the authorization request. The Handle method handles the decision and calls Authlete's /api/auth/authorization/issue API or /api/auth/authorization/fail API.

Constructor & Destructor Documentation

◆ AuthorizationRequestDecisionHandler()

Constructor.

Parameters
apiAn implementation of the IAuthleteApi interface.
Parameters
spiAn implementation of the Service Provider Interface. It is the customization point.

Member Function Documentation

◆ Handle()

async Task<HttpResponseMessage> Handle ( string  ticket,
string[]  claimNames,
string[]  claimLocales 
)
inline

Handle an end-user's decision on an authorization request.

Returns
An HTTP response that should be returned to the user agent.
Parameters
ticketA ticket issued by Authlete's /api/auth/authorization API.
Parameters
claimNamesNames of requested claims. Use the value of the "claims" parameter in a response from Authlete's /api/auth/authorization API.
Parameters
claimLocalesRequested claim locales. Use the value of the "claimsLocales" parameter in a response from Authlete's /api/auth/authorization API.
Exceptions
AuthleteApiException

The documentation for this class was generated from the following file: