All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.nimbusds.oauth2.sdk.TokenIntrospectionResponse Maven / Gradle / Ivy

Go to download

OAuth 2.0 SDK with OpenID Connection extensions for developing client and server applications.

There is a newer version: 11.21
Show newest version
package com.nimbusds.oauth2.sdk;


import com.nimbusds.oauth2.sdk.http.HTTPResponse;


/**
 * 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). *
*/ public abstract class TokenIntrospectionResponse implements Response { /** * Parses a token introspection response from the specified HTTP * response. * * @param httpResponse The HTTP response. Must not be {@code null}. * * @return The token introspection success or error response. * * @throws ParseException If the HTTP response couldn't be parsed to a * token introspection response. */ public static TokenIntrospectionResponse parse(final HTTPResponse httpResponse) throws ParseException { if (httpResponse.getStatusCode() == HTTPResponse.SC_OK) { return TokenIntrospectionSuccessResponse.parse(httpResponse); } else { return TokenIntrospectionErrorResponse.parse(httpResponse); } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy