module Oktakit::Client::Users

Public Instance Methods

activate_user(id, options = {}) click to toggle source

Activate User

@params id [string] User ID @param options [Hash] Optional. Query params for request @param options [Hash] Optional. Header params for the request. @param options [String] Optional. The content type to accept. Default application/json @param options [String] Optional. The content type for the request. Default application/json @param options [Hash] Optional. Body params for request. @return [Hash<Sawyer::Resource>] Returns empty object by default. If sendEmail is false, a user activation link. @see developer.okta.com/docs/api/resources/users.html#activate-user @example

Oktakit.activate_user('id')
# File lib/oktakit/client/users.rb, line 125
def activate_user(id, options = {})
  post("/users/#{id}/lifecycle/activate", options)
end
change_password(id, options = {}) click to toggle source

Change Password

@params id [string] User ID @param options [Hash] Optional. Query params for request @param options [Hash] Optional. Header params for the request. @param options [String] Optional. The content type to accept. Default application/json @param options [String] Optional. The content type for the request. Default application/json @param options [Hash] Optional. Body params for request. @return [Hash<Sawyer::Resource>] Credentials of the user @see developer.okta.com/docs/api/resources/users.html#change-password @example

Oktakit.change_password('id')
# File lib/oktakit/client/users.rb, line 269
def change_password(id, options = {})
  post("/users/#{id}/credentials/change_password", options)
end
change_recovery_question(id, options = {}) click to toggle source

Change Recovery Question

@params id [string] User ID @param options [Hash] Optional. Query params for request @param options [Hash] Optional. Header params for the request. @param options [String] Optional. The content type to accept. Default application/json @param options [String] Optional. The content type for the request. Default application/json @param options [Hash] Optional. Body params for request. @return [Hash<Sawyer::Resource>] Credentials of the user @see developer.okta.com/docs/api/resources/users.html#change-recovery-question @example

Oktakit.change_recovery_question('id')
# File lib/oktakit/client/users.rb, line 285
def change_recovery_question(id, options = {})
  post("/users/#{id}/credentials/change_recovery_question", options)
end
create_user(options = {}) click to toggle source

Create User

@param options [Hash] Optional. Query params for request @param options [Hash] Optional. Header params for the request. @param options [String] Optional. The content type to accept. Default application/json @param options [String] Optional. The content type for the request. Default application/json @param options [Hash] Optional. Body params for request. @return [Hash<Sawyer::Resource>] Returns the created User. @see developer.okta.com/docs/api/resources/users.html#create-user @example

Oktakit.create_user
# File lib/oktakit/client/users.rb, line 15
def create_user(options = {})
  post('/users', options)
end
deactivate_user(id, options = {}) click to toggle source

Deactivate User

@params id [string] User ID @param options [Hash] Optional. Query params for request @param options [Hash] Optional. Header params for the request. @param options [String] Optional. The content type to accept. Default application/json @param options [String] Optional. The content type for the request. Default application/json @param options [Hash] Optional. Body params for request. @return [Hash<Sawyer::Resource>] Returns an empty object. @see developer.okta.com/docs/api/resources/users.html#deactivate-user @example

Oktakit.deactivate_user('id')
# File lib/oktakit/client/users.rb, line 141
def deactivate_user(id, options = {})
  post("/users/#{id}/lifecycle/deactivate", options)
end
expire_password(id, options = {}) click to toggle source

Expire Password

@params id [string] User ID @param options [Hash] Optional. Query params for request @param options [Hash] Optional. Header params for the request. @param options [String] Optional. The content type to accept. Default application/json @param options [String] Optional. The content type for the request. Default application/json @param options [Hash] Optional. Body params for request. @return [Hash<Sawyer::Resource>] Returns the user by default. If tempPassword is true, a temporary password. @see developer.okta.com/docs/api/resources/users.html#expire-password @example

Oktakit.expire_password('id')
# File lib/oktakit/client/users.rb, line 221
def expire_password(id, options = {})
  post("/users/#{id}/lifecycle/expire_password", options)
end
forgot_password(id, options = {}) click to toggle source

Forgot Password

@params id [string] User ID @param options [Hash] Optional. Query params for request @param options [Hash] Optional. Header params for the request. @param options [String] Optional. The content type to accept. Default application/json @param options [String] Optional. The content type for the request. Default application/json @param options [Hash] Optional. Body params for request. @return [Hash<Sawyer::Resource>] Returns an empty object by default. If sendEmail is false a password reset link @see developer.okta.com/docs/api/resources/users.html#forgot-password @example

Oktakit.forgot_password('id')
# File lib/oktakit/client/users.rb, line 253
def forgot_password(id, options = {})
  post("/users/#{id}/credentials/forgot_password", options)
end
get_member_groups(id, options = {}) click to toggle source

Get Member Groups

@params id [string] User ID @param options [Hash] Optional. Query params for request @param options [Hash] Optional. Header params for the request. @param options [String] Optional. The content type to accept. Default application/json @param options [String] Optional. The content type for the request. Default application/json @param options [Hash] Optional. Body params for request. @return [Array<Sawyer::Resource>] Array of Groups @see developer.okta.com/docs/api/resources/users.html#get-member-groups @example

Oktakit.get_member_groups('id')
# File lib/oktakit/client/users.rb, line 109
def get_member_groups(id, options = {})
  get("/users/#{id}/groups", options)
end
get_user(id, options = {}) click to toggle source

Get User

