Skip to main content

Update an Authentication Realm

PUT Update an Authentication Realm

https://useast.api.elasticpath.com/v2/authentication-realms/:id

Parameters

Path parameters

NameRequiredTypeDescription
idRequiredstringThe ID for the requested authentication realm.

Headers

NameRequiredTypeDescription
AuthorizationRequiredstringThe Bearer token required to get access to the API.

Body

NameRequiredTypeDescription
typeRequiredstringThe type of the object returned.
nameOptionalstringThe name of the authentication realm.
redirect_urisOptionalarrayAn array of Storefront URIs that can start Single Sign On authentication. These URIs must follow the rules for redirection endpoints in OAuth 2.0. All URIs must start with https:// except for http://localhost.
duplicate_email_policyOptionalstringThe values permitted for this parameter are, allowed or api_only. In Single Sign On (SSO) each user in the Identity Provider (IdP) has a unique identifier, but different IdPs might differ in whether distinct users can share the same email address. For the allowed setting, when a user with a new unique identifier signs in through SSO for the first time, the system creates a new user. However, for the api_only setting, the system assigns the new unique identifier to the existing user in the system, in this case both the old and new unique identifier from the IdP points to the same user in Commerce. The api_only setting is recommended only when all configured identity providers treat e-mail address as a unique identifier for the user, otherwise a user might get access to another user’s account and data. Thus the api_only value can simplify administration of users.

Request Example

curl -X PUT https://useast.api.elasticpath.com/v2/authentication-realms/:id \
-H "Authorization: Bearer XXXX" \
-H "Content-Type: application/json" \
-d $'{
"data": {
"duplicate_email_policy": "allowed",
"type": "authentication-realm",
"name": "Updated Test Authentication Realm",
"redirect_uris": [
"https://example.com"
]
}
}'

Response Example

200 OK

{
"data": {
"id": "40086652-2779-45f0-8ea6-ae630dfd13cb",
"meta": {
"created_at": "2020-11-04T21:28:50.796Z",
"updated_at": "2020-11-04T21:58:50.270Z"
},
"name": "Updated Test Authentication Realm",
"redirect_uris": [
"https://example.com"
],
"relationships": {
"origin": {
"data": {
"id": "88888888-4444-4333-8333-111111111111",
"type": "customer-authentication-settings"
}
}
},
"duplicate_email_policy": "allowed",
"type": "authentication-realm"
},
"links": {
"self": "https://useast.api.elasticpath.com/v2/authentication-realms/40086652-2779-45f0-8ea6-ae630dfd13cb"
}
}