public class JWTTokenUtil
extends Object
Modifier and Type | Method and Description |
---|---|
static String |
convertTimeInLongToDate(long time) |
static Map<String,Object> |
decodeJWT(String token) |
static String |
getSignedJWT(String agentId,
Date issuedAt,
Date notBefore,
Date expiryAt,
String tenant,
String[] schema,
String audience,
Agent.SecurityProfileEnum securityProfile,
Object encryptionKey) |
static String |
getSignedJWTWithDefaultConfiguration(String agentId,
String tenant,
Agent.SecurityProfileEnum profile,
Object encrytionKey) |
static boolean |
isTokenValid(String token) |
static boolean |
verifyJWTToken(String token,
String agentId,
RSAPublicKey publicKey) |
public static String getSignedJWT(String agentId, Date issuedAt, Date notBefore, Date expiryAt, String tenant, String[] schema, String audience, Agent.SecurityProfileEnum securityProfile, Object encryptionKey) throws MindsphereClientException
MindsphereClientException
public static String getSignedJWTWithDefaultConfiguration(String agentId, String tenant, Agent.SecurityProfileEnum profile, Object encrytionKey) throws MindsphereClientException
MindsphereClientException
public static Map<String,Object> decodeJWT(String token) throws MindsphereClientException
MindsphereClientException
public static boolean isTokenValid(String token) throws MindsphereClientException
MindsphereClientException
public static String convertTimeInLongToDate(long time)
public static boolean verifyJWTToken(String token, String agentId, RSAPublicKey publicKey)