Dusan
Dusan

Reputation: 276

WSO2 Identity Server 5.3.0 - How to get federated authenticator ID

With some federated authenticator, let's say Facebook, after redirect back to Service Provider, how can I determine which federated authenticator got invoked?

I see that commonauth is invoked with https://localhost:9443/commonauth?idp=facebook&authenticator=FacebookAuthenticator&sessionDataKey=faaad26e-8bde-4a14-a865-c40546c4e22f, but what I should do next to forward those variables to my service provider?

Upvotes: 0

Views: 286

Answers (1)

Maduranga Siriwardena
Maduranga Siriwardena

Reputation: 1361

Enable "Always send back the authenticated list of identity providers" in "Local & Outbound Authentication Configuration" of the service provider configuration in WSO2 Identity Server.

enter image description here

When you enable this option, you will receive a parameter called "AuthenticatedIdPs" with the login response. Base64 decode the received value to get list of authenticated idps. Below is a base64 decoded sample value.

{
   "typ":"JWT",
   "alg":"none"
}{
   "iss":"wso2",
   "exp":15119303538293000,
   "iat":1511930353829,
   "idps":[
      {
         "idp":"LOCAL",
         "authenticator":"BasicAuthenticator"
      }
   ]
}

Refer https://docs.wso2.com/display/IS530/Configuring+Local+and+Outbound+Authentication+for+a+Service+Provider for more information.

Upvotes: 2

Related Questions