Package com.nimbusds.oauth2.sdk
Class TokenIntrospectionResponse
- java.lang.Object
-
- com.nimbusds.oauth2.sdk.TokenIntrospectionResponse
-
- Direct Known Subclasses:
TokenIntrospectionErrorResponse
,TokenIntrospectionSuccessResponse
public abstract class TokenIntrospectionResponse extends Object implements Response
Token introspection response. This is the base abstract class for token introspection success and error responses.Related specifications:
- OAuth 2.0 Token Introspection (RFC 7662).
-
-
Constructor Summary
Constructors Constructor Description TokenIntrospectionResponse()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static TokenIntrospectionResponse
parse(HTTPResponse httpResponse)
Parses a token introspection response from the specified HTTP response.TokenIntrospectionErrorResponse
toErrorResponse()
Casts this response to a token introspection error response.TokenIntrospectionSuccessResponse
toSuccessResponse()
Casts this response to a token introspection success response.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.nimbusds.oauth2.sdk.Response
indicatesSuccess, toHTTPResponse
-
-
-
-
Constructor Detail
-
TokenIntrospectionResponse
public TokenIntrospectionResponse()
-
-
Method Detail
-
toSuccessResponse
public TokenIntrospectionSuccessResponse toSuccessResponse()
Casts this response to a token introspection success response.- Returns:
- The token introspection success response.
-
toErrorResponse
public TokenIntrospectionErrorResponse toErrorResponse()
Casts this response to a token introspection error response.- Returns:
- The token introspection error response.
-
parse
public static TokenIntrospectionResponse parse(HTTPResponse httpResponse) throws ParseException
Parses a token introspection response from the specified HTTP response.- Parameters:
httpResponse
- The HTTP response. Must not benull
.- Returns:
- The token introspection success or error response.
- Throws:
ParseException
- If the HTTP response couldn't be parsed to a token introspection response.
-
-