且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

saml客户端在keycloak中的客户端机密

更新时间:2022-03-22 20:39:30

在OpenID连接下,如果将客户端的"Acces Type"设置为机密"或仅承载者",则将出现一个新选项卡,称为"凭据",您会看到一个自动生成的秘密(可以重新生成").与令牌端点 HOST:PORT/auth/realms/YOUR-REALM/protocol/openid-connect/token 对话时,您需要为参数"client_secret"提供自动生成值刚看到(在您的密码,client_id,用户名和授予类型上).这将适用于OIDC,适用于您显示的SAML,我不确定它是否像OIDC一样工作,但是如果确实如此,应该非常相似.

Under OpenID connect,if you set your client's "Acces Type" to "confidential" or "bearer-only", then a new tab becomes available called "Credentials", there you'll see an auto-generated secret (that you can "re-generate"). When you talk to your token endpoint HOST:PORT/auth/realms/YOUR-REALM/protocol/openid-connect/token , you'll need to provide the param "client_secret" with the autogen value you just saw (on top of your password, client_id, username & grant_type). This will work for OIDC, for SAML like you show, I'm not sure if it works like OIDC, but if it does, should be pretty similar.

希望有帮助.