@@ -9,7 +9,7 @@ module Users
99 # @param options[:content_type] [String] Optional. The content type for the request. Default application/json
1010 # @param options [Hash] Optional. Body params for request.
1111 # @return [Hash<Sawyer::Resource>] Returns the created User.
12- # @see http ://developer.okta.com/docs/api/resources/users.html #create-user
12+ # @see https ://developer.okta.com/docs/api/resources/users#create-user
1313 # @example
1414 # Oktakit.create_user
1515 def create_user ( options = { } )
@@ -25,7 +25,7 @@ def create_user(options = {})
2525 # @param options[:content_type] [String] Optional. The content type for the request. Default application/json
2626 # @param options [Hash] Optional. Body params for request.
2727 # @return [Hash<Sawyer::Resource>] Fetched User
28- # @see http ://developer.okta.com/docs/api/resources/users.html #get-user
28+ # @see https ://developer.okta.com/docs/api/resources/users#get-user
2929 # @example
3030 # Oktakit.get_user('id')
3131 def get_user ( id , options = { } )
@@ -40,7 +40,7 @@ def get_user(id, options = {})
4040 # @param options[:content_type] [String] Optional. The content type for the request. Default application/json
4141 # @param options [Hash] Optional. Body params for request.
4242 # @return [Array<Sawyer::Resource>] Array of User
43- # @see http ://developer.okta.com/docs/api/resources/users.html #list-users
43+ # @see https ://developer.okta.com/docs/api/resources/users#list-users
4444 # @example
4545 # Oktakit.list_users
4646 def list_users ( options = { } )
@@ -56,7 +56,7 @@ def list_users(options = {})
5656 # @param options[:content_type] [String] Optional. The content type for the request. Default application/json
5757 # @param options [Hash] Optional. Body params for request.
5858 # @return [Hash<Sawyer::Resource>] Updated User
59- # @see http ://developer.okta.com/docs/api/resources/users.html #update-user
59+ # @see https ://developer.okta.com/docs/api/resources/users#update-user
6060 # @example
6161 # Oktakit.update_user('id')
6262 def update_user ( id , options = { } )
@@ -72,7 +72,7 @@ def update_user(id, options = {})
7272 # @param options[:content_type] [String] Optional. The content type for the request. Default application/json
7373 # @param options [Hash] Optional. Body params for request.
7474 # @return [Hash<Sawyer::Resource>] Updated User
75- # @see http ://developer.okta.com/docs/api/resources/users.html #update-profile
75+ # @see https ://developer.okta.com/docs/api/resources/users#update-profile
7676 # @example
7777 # Oktakit.update_profile('id')
7878 def update_profile ( id , options = { } )
@@ -87,7 +87,7 @@ def update_profile(id, options = {})
8787 # @param options[:content_type] [String] Optional. The content type for the request. Default application/json
8888 # @param options [Hash] Optional. Body params for request.
8989 # @return [Array<Sawyer::Resource>] Array of App Links
90- # @see http ://developer.okta.com/docs/api/resources/users.html #get-assigned-app-links
90+ # @see https ://developer.okta.com/docs/api/resources/users#get-assigned-app-links
9191 # @example
9292 # Oktakit.get_assigned_app_links('id')
9393 def get_assigned_app_links ( id , options = { } )
@@ -103,7 +103,7 @@ def get_assigned_app_links(id, options = {})
103103 # @param options[:content_type] [String] Optional. The content type for the request. Default application/json
104104 # @param options [Hash] Optional. Body params for request.
105105 # @return [Array<Sawyer::Resource>] Array of Groups
106- # @see http ://developer.okta.com/docs/api/resources/users.html #get-member-groups
106+ # @see https ://developer.okta.com/docs/api/resources/users#get-member-groups
107107 # @example
108108 # Oktakit.get_member_groups('id')
109109 def get_member_groups ( id , options = { } )
@@ -119,7 +119,7 @@ def get_member_groups(id, options = {})
119119 # @param options[:content_type] [String] Optional. The content type for the request. Default application/json
120120 # @param options [Hash] Optional. Body params for request.
121121 # @return [Hash<Sawyer::Resource>] Returns empty object by default. If sendEmail is false, a user activation link.
122- # @see http ://developer.okta.com/docs/api/resources/users.html #activate-user
122+ # @see https ://developer.okta.com/docs/api/resources/users#activate-user
123123 # @example
124124 # Oktakit.activate_user('id')
125125 def activate_user ( id , options = { } )
@@ -135,7 +135,7 @@ def activate_user(id, options = {})
135135 # @param options[:content_type] [String] Optional. The content type for the request. Default application/json
136136 # @param options [Hash] Optional. Body params for request.
137137 # @return [Hash<Sawyer::Resource>] Returns an empty object.
138- # @see http ://developer.okta.com/docs/api/resources/users.html #deactivate-user
138+ # @see https ://developer.okta.com/docs/api/resources/users#deactivate-user
139139 # @example
140140 # Oktakit.deactivate_user('id')
141141 def deactivate_user ( id , options = { } )
@@ -151,7 +151,7 @@ def deactivate_user(id, options = {})
151151 # @param options[:content_type] [String] Optional. The content type for the request. Default application/json
152152 # @param options [Hash] Optional. Body params for request.
153153 # @return [Hash<Sawyer::Resource>] Returns an empty object.
154- # @see http ://developer.okta.com/docs/api/resources/users.html #suspend-user
154+ # @see https ://developer.okta.com/docs/api/resources/users#suspend-user
155155 # @example
156156 # Oktakit.suspend_user('id')
157157 def suspend_user ( id , options = { } )
@@ -167,7 +167,7 @@ def suspend_user(id, options = {})
167167 # @param options[:content_type] [String] Optional. The content type for the request. Default application/json
168168 # @param options [Hash] Optional. Body params for request.
169169 # @return [Hash<Sawyer::Resource>] Returns an empty object. Returns an empty object.
170- # @see http ://developer.okta.com/docs/api/resources/users.html #unsuspend-user
170+ # @see https ://developer.okta.com/docs/api/resources/users#unsuspend-user
171171 # @example
172172 # Oktakit.unsuspend_user('id')
173173 def unsuspend_user ( id , options = { } )
@@ -183,7 +183,7 @@ def unsuspend_user(id, options = {})
183183 # @param options[:content_type] [String] Optional. The content type for the request. Default application/json
184184 # @param options [Hash] Optional. Body params for request.
185185 # @return [Hash<Sawyer::Resource>] Returns an empty object
186- # @see http://developer.okta.com/docs/api/resources/users.html #unlock-user
186+ # @see http://developer.okta.com/docs/api/resources/users#unlock-user
187187 # @example
188188 # Oktakit.unlock_user('id')
189189 def unlock_user ( id , options = { } )
@@ -199,7 +199,7 @@ def unlock_user(id, options = {})
199199 # @param options[:content_type] [String] Optional. The content type for the request. Default application/json
200200 # @param options [Hash] Optional. Body params for request.
201201 # @return [Hash<Sawyer::Resource>] Returns an empty object by default. If sendEmail is false a password reset link
202- # @see http ://developer.okta.com/docs/api/resources/users.html #reset-password
202+ # @see https ://developer.okta.com/docs/api/resources/users#reset-password
203203 # @example
204204 # Oktakit.reset_password('id')
205205 def reset_password ( id , options = { } )
@@ -215,7 +215,7 @@ def reset_password(id, options = {})
215215 # @param options[:content_type] [String] Optional. The content type for the request. Default application/json
216216 # @param options [Hash] Optional. Body params for request.
217217 # @return [Hash<Sawyer::Resource>] Returns the user by default. If tempPassword is true, a temporary password.
218- # @see http ://developer.okta.com/docs/api/resources/users.html #expire-password
218+ # @see https ://developer.okta.com/docs/api/resources/users#expire-password
219219 # @example
220220 # Oktakit.expire_password('id')
221221 def expire_password ( id , options = { } )
@@ -231,7 +231,7 @@ def expire_password(id, options = {})
231231 # @param options[:content_type] [String] Optional. The content type for the request. Default application/json
232232 # @param options [Hash] Optional. Body params for request.
233233 # @return [Hash<Sawyer::Resource>] Returns an empty object by default.
234- # @see http ://developer.okta.com/docs/api/resources/users.html #reset-factors
234+ # @see https ://developer.okta.com/docs/api/resources/users#reset-factors
235235 # @example
236236 # Oktakit.reset_factors('id')
237237 def reset_factors ( id , options = { } )
@@ -247,7 +247,7 @@ def reset_factors(id, options = {})
247247 # @param options[:content_type] [String] Optional. The content type for the request. Default application/json
248248 # @param options [Hash] Optional. Body params for request.
249249 # @return [Hash<Sawyer::Resource>] Returns an empty object by default. If sendEmail is false a password reset link
250- # @see http ://developer.okta.com/docs/api/resources/users.html #forgot-password
250+ # @see https ://developer.okta.com/docs/api/resources/users#forgot-password
251251 # @example
252252 # Oktakit.forgot_password('id')
253253 def forgot_password ( id , options = { } )
@@ -263,7 +263,7 @@ def forgot_password(id, options = {})
263263 # @param options[:content_type] [String] Optional. The content type for the request. Default application/json
264264 # @param options [Hash] Optional. Body params for request.
265265 # @return [Hash<Sawyer::Resource>] Credentials of the user
266- # @see http ://developer.okta.com/docs/api/resources/users.html #change-password
266+ # @see https ://developer.okta.com/docs/api/resources/users#change-password
267267 # @example
268268 # Oktakit.change_password('id')
269269 def change_password ( id , options = { } )
@@ -279,12 +279,27 @@ def change_password(id, options = {})
279279 # @param options[:content_type] [String] Optional. The content type for the request. Default application/json
280280 # @param options [Hash] Optional. Body params for request.
281281 # @return [Hash<Sawyer::Resource>] Credentials of the user
282- # @see http ://developer.okta.com/docs/api/resources/users.html #change-recovery-question
282+ # @see https ://developer.okta.com/docs/api/resources/users#change-recovery-question
283283 # @example
284284 # Oktakit.change_recovery_question('id')
285285 def change_recovery_question ( id , options = { } )
286286 post ( "/users/#{ id } /credentials/change_recovery_question" , options )
287287 end
288+
289+ # Clear user sessions
290+ #
291+ # @params id [string] User ID
292+ # @param options[:query] [Hash] Optional. Query params for request
293+ # @param options[:headers] [Hash] Optional. Header params for the request.
294+ # @param options[:accept] [String] Optional. The content type to accept. Default application/json
295+ # @param options[:content_type] [String] Optional. The content type for the request. Default application/json
296+ # @param options [Hash] Optional. Body params for the request.
297+ # @return 204 'No Content'
298+ # @see https://developer.okta.com/docs/api/resources/users#user-sessions
299+ # Oktakit.clear_user_sessions('id')
300+ def clear_user_sessions ( id , options = { } )
301+ delete ( "/users/#{ id } /sessions" , options )
302+ end
288303 end
289304 end
290305end
0 commit comments