module Oktakit::Client::Users
Public Instance Methods
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
@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
@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
@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
@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
@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
@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 Assigned App Links
@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 App Links @see developer.okta.com/docs/api/resources/users.html#get-assigned-app-links @example
Oktakit.get_assigned_app_links('id')
# File lib/oktakit/client/users.rb, line 93 def get_assigned_app_links(id, options = {}) get("/users/#{id}/appLinks", options) end
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
@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
@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
@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
@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
@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
@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
@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
@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
@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