Examples of JWTToken


Examples of org.apache.hadoop.gateway.services.security.token.impl.JWTToken

   
    String header = ((HttpServletRequest) request).getHeader("Authorization");
    if (header != null && header.startsWith(BEARER)) {
      // what follows the bearer designator should be the JWT token being used to request or as an access token
      String wireToken = header.substring(BEARER.length());
      JWTToken token = JWTToken.parseToken(wireToken);
      // ensure that there is a valid jwt token available and that there isn't a misconfiguration of filters
      if (token != null) {
        authority.verifyToken(token);
      }
      else {
View Full Code Here

Examples of org.apache.hadoop.gateway.services.security.token.impl.JWTToken

      public String getName() {
        // TODO Auto-generated method stub
        return principalName;
      }
    };
    JWTToken token = authority.issueToken(p, serviceName, "RS256");
    accessToken = token.toString();
   
    return accessToken;
  }
View Full Code Here

Examples of org.apache.hadoop.gateway.services.security.token.impl.JWTToken

    }
    claimArray[2] = audience;
    // TODO: make the validity period configurable
    claimArray[3] = Long.toString( ( System.currentTimeMillis()/1000 ) + 300);

    JWTToken token = null;
    if ("RS256".equals(algorithm)) {
      token = new JWTToken("RS256", claimArray);
      signToken(token);
    }
    else {
      // log inappropriate 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.