expirePassword(userId) {
    if (!userId) {
      return Promise.reject(new Error('OKTA API expirePassword parameter userId is required.'));
    }
    let url = `${this.baseUrl}/api/v1/users/${userId}/lifecycle/expire_password?tempPassword=false`;

    const resources = [
      `${this.baseUrl}/api/v1/users/${userId}`
    ];

    const request = this.http.postJson(
      url,
      null,
      { resources }
    );
    return request.then(jsonRes => new models.User(jsonRes, this));
  }
/**
   *
   * @param userId {String}
   * @description
   * This operation transitions the user to the status of `PASSWORD_EXPIRED` so that the user is required to change their password at their next login.
   * @returns {Promise<User>}
   */
@param userId {String}
@description
This operation transitions the user to the status of `PASSWORD_EXPIRED` so that the user is required to change their password at their next login.
@returns {Promise}
@param userId { String } @description This operation transitions the user to the status of ` PASSWORD_EXPIRED ` so that the user is required to change their password at their next login . @returns { Promise }
expirePassword(userId) {
    if (!userId) {
      return Promise.reject(new Error('OKTA API expirePassword parameter userId is required.'));
    }
    let url = `${this.baseUrl}/api/v1/users/${userId}/lifecycle/expire_password?tempPassword=false`;
    const resources = [
      `${this.baseUrl}/api/v1/users/${userId}`
    ];
    const request = this.http.postJson(
      url,
      null,
      { resources }
    );
    return request.then(jsonRes => new models.User(jsonRes, this));
  }
expirePassword ( userId ) { if ( ! userId ) { return Promise . reject ( new Error ( 'OKTA API expirePassword parameter userId is required.' ) ) ; } let url = ` ${ this . baseUrl } ${ userId } ` ; const resources = [ ` ${ this . baseUrl } ${ userId } ` ] ; const request = this . http . postJson ( url , null , { resources } ) ; return request . then ( jsonRes => new models . User ( jsonRes , this ) ) ; }
@param userId {String}
 @description
 This operation transitions the user to the status of `PASSWORD_EXPIRED` so that the user is required to change their password at their next login.
@param userId { String } @description This operation transitions the user to the status of ` PASSWORD_EXPIRED ` so that the user is required to change their password at their next login .