Map IdP user to Onezone user
Maps external IdP user id into internal user id in Onezone.
The user does not have to exist in Onezone or the IdP - this method merely transforms the Id using a deterministic procedure. It can be used to predict the user Id in Onezone before it is created.
This operation has public access.
Example cURL requests
Map IdP user to Onezone user
curl -H 'Content-type: application/json' \
-d '{"idp": "elixir", "userId": "dqs1ew2afn9q28rnweu8fb23r9jqwtfg"}' \
-X POST https://onezone.example.com/api/v3/onezone/provider/public/map_idp_user
{
"userId": "0fe7c8a20ffdf07480c46f084bc3b8d5"
}
Request body
Mapping parameters
| Property | Type & Description |
|---|---|
ipd string External IdP (identity provider). | |
userId string UserId in given IdP. | |
Request Examples
onezone-rest-cli mapIdpUser ipd==elixir userId==elixir:membersResponses
The user Id in external IdP.
| Property | Type & Description |
|---|---|
userId string Internal user Id in Onezone. | |
Example
{
"userId": "0fe7c8a20ffdf07480c46f084bc3b8d5"
}Invalid request.
| Property | Type & Description | ||||||
|---|---|---|---|---|---|---|---|
error object Object describing an error.
| |||||||
Example
{
"error": {
"id": "badValueString",
"details": {
"key": "name"
},
"description": "Bad value: provided \"name\" must be a string."
}
}Authentication error.
| Property | Type & Description | ||||||
|---|---|---|---|---|---|---|---|
error object Object describing an error.
| |||||||
Example
{
"error": {
"id": "badValueString",
"details": {
"key": "name"
},
"description": "Bad value: provided \"name\" must be a string."
}
}Authorization error.
| Property | Type & Description | ||||||
|---|---|---|---|---|---|---|---|
error object Object describing an error.
| |||||||
Example
{
"error": {
"id": "badValueString",
"details": {
"key": "name"
},
"description": "Bad value: provided \"name\" must be a string."
}
}Resource not found.
| Property | Type & Description | ||||||
|---|---|---|---|---|---|---|---|
error object Object describing an error.
| |||||||
Example
{
"error": {
"id": "badValueString",
"details": {
"key": "name"
},
"description": "Bad value: provided \"name\" must be a string."
}
}Internal server Error.
| Property | Type & Description | ||||||
|---|---|---|---|---|---|---|---|
error object Object describing an error.
| |||||||
Example
{
"error": {
"id": "badValueString",
"details": {
"key": "name"
},
"description": "Bad value: provided \"name\" must be a string."
}
}