Package com.nimbusds.oauth2.sdk

Examples of com.nimbusds.oauth2.sdk.ResponseType


    try {
      return JWTParser.parse(content);
     
    } catch (java.text.ParseException e) {
   
      throw new ParseException(e.getMessage(), e);
    }
  }
View Full Code Here


    try {
      return new URI(getGeneric(o, key, String.class));

    } catch (URISyntaxException e) {

      throw new ParseException(e.getMessage(), e);
    }
  }
View Full Code Here

    try {
      return new URL(getGeneric(o, key, String.class));
     
    } catch (MalformedURLException e) {
   
      throw new ParseException(e.getMessage(), e);
    }
  }
View Full Code Here

     
      return new InternetAddress(getGeneric(o, key, String.class), strict);
     
    } catch (AddressException e) {
   
      throw new ParseException(e.getMessage(), e);
    }
  }
View Full Code Here

    try {
      return list.toArray(new String[0]);

    } catch (ArrayStoreException e) {

      throw new ParseException("JSON object member with key \"" + key + "\" is not an array of strings");
    }
  }
View Full Code Here

      try {
        set.add((String)item);

      } catch (Exception e) {

        throw new ParseException("JSON object member wit key \"" + key + "\" is not an array of strings");
      }

    }

    return set;
View Full Code Here

  public void testParseError()
    throws Exception {

    URI redirectURI = new URI("https://example.com/in");
    ResponseType rt = new ResponseType(ResponseType.Value.CODE);
    State state = new State("xyz");

    AuthenticationErrorResponse errorResponse = new AuthenticationErrorResponse(redirectURI, OAuth2Error.ACCESS_DENIED, rt, state);

    HTTPResponse httpResponse = errorResponse.toHTTPResponse();
View Full Code Here

    ClaimsRequest cr = new ClaimsRequest();
    cr.addIDTokenClaim(new ClaimsRequest.Entry("email", ClaimRequirement.ESSENTIAL));

    AuthenticationRequest authRequest = new AuthenticationRequest.Builder(
      new ResponseType("code"),
      new Scope("openid", "email"),
      new ClientID("123"),
      new URI("https://client.com/cb")).claims(cr).build();

    ClaimsRequest claimsRequest = ClaimsRequest.resolve(authRequest);
View Full Code Here

    assertTrue(scopes.contains(OIDCScopeValue.OFFLINE_ACCESS));
    assertEquals(6, scopes.size());
   
    List<ResponseType> rts = op.getResponseTypes();
    // [\"code\", \"code id_token\", \"id_token\", \"token id_token\"]
    ResponseType rt1 = new ResponseType();
    rt1.add(ResponseType.Value.CODE);
    assertTrue(rts.contains(rt1));
   
    ResponseType rt2 = new ResponseType();
    rt2.add(ResponseType.Value.CODE);
    rt2.add(OIDCResponseTypeValue.ID_TOKEN);
    assertTrue(rts.contains(rt2));
   
    ResponseType rt3 = new ResponseType();
    rt3.add(OIDCResponseTypeValue.ID_TOKEN);
    assertTrue(rts.contains(rt3));
   
    ResponseType rt4 = new ResponseType();
    rt4.add(ResponseType.Value.TOKEN);
    rt4.add(OIDCResponseTypeValue.ID_TOKEN);
    assertTrue(rts.contains(rt4));
   
    assertEquals(4, rts.size());
   
    List<ACR> acrValues = op.getACRs();
View Full Code Here

    meta.setScopes(Scope.parse("openid email profile"));
    assertTrue(Scope.parse("openid email profile").containsAll(meta.getScopes()));

    List<ResponseType> responseTypes = new LinkedList<>();
    ResponseType rt1 = new ResponseType();
    rt1.add(ResponseType.Value.CODE);
    responseTypes.add(rt1);
    meta.setResponseTypes(responseTypes);
    responseTypes = meta.getResponseTypes();
    assertEquals(ResponseType.Value.CODE, responseTypes.iterator().next().iterator().next());
    assertEquals(1, responseTypes.size());
View Full Code Here

TOP

Related Classes of com.nimbusds.oauth2.sdk.ResponseType

Copyright © 2018 www.massapicom. 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.