Convert a SAML token to JWT

本秂侑毒 提交于 2019-12-01 08:22:45

问题


I am trying to connect to ACS using a SAML token, problem is ACS has been configured to only accept JWT tokens. What is the best way to convert SAML to JWT?

thanks


回答1:


You should ask your IDP to provide the JWT token as a SAML attribute inside your current SAML tokens, or ask them to provide you with an alternative way of acquiring the JWT tokens you require.

The SAML token (typically a SAML assertion) is usually issued by an identity provider (IDP) and digitally signed - so that the relaying parties can verify authenticity of the token. This means that you cannot convert token from SAML to JWT, as you will be unable to create a new signature on behalf of your IDP.

The JWT specification contains a good explanation of difference between SAML and JWT tokens, you might want to go through it:

While JWTs can do some of the things SAML assertions do, JWTs are not intended as a full replacement for SAML assertions, but rather as a token format to be used when ease of implementation or compactness are considerations.

I'm presuming here that you are not self-issuing your SAML tokens, as in such a case you wouldn't need to convert them - you could create your own JWT token directly.



来源:https://stackoverflow.com/questions/25385461/convert-a-saml-token-to-jwt

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!