okta / okta-sdk-php

PHP SDK for the Okta API
Apache License 2.0
38 stars 71 forks source link

User IT - Change User Recovery Question #30

Closed bretterer closed 5 years ago

bretterer commented 7 years ago
  1. Create a user with credentials, activated by default → POST /api/v1/users?activate=true
    const newUser = {
    profile: {
        firstName: 'John',
        lastName: 'Change-Recovery-Question',
        email: 'john-change-recover-question@example.com',
        login: 'john-change-recover-question@example.com'
    },
    credentials: {
        password: { value: 'Abcd1234' }
    }
    };
  2. Update the user's recovery question → POST /api/v1/users/{{userId}}/credentials/change_recovery_question
    let userCredentials = {
    password: { value: 'Abcd1234' },
    recovery_question: {
        question: 'How many roads must a man walk down?',
        answer: 'forty two'
    }
    };
  3. Update the user's password using updated recovery question credentials → POST /api/v1/users/{{userId}}/credentials/forgot_password
  4. Deactivate & delete the user → POST /api/v1/users/{{userId}}/lifecycle/deactivate + DELETE /api/v1/users/{{userId}}