Reputation: 3753
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 ?
Upvotes: 2
Views: 3425
Reputation: 5821
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] 1. 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
Upvotes: 4