@params id [string] User ID @param options [Hash] Optional. Query params for request @param options [Hash] Optional. Header params for the request. @param options [String] Optional. The content type to accept. Default application/json @param options [String] Optional. The content type for the request. Default application/json @param options [Hash] Optional. Body params for request. @return [Hash<Sawyer::Resource>] Fetched User @see developer.okta.com/docs/api/resources/users.html#get-user @example

Oktakit.get_user('id')
# File lib/oktakit/client/users.rb, line 31
def get_user(id, options = {})
  get("/users/#{id}", options)
end
list_users(options = {}) click to toggle source

List Users

@param options [Hash] Optional. Query params for request @param options [Hash] Optional. Header params for the request. @param options [String] Optional. The content type to accept. Default application/json @param options [String] Optional. The content type for the request. Default application/json @param options [Hash] Optional. Body params for request. @return [Array<Sawyer::Resource>] Array of User @see developer.okta.com/docs/api/resources/users.html#list-users @example

Oktakit.list_users
# File lib/oktakit/client/users.rb, line 46
def list_users(options = {})
  get('/users', options)
end
reset_factors(id, options = {}) click to toggle source

Reset Factors

@params id [string] User ID @param options [Hash] Optional. Query params for request @param options [Hash] Optional. Header params for the request. @param options [String] Optional. The content type to accept. Default application/json @param options [String] Optional. The content type for the request. Default application/json @param options [Hash] Optional. Body params for request. @return [Hash<Sawyer::Resource>] Returns an empty object by default. @see developer.okta.com/docs/api/resources/users.html#reset-factors @example

Oktakit.reset_factors('id')
# File lib/oktakit/client/users.rb, line 237
def reset_factors(id, options = {})
  post("/users/#{id}/lifecycle/reset_factors", options)
end
reset_password(id, options = {}) click to toggle source

Reset Password

@params id [string] User ID @param options [Hash] Optional. Query params for request @param options [Hash] Optional. Header params for the request. @param options [String] Optional. The content type to accept. Default application/json @param options [String] Optional. The content type for the request. Default application/json @param options [Hash] Optional. Body params for request. @return [Hash<Sawyer::Resource>] Returns an empty object by default. If sendEmail is false a password reset link @see developer.okta.com/docs/api/resources/users.html#reset-password @example

Oktakit.reset_password('id')
# File lib/oktakit/client/users.rb, line 205
def reset_password(id, options = {})
  post("/users/#{id}/lifecycle/reset_password", options)
end
suspend_user(id, options = {}) click to toggle source

Suspend User

@params id [string] User ID @param options [Hash] Optional. Query params for request @param options [Hash] Optional. Header params for the request. @param options [String] Optional. The content type to accept. Default application/json @param options [String] Optional. The content type for the request. Default application/json @param options [Hash] Optional. Body params for request. @return [Hash<Sawyer::Resource>] Returns an empty object. @see developer.okta.com/docs/api/resources/users.html#suspend-user @example

Oktakit.suspend_user('id')
# File lib/oktakit/client/users.rb, line 157
def suspend_user(id, options = {})
  post("/users/#{id}/lifecycle/suspend", options)
end
unlock_user(id, options = {}) click to toggle source

Unlock User

@params id [string] User ID @param options [Hash] Optional. Query params for request @param options [Hash] Optional. Header params for the request. @param options [String] Optional. The content type to accept. Default application/json @param options [String] Optional. The content type for the request. Default application/json @param options [Hash] Optional. Body params for request. @return [Hash<Sawyer::Resource>] Returns an empty object @see developer.okta.com/docs/api/resources/users.html#unlock-user @example

Oktakit.unlock_user('id')
# File lib/oktakit/client/users.rb, line 189
def unlock_user(id, options = {})
  post("/users/#{id}/lifecycle/unlock", options)
end
unsuspend_user(id, options = {}) click to toggle source

Unsuspend User

@params id [string] User ID @param options [Hash] Optional. Query params for request @param options [Hash] Optional. Header params for the request. @param options [String] Optional. The content type to accept. Default application/json @param options [String] Optional. The content type for the request. Default application/json @param options [Hash] Optional. Body params for request. @return [Hash<Sawyer::Resource>] Returns an empty object. Returns an empty object. @see developer.okta.com/docs/api/resources/users.html#unsuspend-user @example

Oktakit.unsuspend_user('id')
# File lib/oktakit/client/users.rb, line 173
def unsuspend_user(id, options = {})
  post("/users/#{id}/lifecycle/unsuspend", options)
end
update_profile(id, options = {}) click to toggle source

Update Profile

@params id [string] User ID @param options [Hash] Optional. Query params for request @param options [Hash] Optional. Header params for the request. @param options [String] Optional. The content type to accept. Default application/json @param options [String] Optional. The content type for the request. Default application/json @param options [Hash] Optional. Body params for request. @return [Hash<Sawyer::Resource>] Updated User @see developer.okta.com/docs/api/resources/users.html#update-profile @example

Oktakit.update_profile('id')
# File lib/oktakit/client/users.rb, line 78
def update_profile(id, options = {})
  post("/users/#{id}", options)
end
update_user(id, options = {}) click to toggle source

Update User

@params id [string] User ID @param options [Hash] Optional. Query params for request @param options [Hash] Optional. Header params for the request. @param options [String] Optional. The content type to accept. Default application/json @param options [String] Optional. The content type for the request. Default application/json @param options [Hash] Optional. Body params for request. @return [Hash<Sawyer::Resource>] Updated User @see developer.okta.com/docs/api/resources/users.html#update-user @example

Oktakit.update_user('id')
# File lib/oktakit/client/users.rb, line 62
def update_user(id, options = {})
  put("/users/#{id}", options)
end