SCIM OTP devices Workflows examples
Workflow 1Examples
Workflow 1
1. Create an Email OTP and send it to the user
Create an Email OTP
device
Request
GET http://<your-domain>/soffid/webservice/scim2/v1/OtpDevice
JSON
{
"type": "EMAIL",
"user": "dilbert",
"email": "dilbert@soffid.com"
}
Response Response 200 OK
{
"created": "2022-03-09 13:39:52",
"meta": {
"location": "http://soffid.pat.lab:8080/soffid/webservice/scim2/v1/OtpDevice/5099461",
"resourceType": "OtpDevice"
},
"schemas": [
"urn:soffid:com.soffid.iam.addons.otp.common.OtpDevice"
],
"name": "Email message to di*****@so****.co*",
"id": 5099461,
"type": "EMAIL",
"user": "dilbert",
"fails": 0,
"email": "dilbert@soffid.com",
"status": "C"
}
2. SendRequestChallenge anto Email withget the PIN code
Request
GET http://<your-domain>/soffid/webservice/scim2/v1/OtpDevice/5099461/requestChallenge
JSON
Response {
"pin": "123456"
}
Response 200 OK
{
"cell": "PIN",
"cardNumber": "Email message to di*****@so****.co*"
}
3. ResponseChallenge to validate the PIN code
Request
POST http://<your-domain>/soffid/webservice/scim2/v1/OtpDevice/5099461/responseChallenge
{
"pin": "123456"
}
{
"cell": "PIN",
"cardNumber": "Email message to di*****@so****.co*"
}
POST http://<your-domain>/soffid/webservice/scim2/v1/OtpDevice/5099461/responseChallenge
JSON
{
"pin": "839231"
}
Response 200 OK
{
"success": true,
"locked": false
}
4. Enable OTP device
Request
PATCH http://<your-domain>/soffid/webservice/scim2/v1/OtpDevice/5099461
JSON
{
"Operations":
[
{
"op": "replace",
"path": "status",
"value": "V"
}
]
}
Response
{
"created": "2022-03-09 13:39:52",
"meta": {
"location": "http://soffid.pat.lab:8080/soffid/webservice/scim2/v1/OtpDevice/5099461",
"links": {
"requestChallenge": "http://soffid.pat.lab:8080/soffid/webservice/scim2/v1/OtpDevice/5099461/requestChallenge",
"responseChallenge": "http://soffid.pat.lab:8080/soffid/webservice/scim2/v1/OtpDevice/5099461/responseChallenge"
},
"resourceType": "OtpDevice"
},
"schemas": [
"urn:soffid:com.soffid.iam.addons.otp.common.OtpDevice"
],
"name": "Email message to di*****@so****.co*",
"id": 5099461,
"type": "EMAIL",
"user": "dilbert",
"fails": 0,
"email": "dilbert@soffid.com",
"status": "V"
}