public String generateToken(Object object, int expiration) {
String payload, token;
try {
JwtSigner jwtSigner = new JwtSigner();
payload = new ObjectMapper().writeValueAsString(object);
ClaimSet claimSet = new ClaimSet();
claimSet.setExp(expiration); // expire in 1 year
token = jwtSigner.encode(Algorithm.HS256, payload, "payload", new String(Base64.decodeBase64(clientSecret)), claimSet);
} catch (JsonProcessingException e) {
throw new Auth0RuntimeException(e);
} catch (Exception e) {
throw new Auth0RuntimeException(e);