Package com.nimbusds.jose.crypto

Examples of com.nimbusds.jose.crypto.MACVerifier


        if (jwk.isPrivate()) { // technically redundant check because all HMAC keys are private
          MACSigner signer = new MACSigner(((OctetSequenceKey) jwk).toByteArray());
          signers.put(id, signer);
        }

        MACVerifier verifier = new MACVerifier(((OctetSequenceKey) jwk).toByteArray());
        verifiers.put(id, verifier);

      } else {
        logger.warn("Unknown key type: " + jwk);
      }
View Full Code Here


    request = OIDCClientRegistrationRequest.parse(httpRequest);

    assertEquals("https://client.com/in", request.getClientMetadata().getRedirectionURIs().iterator().next().toString());
    assertEquals("Test App", request.getClientMetadata().getName());
    assertEquals(jwt.serialize(), request.getSoftwareStatement().getParsedString());
    assertTrue(request.getSoftwareStatement().verify(new MACVerifier("abcdef1234567890")));
  }
View Full Code Here

    jwt = clientSecretJWT.getClientAssertion();

    assertTrue(jwt.getState().equals(JWSObject.State.SIGNED));

    MACVerifier verifier = new MACVerifier(secret.getValueBytes());

    boolean verified = jwt.verify(verifier);

    assertTrue(verified);
View Full Code Here

    request = ClientRegistrationRequest.parse(httpRequest);

    assertEquals("https://client.com/in", request.getClientMetadata().getRedirectionURIs().iterator().next().toString());
    assertEquals("Test App", request.getClientMetadata().getName());
    assertEquals(jwt.serialize(), request.getSoftwareStatement().getParsedString());
    assertTrue(request.getSoftwareStatement().verify(new MACVerifier("abcdef1234567890")));
  }
View Full Code Here

      return;
    }
   
    System.out.println("JWS object successfully parsed");
   
    JWSVerifier verifier = new MACVerifier(sharedKey.getBytes());
   
    boolean verifiedSignature = false;
   
    try {
      verifiedSignature = jwsObject.verify(verifier);
View Full Code Here

TOP

Related Classes of com.nimbusds.jose.crypto.MACVerifier

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.