0
votes

I am new in using wso2 identity server.

My question is:

Step-1: I using travelocity.com application.

Step-2: I have create two identity provider For Gmail and Facebook.

Step-3: Then i have create one Service Provider.

In Service Provider select "Local & Outbound Authentication Configuration".

In "Authentication Type" select "Advanced Configuration" and mapped "Local Authenticators" and "Federated Authenticators".

In Local Authenticators i have select "basic".

In "Federated Authenticators" i have select both "FacebookIDP" and "GmailIDP".

Step 4: But after Authentication from "Facebook" or "Gmail" i have to check that From which Identity Provider i have logged in travelocity.com either by Facebook or Gmail.

So i need their domain-name or anything else which identify whether it was Facebook account or Gmail account by which i logged in travelocity.com.

After authentication how i will find from which domain i got authenticate if both identity provider(Facebook and Gmail) having same email id. Because use of that domain i will check my database is this domain can i have permission or not to authenticate.

So How to get domain name after authentication from Focebook or Gmail account using wso2 identity server?

1

1 Answers

0
votes

enter image description herecheck Always send back the authenticated list of identity providers from Service provider -> Local & Outbound Authentication Configuration 1. By checking above you will get list of authenticated idps as a JWT in AuthenticatedIdPs param. You can use https://jwt.io/ to decode it. Have a look below sample. Also have a look [2].

{ "iss": "wso2", "exp": 15526220351213000, "iat": 1552622035121, "idps": [ { "idp": "LOCAL", "authenticator": "BasicAuthenticator" } ] }

1 https://docs.wso2.com/display/IS570/Configuring+Local+and+Outbound+Authentication+for+a+Service+Provider

[2] Return Home Realm Identifier WSO2 Identity Server