Class: AmidoProfileService

AmidoProfileService

new AmidoProfileService(config) → {AmidoProfileService}

Instantiate an instance of the profile service SDK
Parameters:
Name Type Description
config
Properties:
Name Type Description
subscriptionKey string
Source:
Returns:
Type
AmidoProfileService

Methods

createIdentityUser(profile) → {Promise}

Create a new user profile with their identity provider, defined by the identityProvider set in the constructor (if provided)
Parameters:
Name Type Description
profile the profile to save
Source:
Returns:
- resolved with the profile if successful
Type
Promise

createProfile(userId, realm, delegateToken, profile) → {Promise}

Create a profile for an existing user within the specified realm
Parameters:
Name Type Description
userId the user's ID
realm the realm to create the profile
delegateToken the user's access token to authorize with the API
profile the JSON profile to save
Source:
Returns:
- resolved with the profile if successful.
Type
Promise

getFieldsets(realm, screenName) → {Promise}

Get the schema for a given field set
Parameters:
Name Type Description
realm string
screenName string name of fieldset to load
Source:
Returns:
- Resolved with the fieldset
Type
Promise

getNestedProfile(userId, realm, delegateToken) → {Promise}

Return a user's nested profile. If a user's profile has a parent profile, will also be returned.
Parameters:
Name Type Description
userId the user's ID
realm the realm to create the profile
delegateToken the user's access token to authorize with the API
Source:
Returns:
- resolved with the user's nested profile
Type
Promise

getProfile(userId, realm, delegateToken) → {Promise}

Get a user's profile for a specific schema
Parameters:
Name Type Description
userId the user's ID
realm the realm to create the profile
delegateToken the user's access token to authorize with the API
Source:
Returns:
- resolved with the user's profile
Type
Promise

updateIdentityUser(userId, profile) → {Promise}

Update a user's profile for their identity provider, defined by the identityProvider set in the constructor (if provided)
Parameters:
Name Type Description
userId the user's ID
profile the profile to update
Source:
Returns:
- resolved with the profile if successful
Type
Promise

updateProfile(userId, realm, delegateToken, profile) → {Promise}

Update the profile of an existing user within the specified realm
Parameters:
Name Type Description
userId the user's ID
realm the realm to create the profile
delegateToken the user's access token to authorize with the API
profile the JSON profile to save
Source:
Returns:
- resolved with the profile if successful.
Type
Promise