Package com.auth0.jwt

Examples of com.auth0.jwt.JWTVerifier.verify()


   
    Map<String, Object> verify;
    try {

      verify = jwtVerifier.verify(token);
      String payload = (String) verify.get("$");
      @SuppressWarnings("unchecked")
      Map<String, String> map = new ObjectMapper().readValue(payload, Map.class);
      return map;
View Full Code Here


   */
  public Object decode(Algorithm algorithm, String token, String secret)
      throws Exception {
   
    JWTVerifier jwtVerifier = new JWTVerifier(Base64.encodeBase64String(secret.getBytes()));
    Map<String, Object> verify = jwtVerifier.verify(token);
    String payload = (String) verify.get(PAYLOAD_ID);
   
    return getPayloadHandler().decoding(payload);
  }
}
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.