java.lang.IllegalArgumentException: The shared secret size must be at least 256 bits using iloveapis2015-jwt-jwe-jws jwt_signed create-hs256

Not applicable

I want to use JWT access tokens with OAuth 2.0. Downloaded iloveapis2015-jwt-jwe-jws from GitHub, and deployed the jwt_signed sample using apigee edge. The deployment succeeded but attempting to POST the jtw_signed/create-HS256, I received:

"jwt_error": "jwt_error", "message": "com.google.common.util.concurrent.UncheckedExecutionException: java.lang.IllegalArgumentException: The shared secret size must be at least 256 bits",

Any suggestions.

0 1 1,764
1 REPLY 1

Yes, you must use a "secret-key" that is at least 32 characters long.

For example:

secret01234567890ABCDEFGHIJKLMNO

See also, this question and answer.