Social User Claim Stage
This stage enables an existing managed user to claim a social identity. The stage obtains a CLIENT_TOKEN
from some social identity provider. That token includes the following data:
OAuth token
Identity provider name
Renewal token
Expiration date
Using the CLIENT_TOKEN
, the stage retrieves the user profile from the social identity provider and normalizes the profile into a user object (using the regular normalization mapping for social identity providers). For more information on this mapping, see "Many Social Identity Providers, One Schema".
If the stage is unable to retrieve the user profile, or unable to normalize it using the mapping, it exits with an exception. It does not return any missing requirements.
When the user profile has been normalized, the stage attempts to identify any existing managed users that match the profile. If there are no matches, it simply advances to the next stage in the process. If it finds a match, it extracts the existing managed object and returns that as a new set of requirements.
The new requirement is that the user must provide their password
, either their managed/user password, or the password to another social identity provider, if they registered through a separate identity provider.
The stage then does the following:
Verifies the login
Creates a
managed/idp
object for the userEstablishes a relationship between the managed object and the idp object
Puts
OAUTH_LOGIN:true
intostate
Puts a
claimedProfile
containing the URL of the managed object that was claimed intosuccessAdditions
- Example configuration
{ "name" : "socialUserClaim", "identityServiceUrl" : "managed/user", "claimQueryFilter" : "/mail eq \"{{mail}}\"" },
- Dependencies
This stage has no dependencies on previous or subsequent stages and can occur anywhere in a process.
- Required Parameters
identityServiceUrl
- the managed object type against which the stage verifies the profile.claimQueryFilter
- the query filter that is used to locate the managed object from the social identity provider profile.Notice the double-brace notation in preceding example
"claimQueryFilter" : "/mail eq \"{{mail}}\""
. This notation indicates that the named property from the user object instate
is substituted for the double-braced value. In this example,{{mail}}
would become the value of themail
property of the user instate
, such asbjensen@example.com
, if that was in the user instate
. You can use this notation with any user property.