Package com.authlete.jaxrs
Class BaseIntrospectionEndpoint
- java.lang.Object
-
- com.authlete.jaxrs.BaseEndpoint
-
- com.authlete.jaxrs.BaseIntrospectionEndpoint
-
public class BaseIntrospectionEndpoint extends BaseEndpoint
A base class for introspection endpoint implementations.- Since:
- 2.2
- Author:
- Takahiko Kawasaki
- See Also:
- RFC 7662 : OAuth 2.0 Token Introspection,
IntrospectionRequestHandler
-
-
Constructor Summary
Constructors Constructor Description BaseIntrospectionEndpoint()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.ws.rs.core.Response
handle(com.authlete.common.api.AuthleteApi api, IntrospectionRequestHandler.Params params)
Handle an introspection request.javax.ws.rs.core.Response
handle(com.authlete.common.api.AuthleteApi api, javax.ws.rs.core.MultivaluedMap<String,String> parameters)
Handle an introspection request.-
Methods inherited from class com.authlete.jaxrs.BaseEndpoint
extractClientCertificate, extractClientCertificateChain, extractHeadersAsPairs, onError, takeAttribute
-
-
-
-
Method Detail
-
handle
public javax.ws.rs.core.Response handle(com.authlete.common.api.AuthleteApi api, javax.ws.rs.core.MultivaluedMap<String,String> parameters)
Handle an introspection request. This method is an alias of thehandle(AuthleteApi, IntrospectionRequestHandler.Params)
method.- Parameters:
api
- An implementation ofAuthleteApi
.parameters
- Request parameters of an introspection request.- Returns:
- A response that should be returned to the resource server.
-
handle
public javax.ws.rs.core.Response handle(com.authlete.common.api.AuthleteApi api, IntrospectionRequestHandler.Params params)
Handle an introspection request.This method internally creates an
IntrospectionRequestHandler
instance and calls itshandle()
method with theparams
argument. Then, this method uses the value returned from thehandle()
method as a response from this method.When
IntrospectionRequestHandler.handle()
method raises aWebApplicationException
, this method callsonError()
method with the exception. The default implementation ofonError()
does nothing. You can override the method as necessary. After callingonError()
method, this method callsgetResponse()
method of the exception and uses the returned value as a response from this method.- Parameters:
api
- An implementation ofAuthleteApi
.params
- Parameters needed to handle the introspection request.- Returns:
- A response that should be returned to the resource server.
- Since:
- 2.63
-
-