Examples of JWSAlgorithm


Examples of com.nimbusds.jose.JWSAlgorithm

  public void testUnsupportedJWSAlg() {

    AuthorizationCode code = new AuthorizationCode();

    assertNull(CodeHash.compute(code, new JWSAlgorithm("no-such-alg")));
  }
View Full Code Here

Examples of com.nimbusds.jose.JWSAlgorithm

        if (v != null && v.equals(Algorithm.NONE.getName()))
          throw new ParseException("The none algorithm is not accepted");
       
        if (v != null)
          op.tokenEndpointJWSAlgs.add(new JWSAlgorithm(v));
      }
    }
   
   
    // OpenID Connect request object

    if (jsonObject.containsKey("request_object_signing_alg_values_supported")) {

      op.requestObjectJWSAlgs = new ArrayList<>();

      for (String v: JSONObjectUtils.getStringArray(jsonObject, "request_object_signing_alg_values_supported")) {

        if (v != null)
          op.requestObjectJWSAlgs.add(new JWSAlgorithm(v));
      }
    }


    if (jsonObject.containsKey("request_object_encryption_alg_values_supported")) {

      op.requestObjectJWEAlgs = new ArrayList<>();

      for (String v: JSONObjectUtils.getStringArray(jsonObject, "request_object_encryption_alg_values_supported")) {

        if (v != null)
          op.requestObjectJWEAlgs.add(new JWEAlgorithm(v));
      }
    }


    if (jsonObject.containsKey("request_object_encryption_enc_values_supported")) {

      op.requestObjectJWEEncs = new ArrayList<>();

      for (String v: JSONObjectUtils.getStringArray(jsonObject, "request_object_encryption_enc_values_supported")) {

        if (v != null)
          op.requestObjectJWEEncs.add(new EncryptionMethod(v));
      }
    }
   
   
    // ID token

    if (jsonObject.containsKey("id_token_signing_alg_values_supported")) {

      op.idTokenJWSAlgs = new ArrayList<>();

      for (String v: JSONObjectUtils.getStringArray(jsonObject, "id_token_signing_alg_values_supported")) {

        if (v != null)
          op.idTokenJWSAlgs.add(new JWSAlgorithm(v));
      }
    }


    if (jsonObject.containsKey("id_token_encryption_alg_values_supported")) {

      op.idTokenJWEAlgs = new ArrayList<>();

      for (String v: JSONObjectUtils.getStringArray(jsonObject, "id_token_encryption_alg_values_supported")) {

        if (v != null)
          op.idTokenJWEAlgs.add(new JWEAlgorithm(v));
      }
    }


    if (jsonObject.containsKey("id_token_encryption_enc_values_supported")) {

      op.idTokenJWEEncs = new ArrayList<>();

      for (String v: JSONObjectUtils.getStringArray(jsonObject, "id_token_encryption_enc_values_supported")) {

        if (v != null)
          op.idTokenJWEEncs.add(new EncryptionMethod(v));
      }
    }

    // UserInfo

    if (jsonObject.containsKey("userinfo_signing_alg_values_supported")) {

      op.userInfoJWSAlgs = new ArrayList<>();

      for (String v: JSONObjectUtils.getStringArray(jsonObject, "userinfo_signing_alg_values_supported")) {

        if (v != null)
          op.userInfoJWSAlgs.add(new JWSAlgorithm(v));
      }
    }


    if (jsonObject.containsKey("userinfo_encryption_alg_values_supported")) {
View Full Code Here

Examples of com.nimbusds.jose.JWSAlgorithm

   * @throws ParseException If parsing of the JWT claims set failed.
   */
  private ReadOnlyJWTClaimsSet verify(final SignedJWT signedJWT)
    throws JOSEException, ParseException {
   
    JWSAlgorithm alg = signedJWT.getHeader().getAlgorithm();
   
    JWSVerifier verifier = jwsVerifiers.get(alg);
   
    if (verifier == null) {

View Full Code Here

Examples of com.nimbusds.jose.JWSAlgorithm

      metadata.setRequestObjectURIs(requestURIs);
      oidcFields.remove("request_uris");
    }
   
    if (jsonObject.containsKey("request_object_signing_alg")) {
      metadata.setRequestObjectJWSAlg(new JWSAlgorithm(
        JSONObjectUtils.getString(jsonObject, "request_object_signing_alg")));

      oidcFields.remove("request_object_signing_alg");
    }

    if (jsonObject.containsKey("request_object_encryption_alg")) {
      metadata.setRequestObjectJWEAlg(new JWEAlgorithm(
        JSONObjectUtils.getString(jsonObject, "request_object_encryption_alg")));

      oidcFields.remove("request_object_encryption_alg");
    }

    if (jsonObject.containsKey("request_object_encryption_enc")) {
      metadata.setRequestObjectJWEEnc(new EncryptionMethod(
        JSONObjectUtils.getString(jsonObject, "request_object_encryption_enc")));

      oidcFields.remove("request_object_encryption_enc");
    }

    if (jsonObject.containsKey("token_endpoint_auth_signing_alg")) {
      metadata.setTokenEndpointAuthJWSAlg(new JWSAlgorithm(
        JSONObjectUtils.getString(jsonObject, "token_endpoint_auth_signing_alg")));

      oidcFields.remove("token_endpoint_auth_signing_alg");
    }

    if (jsonObject.containsKey("id_token_signed_response_alg")) {
      metadata.setIDTokenJWSAlg(new JWSAlgorithm(
        JSONObjectUtils.getString(jsonObject, "id_token_signed_response_alg")));

      oidcFields.remove("id_token_signed_response_alg");
    }

    if (jsonObject.containsKey("id_token_encrypted_response_alg")) {
      metadata.setIDTokenJWEAlg(new JWEAlgorithm(
        JSONObjectUtils.getString(jsonObject, "id_token_encrypted_response_alg")));

      oidcFields.remove("id_token_encrypted_response_alg");
    }

    if (jsonObject.containsKey("id_token_encrypted_response_enc")) {
      metadata.setIDTokenJWEEnc(new EncryptionMethod(
        JSONObjectUtils.getString(jsonObject, "id_token_encrypted_response_enc")));

      oidcFields.remove("id_token_encrypted_response_enc");
    }

    if (jsonObject.containsKey("userinfo_signed_response_alg")) {
      metadata.setUserInfoJWSAlg(new JWSAlgorithm(
        JSONObjectUtils.getString(jsonObject, "userinfo_signed_response_alg")));

      oidcFields.remove("userinfo_signed_response_alg");
    }
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.