KeyCloak公共密钥不是base64url编码
我从领域设置复制了公共密钥,并试图在
。
I copied public key from my realm settings and tried to validate in https://jwt.io. It says "Error: Looks like your JWT header is not encoded correctly using base64url". I am using the key to authenticate by sending it has client_assertion. Any help on how to get or generate correct JWT in Keycloak is so much appreciated
Header and Payload section is blank in jwt.io
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这是创建公共密钥并创建JWT
公共密钥和私钥将通过JWO.IO
令牌将在编码部分中生成
如果要从KeyCloak生成公共密钥。
它将是打印公开密钥
This is steps to create Public Key and create a JWT
the public key and private key will generate by JWO.io
the token will be generate in Encoded section
if you want to generate public key from Keycloak.
it will be print public key
我已经使用JJWT库编写了一个JAVA程序,以从JK-Keys-Generate新键和证书部分生成JKS文件中生成JWT,并能够在JWT.IO中验证JWT和签名。
I have written a Java program using JJWT library to generate JWT from the JKS file that is generated from Client-Keys-Generate new keys and certificate section and was able to validate JWT and signature in jwt.io