Verify MFA Setup
curl --request POST \
--url https://identity.sandbox.lerian.net/v1/users/{id}/mfa/verify \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"mfaType": "app",
"passcode": "123456",
"secret": "JBSWY3DPEHPK3PXP"
}
'package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://identity.sandbox.lerian.net/v1/users/{id}/mfa/verify"
payload := strings.NewReader("{\n \"mfaType\": \"app\",\n \"passcode\": \"123456\",\n \"secret\": \"JBSWY3DPEHPK3PXP\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({mfaType: 'app', passcode: '123456', secret: 'JBSWY3DPEHPK3PXP'})
};
fetch('https://identity.sandbox.lerian.net/v1/users/{id}/mfa/verify', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://identity.sandbox.lerian.net/v1/users/{id}/mfa/verify"
payload = {
"mfaType": "app",
"passcode": "123456",
"secret": "JBSWY3DPEHPK3PXP"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"code": "<string>",
"entityType": "<string>",
"err": "<unknown>",
"message": "<string>",
"title": "<string>"
}{
"code": "<string>",
"entityType": "<string>",
"err": "<unknown>",
"message": "<string>",
"title": "<string>"
}{
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}{
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}{
"code": "<string>",
"entityType": "<string>",
"err": "<unknown>",
"message": "<string>",
"title": "<string>"
}{
"code": "<string>",
"entityType": "<string>",
"err": "<unknown>",
"message": "<string>",
"title": "<string>"
}Verify MFA Setup
Proves the enrolling device works, by sending back the code it produced or received.
Second of the three enrollment calls. It does NOT turn the factor on — POST .../mfa/enable does. Verifying and stopping there leaves the account exactly as protected as before.
On success the response has no body (204).
Failures:
400— the code is wrong or expired.404— no such user.503 IDE-0066— the identity provider is unavailable (unreachable, too slow to answer, or failing). Nothing about the request was wrong; retry it later.
POST
/
v1
/
users
/
{id}
/
mfa
/
verify
Verify MFA Setup
curl --request POST \
--url https://identity.sandbox.lerian.net/v1/users/{id}/mfa/verify \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"mfaType": "app",
"passcode": "123456",
"secret": "JBSWY3DPEHPK3PXP"
}
'package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://identity.sandbox.lerian.net/v1/users/{id}/mfa/verify"
payload := strings.NewReader("{\n \"mfaType\": \"app\",\n \"passcode\": \"123456\",\n \"secret\": \"JBSWY3DPEHPK3PXP\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({mfaType: 'app', passcode: '123456', secret: 'JBSWY3DPEHPK3PXP'})
};
fetch('https://identity.sandbox.lerian.net/v1/users/{id}/mfa/verify', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://identity.sandbox.lerian.net/v1/users/{id}/mfa/verify"
payload = {
"mfaType": "app",
"passcode": "123456",
"secret": "JBSWY3DPEHPK3PXP"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"code": "<string>",
"entityType": "<string>",
"err": "<unknown>",
"message": "<string>",
"title": "<string>"
}{
"code": "<string>",
"entityType": "<string>",
"err": "<unknown>",
"message": "<string>",
"title": "<string>"
}{
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}{
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}{
"code": "<string>",
"entityType": "<string>",
"err": "<unknown>",
"message": "<string>",
"title": "<string>"
}{
"code": "<string>",
"entityType": "<string>",
"err": "<unknown>",
"message": "<string>",
"title": "<string>"
}Autorizaciones
JWT bearer token issued by the identity provider.
Parámetros de ruta
User ID.
Ejemplo:
"00000000-0000-0000-0000-000000000000"
Cuerpo
application/json
Respuesta
No Content
¿Esta página le ayudó?

