Module org.elasticsearch.security
Class RestGetTokenAction
java.lang.Object
org.elasticsearch.rest.BaseRestHandler
org.elasticsearch.xpack.security.rest.action.SecurityBaseRestHandler
org.elasticsearch.xpack.security.rest.action.oauth2.RestGetTokenAction
- All Implemented Interfaces:
RestHandler,RestRequestFilter
An implementation of a OAuth2-esque API for retrieval of an access token.
This API does not conform to the RFC completely as it uses XContent for the request body
instead for form encoded data. This is a relatively common modification of the OAuth2
specification as this aspect does not make the most sense since the response body is
expected to be JSON
-
Nested Class Summary
Nested classes/interfaces inherited from class org.elasticsearch.rest.BaseRestHandler
BaseRestHandler.RequestBodyChunkConsumer, BaseRestHandler.RestChannelConsumerNested classes/interfaces inherited from interface org.elasticsearch.rest.RestHandler
RestHandler.Route -
Field Summary
FieldsFields inherited from class org.elasticsearch.xpack.security.rest.action.SecurityBaseRestHandler
CLIENT_AUTHENTICATION_PARSER, licenseState, settingsFields inherited from class org.elasticsearch.rest.BaseRestHandler
MULTI_ALLOW_EXPLICIT_INDEX -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetName()protected ExceptioninnerCheckFeatureAvailable(RestRequest request) Implementers should implement this method when sub-classes have additional license requirements.protected BaseRestHandler.RestChannelConsumerinnerPrepareRequest(RestRequest request, NodeClient client) Implementers should implement this method as they normally would forBaseRestHandler.prepareRequest(RestRequest, NodeClient)and ensure that all request parameters are consumed prior to returning a value.routes()Methods inherited from class org.elasticsearch.xpack.security.rest.action.SecurityBaseRestHandler
checkFeatureAvailable, getSecureString, prepareRequestMethods inherited from class org.elasticsearch.rest.BaseRestHandler
getUsageCount, handleRequest, responseParams, responseParams, unrecognizedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.elasticsearch.rest.RestHandler
allowSystemIndexAccessByDefault, allSupportedParameters, canTripCircuitBreaker, getConcreteRestHandler, getServerlessScope, mediaTypesValid, supportedCapabilities, supportedQueryParameters, supportsBulkContentMethods inherited from interface org.elasticsearch.rest.RestRequestFilter
getFilteredRequest
-
Field Details
-
logger
protected org.apache.logging.log4j.Logger logger
-
-
Constructor Details
-
RestGetTokenAction
-
-
Method Details
-
routes
- Specified by:
routesin interfaceRestHandler- Specified by:
routesin classBaseRestHandler
-
getName
- Specified by:
getNamein interfaceRestHandler- Specified by:
getNamein classBaseRestHandler
-
innerPrepareRequest
protected BaseRestHandler.RestChannelConsumer innerPrepareRequest(RestRequest request, NodeClient client) throws IOException Description copied from class:SecurityBaseRestHandlerImplementers should implement this method as they normally would forBaseRestHandler.prepareRequest(RestRequest, NodeClient)and ensure that all request parameters are consumed prior to returning a value. This method is executed only if the check fromSecurityBaseRestHandler.checkFeatureAvailable(RestRequest)passes.- Specified by:
innerPrepareRequestin classSecurityBaseRestHandler- Throws:
IOException
-
getFilteredFields
- Specified by:
getFilteredFieldsin interfaceRestRequestFilter
-
innerCheckFeatureAvailable
Description copied from class:SecurityBaseRestHandlerImplementers should implement this method when sub-classes have additional license requirements.- Overrides:
innerCheckFeatureAvailablein classSecurityBaseRestHandler
-