oauth access token from SAML response?

谁说我不能喝 提交于 2019-12-06 11:10:49

问题


I have one demo application ,it configured SAML2.0 SSO with the WSO2 Identity Server.and also its working fine.Now i want to get oauth token from the SAML response.Is it possible to parse oauth token from the SAML response ,any sugession ?


回答1:


Yes. it is supported. You can send a SAML Assertion to the /token endpoint and receive a access token. Identity Server supports for SAML 2.0 Bearer Assertion Profiles and This has been implemented. Here you want to do a POST to the /token end point with Base64 url encoded SAML assertion. You can find more details from here. POST request would like following

curl -X POST -u "QlthIzYUOK5DS0BXW8Cy8uFJjKAa:XFfgPmTbMaQ5eScc0rSnAW9ZIgwa" -H "Content-Type: application/x-www-form-urlencoded;charset=UTF-8" -d "grant_type=urn:ietf:params:oauth:grant-type:saml2-bearer&assertion=PHNhbWxwOl...[omitted for brevity]...ZT4" https://{host}:{port}/oauth2/token



来源:https://stackoverflow.com/questions/22031525/oauth-access-token-from-saml-response

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