Module: Oktakit::Client::Users
- Included in:
- Oktakit::Client
- Defined in:
- lib/oktakit/client/users.rb
Instance Method Summary collapse
-
#activate_user(id, options = {}) ⇒ Hash<Sawyer::Resource>
Activate User.
-
#change_password(id, options = {}) ⇒ Hash<Sawyer::Resource>
Change Password.
-
#change_recovery_question(id, options = {}) ⇒ Hash<Sawyer::Resource>
Change Recovery Question.
-
#clear_user_sessions(id, options = {}) ⇒ Object
Clear user sessions.
-
#create_user(options = {}) ⇒ Hash<Sawyer::Resource>
Create User.
-
#deactivate_user(id, options = {}) ⇒ Hash<Sawyer::Resource>
Deactivate User.
-
#delete_user(id, options = {}) ⇒ Object
Delete User.
-
#expire_password(id, options = {}) ⇒ Hash<Sawyer::Resource>
Expire Password.
-
#forgot_password(id, options = {}) ⇒ Hash<Sawyer::Resource>
Forgot Password.
-
#get_assigned_app_links(id, options = {}) ⇒ Array<Sawyer::Resource>
Get Assigned App Links.
-
#get_member_groups(id, options = {}) ⇒ Array<Sawyer::Resource>
Get Member Groups.
-
#get_user(id, options = {}) ⇒ Hash<Sawyer::Resource>
Get User.
-
#list_users(options = {}) ⇒ Array<Sawyer::Resource>
List Users.
-
#reactivate_user(id, options = {}) ⇒ Hash<Sawyer::Resource>
Reactivate User.
-
#reset_factors(id, options = {}) ⇒ Hash<Sawyer::Resource>
Reset Factors.
-
#reset_password(id, options = {}) ⇒ Hash<Sawyer::Resource>
Reset Password.
-
#suspend_user(id, options = {}) ⇒ Hash<Sawyer::Resource>
Suspend User.
-
#unlock_user(id, options = {}) ⇒ Hash<Sawyer::Resource>
Unlock User.
-
#unsuspend_user(id, options = {}) ⇒ Hash<Sawyer::Resource>
Unsuspend User.
-
#update_profile(id, options = {}) ⇒ Hash<Sawyer::Resource>
Update Profile.
-
#update_user(id, options = {}) ⇒ Hash<Sawyer::Resource>
Update User.
Instance Method Details
#activate_user(id, options = {}) ⇒ Hash<Sawyer::Resource>
Activate User
130 131 132 |
# File 'lib/oktakit/client/users.rb', line 130 def activate_user(id, = {}) post("/users/#{id}/lifecycle/activate", ) end |
#change_password(id, options = {}) ⇒ Hash<Sawyer::Resource>
Change Password
310 311 312 |
# File 'lib/oktakit/client/users.rb', line 310 def change_password(id, = {}) post("/users/#{id}/credentials/change_password", ) end |
#change_recovery_question(id, options = {}) ⇒ Hash<Sawyer::Resource>
Change Recovery Question
326 327 328 |
# File 'lib/oktakit/client/users.rb', line 326 def change_recovery_question(id, = {}) post("/users/#{id}/credentials/change_recovery_question", ) end |
#clear_user_sessions(id, options = {}) ⇒ Object
Clear user sessions
341 342 343 |
# File 'lib/oktakit/client/users.rb', line 341 def clear_user_sessions(id, = {}) delete("/users/#{id}/sessions", ) end |
#create_user(options = {}) ⇒ Hash<Sawyer::Resource>
Create User
15 16 17 |
# File 'lib/oktakit/client/users.rb', line 15 def create_user( = {}) post('/users', ) end |
#deactivate_user(id, options = {}) ⇒ Hash<Sawyer::Resource>
Deactivate User
164 165 166 |
# File 'lib/oktakit/client/users.rb', line 164 def deactivate_user(id, = {}) post("/users/#{id}/lifecycle/deactivate", ) end |
#delete_user(id, options = {}) ⇒ Object
Deletes a user permanently. This operation can only be performed on users that have a DEPROVISIONED status. This action cannot be recovered!
Delete User
This operation on a user that hasn’t been deactivated causes that user to be deactivated. A second delete operation is required to delete the user.
182 183 184 |
# File 'lib/oktakit/client/users.rb', line 182 def delete_user(id, = {}) delete("/users/#{id}", ) end |
#expire_password(id, options = {}) ⇒ Hash<Sawyer::Resource>
Expire Password
262 263 264 |
# File 'lib/oktakit/client/users.rb', line 262 def expire_password(id, = {}) post("/users/#{id}/lifecycle/expire_password", ) end |
#forgot_password(id, options = {}) ⇒ Hash<Sawyer::Resource>
Forgot Password
294 295 296 |
# File 'lib/oktakit/client/users.rb', line 294 def forgot_password(id, = {}) post("/users/#{id}/credentials/forgot_password", ) end |
#get_assigned_app_links(id, options = {}) ⇒ Array<Sawyer::Resource>
Get Assigned App Links
98 99 100 |
# File 'lib/oktakit/client/users.rb', line 98 def get_assigned_app_links(id, = {}) get("/users/#{id}/appLinks", ) end |
#get_member_groups(id, options = {}) ⇒ Array<Sawyer::Resource>
Get Member Groups
114 115 116 |
# File 'lib/oktakit/client/users.rb', line 114 def get_member_groups(id, = {}) get("/users/#{id}/groups", ) end |
#get_user(id, options = {}) ⇒ Hash<Sawyer::Resource>
Get User
31 32 33 |
# File 'lib/oktakit/client/users.rb', line 31 def get_user(id, = {}) get("/users/#{id}", ) end |
#list_users(options = {}) ⇒ Array<Sawyer::Resource>
List Users
46 47 48 |
# File 'lib/oktakit/client/users.rb', line 46 def list_users( = {}) get('/users', ) end |
#reactivate_user(id, options = {}) ⇒ Hash<Sawyer::Resource>
The user must be in a PROVISIONED status
Reactivate User
148 149 150 |
# File 'lib/oktakit/client/users.rb', line 148 def reactivate_user(id, = {}) post("/users/#{id}/lifecycle/reactivate", ) end |
#reset_factors(id, options = {}) ⇒ Hash<Sawyer::Resource>
Reset Factors
278 279 280 |
# File 'lib/oktakit/client/users.rb', line 278 def reset_factors(id, = {}) post("/users/#{id}/lifecycle/reset_factors", ) end |
#reset_password(id, options = {}) ⇒ Hash<Sawyer::Resource>
Reset Password
246 247 248 |
# File 'lib/oktakit/client/users.rb', line 246 def reset_password(id, = {}) post("/users/#{id}/lifecycle/reset_password", ) end |
#suspend_user(id, options = {}) ⇒ Hash<Sawyer::Resource>
Suspend User
198 199 200 |
# File 'lib/oktakit/client/users.rb', line 198 def suspend_user(id, = {}) post("/users/#{id}/lifecycle/suspend", ) end |
#unlock_user(id, options = {}) ⇒ Hash<Sawyer::Resource>
Unlock User
230 231 232 |
# File 'lib/oktakit/client/users.rb', line 230 def unlock_user(id, = {}) post("/users/#{id}/lifecycle/unlock", ) end |
#unsuspend_user(id, options = {}) ⇒ Hash<Sawyer::Resource>
Unsuspend User
214 215 216 |
# File 'lib/oktakit/client/users.rb', line 214 def unsuspend_user(id, = {}) post("/users/#{id}/lifecycle/unsuspend", ) end |
#update_profile(id, options = {}) ⇒ Hash<Sawyer::Resource>
Update Profile
83 84 85 |
# File 'lib/oktakit/client/users.rb', line 83 def update_profile(id, = {}) post("/users/#{id}", ) end |
#update_user(id, options = {}) ⇒ Hash<Sawyer::Resource>
Update User
63 64 65 66 67 68 69 |
# File 'lib/oktakit/client/users.rb', line 63 def update_user(id, = {}) if .delete(:partial) post("/users/#{id}", ) else put("/users/#{id}", ) end end |