code: public String createToken(final Map<String, Object> claims) {
          final JwtBuilder jwtBuilder = Jwts.builder();
          jwtBuilder.setClaims(claims);
          return jwtBuilder.signWith(SignatureAlgorithm.HS256, key).compact();
      }
docs: Creates a new JWT for the specified principal. Token is signed using
  the SecretKey with an HMAC 256 algorithm.
  
  @param claims a Map of all claims
  @return a String representation of the generated token
  @since 1.0.0