Examples of toHTTPResponse()


Examples of com.nimbusds.oauth2.sdk.TokenErrorResponse.toHTTPResponse()

  public void testParseError()
    throws Exception {

    TokenErrorResponse response = new TokenErrorResponse(OAuth2Error.INVALID_GRANT);

    HTTPResponse httpResponse = response.toHTTPResponse();

    TokenResponse tokenResponse = OIDCTokenResponseParser.parse(httpResponse);

    assertTrue(tokenResponse instanceof TokenErrorResponse);
View Full Code Here

Examples of com.nimbusds.oauth2.sdk.client.ClientRegistrationErrorResponse.toHTTPResponse()

  public void testParseError()
    throws Exception {

    ClientRegistrationErrorResponse response = new ClientRegistrationErrorResponse(BearerTokenError.INVALID_TOKEN);

    HTTPResponse httpResponse = response.toHTTPResponse();

    ClientRegistrationResponse regResponse = OIDCClientRegistrationResponseParser.parse(httpResponse);

    response = (ClientRegistrationErrorResponse)regResponse;
    assertEquals(BearerTokenError.INVALID_TOKEN.getCode(), response.getErrorObject().getCode());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.