Package org.springframework.security.jwt.crypto.sign

Examples of org.springframework.security.jwt.crypto.sign.SignatureVerifier


      throw new InvalidTokenException("Cannot convert access token to JSON", e);
    }
  }

  public void afterPropertiesSet() throws Exception {
    SignatureVerifier verifier = new MacSigner(verifierKey);
    try {
      verifier = new RsaVerifier(verifierKey);
    }
    catch (Exception e) {
      logger.warn("Unable to create an RSA verifier from verifierKey (ignoreable if using MAC)");
    }
    // Check the signing and verification keys match
    if (signer instanceof RsaSigner) {
      byte[] test = "test".getBytes();
      try {
        verifier.verify(test, signer.sign(test));
        logger.info("Signing and verification RSA keys match");
      }
      catch (InvalidSignatureException e) {
        logger.error("Signing and verification RSA keys do not match");
      }
View Full Code Here

TOP

Related Classes of org.springframework.security.jwt.crypto.sign.SignatureVerifier

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.