@ SneakyThrows public static Key generateJsonWebKey ( final String secret ) { val keys = new HashMap < String , Object > ( 2 ) ; keys . put ( "kty" , "oct" ) ; keys . put ( EncodingUtils . JSON_WEB_KEY , secret ) ; val jwk = JsonWebKey . Factory . newJwk ( keys ) ; return jwk . getKey ( ) ; }
Prepare json web token key .