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
External IdP (identity provider).
UserId in given IdP.
Request Examples
onezone-rest-cli mapIdpUser ipd==elixir userId==elixir:membersResponses
The user Id in external IdP.
Internal user Id in Onezone.
Example
{
"userId": "0fe7c8a20ffdf07480c46f084bc3b8d5"
}Invalid request.
error object Object describing an error.
Object describing an error.
String identifying the error type. Does not change between error instances.
Human readable error description. May contain information specific to given error instance.
Details about the error instance. The object schema is specific to each error type.
Example
{
"error": {
"id": "badValueString",
"details": {
"key": "name"
},
"description": "Bad value: provided \"name\" must be a string."
}
}Authentication error.
error object Object describing an error.
Object describing an error.
String identifying the error type. Does not change between error instances.
Human readable error description. May contain information specific to given error instance.
Details about the error instance. The object schema is specific to each error type.
Example
{
"error": {
"id": "badValueString",
"details": {
"key": "name"
},
"description": "Bad value: provided \"name\" must be a string."
}
}Authorization error.
error object Object describing an error.
Object describing an error.
String identifying the error type. Does not change between error instances.
Human readable error description. May contain information specific to given error instance.
Details about the error instance. The object schema is specific to each error type.
Example
{
"error": {
"id": "badValueString",
"details": {
"key": "name"
},
"description": "Bad value: provided \"name\" must be a string."
}
}Resource not found.
error object Object describing an error.
Object describing an error.
String identifying the error type. Does not change between error instances.
Human readable error description. May contain information specific to given error instance.
Details about the error instance. The object schema is specific to each error type.
Example
{
"error": {
"id": "badValueString",
"details": {
"key": "name"
},
"description": "Bad value: provided \"name\" must be a string."
}
}Internal server Error.
error object Object describing an error.
Object describing an error.
String identifying the error type. Does not change between error instances.
Human readable error description. May contain information specific to given error instance.
Details about the error instance. The object schema is specific to each error type.
Example
{
"error": {
"id": "badValueString",
"details": {
"key": "name"
},
"description": "Bad value: provided \"name\" must be a string."
}
}