okta / okta-sdk-php

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

User IT - Change User Password #27

Closed bretterer closed 4 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-Password',
        email: 'john-change-password@example.com',
        login: 'john-change-password@example.com'
    },
    credentials: {
        password: { value: 'Abcd1234' }
    }
    };
  2. Change the password to '1234Abcd' → POST /api/v1/users/{{userId}}/credentials/change_password

  3. Get the user and verify that 'passwordChanged' field has increased → GET /api/v1/users/{{userId}}/

  4. TODO → Authenticate the user with updated password (Authn APIs not supported in SDK yet)

  5. Deactivate & delete the user → POST /api/v1/users/{{userId}}/lifecycle/deactivate + DELETE /api/v1/users/{{userId}}