Interface AuthorizationHandler.AuthorizationConsumer
- All Known Implementing Classes:
OAuth20Authorization.OAuth20AuthorizationHandler
- Enclosing class:
- AuthorizationHandler
public static interface AuthorizationHandler.AuthorizationConsumer
The actual authorization consumer/handler
-
Method Summary
Modifier and TypeMethodDescriptionHandle the request.voidValidate the request
-
Method Details
-
validateRequest
void validateRequest(String sender, String request, Map<String, String> args) throws RequestHandler.RequestHandlerBadRequestExceptionValidate the request- Parameters:
args- The GET request argumentsrequest- The request URL without "GET".sender- who sent the request? the host from referer header or IP of request sender- Throws:
RequestHandler.RequestHandlerBadRequestException- if the request is invalid- See Also:
-
handleRequest
AuthorizationHandler.ResponseRecord handleRequest(String sender, String request, Map<String, String> args) throws RequestHandler.RequestHandlerErrorException, RequestHandler.RequestHandlerBadRequestExceptionHandle the request. Any time-consuming operation must be performed asynchronously to avoid delaying the HTTP response.- Parameters:
args- The GET request argumentsrequest- The request URL without "GET".sender- who sent the request? the host from referer header or IP of request sender- Returns:
- The response to show the user. May be
null. - Throws:
RequestHandler.RequestHandlerErrorException- if an error occurs while processing the requestRequestHandler.RequestHandlerBadRequestException- if the request is invalid- See Also:
-