Package com.nimbusds.oauth2.sdk.id

Examples of com.nimbusds.oauth2.sdk.id.Subject


    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 static void ensureContentType(final ContentType expected, final ContentType found)
    throws ParseException {
 
    if (found == null)
      throw new ParseException("Missing HTTP Content-Type header");
   
    if (! expected.match(found))
      throw new ParseException("The HTTP Content-Type header must be " + expected);
  }
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

  @Override
  public void applyTo(final HTTPRequest httpRequest)
    throws SerializeException {
 
    if (httpRequest.getMethod() != HTTPRequest.Method.POST)
      throw new SerializeException("The HTTP request method must be POST");
   
    ContentType ct = httpRequest.getContentType();
   
    if (ct == null)
      throw new SerializeException("Missing HTTP Content-Type header");
   
    if (! ct.match(CommonContentTypes.APPLICATION_URLENCODED))
      throw new SerializeException("The HTTP Content-Type header must be " + CommonContentTypes.APPLICATION_URLENCODED);
   
    Map <String,String> params = httpRequest.getQueryParameters();
   
    params.putAll(toParameters());
   
View Full Code Here

    try {
      params.put("client_assertion", clientAssertion.serialize());
   
    } catch (IllegalStateException e) {
   
      throw new SerializeException("Couldn't serialize JWT to a client assertion string: " + e.getMessage(), e);
   
   
    params.put("client_assertion_type", CLIENT_ASSERTION_TYPE);
   
    return params;
View Full Code Here

TOP

Related Classes of com.nimbusds.oauth2.sdk.id.Subject

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.