Javascript

Caused by: io.jsonwebtoken.security.WeakKeyException: The specified key byte array is 224 bits which

本文主要是介绍Caused by: io.jsonwebtoken.security.WeakKeyException: The specified key byte array is 224 bits which,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!

Caused by: io.jsonwebtoken.security.WeakKeyException: The specified key byte array is 224 bits which is not secure enough for any JWT HMAC-SHA algorithm.  The JWT JWA Specification (RFC 7518, Section 3.2) states that keys used with HMAC-SHA algorithms MUST have a size >= 256 bits (the key size must be greater than or equal to the hash output size).  Consider using the io.jsonwebtoken.security.Keys#secretKeyFor(SignatureAlgorithm) method to create a key guaranteed to be secure enough for your preferred HMAC-SHA algorithm.  See https://tools.ietf.org/html/rfc7518#section-3.2 for more information.

 

翻译之后:

 

配置的base64-secret长度不够,目前是224位,需要的长度必须大于等于256位,增加加密字符串长度即可

这篇关于Caused by: io.jsonwebtoken.security.WeakKeyException: The specified key byte array is 224 bits which的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!