Class: ClerkHttpClient::UsersApi
- Inherits:
-
Object
- Object
- ClerkHttpClient::UsersApi
- Defined in:
- lib/clerk-http-client/api/users_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#all(opts = {}) ⇒ Array<User>
List all users Returns a list of all users.
-
#all_with_http_info(opts = {}) ⇒ Array<(Array<User>, Integer, Hash)>
List all users Returns a list of all users.
-
#ban(user_id, opts = {}) ⇒ User
Ban a user Marks the given user as banned, which means that all their sessions are revoked and they are not allowed to sign in again.
-
#ban_with_http_info(user_id, opts = {}) ⇒ Array<(User, Integer, Hash)>
Ban a user Marks the given user as banned, which means that all their sessions are revoked and they are not allowed to sign in again.
-
#count(opts = {}) ⇒ TotalCount
Count users Returns a total count of all users that match the given filtering criteria.
-
#count_with_http_info(opts = {}) ⇒ Array<(TotalCount, Integer, Hash)>
Count users Returns a total count of all users that match the given filtering criteria.
-
#create(create_user_request, opts = {}) ⇒ User
Create a new user Creates a new user.
-
#create_totp(user_id, opts = {}) ⇒ TOTP
Create a TOTP for a user Creates a TOTP (Time-based One-Time Password) for a given user, returning both the TOTP secret and the URI.
-
#create_totp_with_http_info(user_id, opts = {}) ⇒ Array<(TOTP, Integer, Hash)>
Create a TOTP for a user Creates a TOTP (Time-based One-Time Password) for a given user, returning both the TOTP secret and the URI.
-
#create_with_http_info(create_user_request, opts = {}) ⇒ Array<(User, Integer, Hash)>
Create a new user Creates a new user.
-
#delete(user_id, opts = {}) ⇒ DeletedObject
Delete a user Delete the specified user.
-
#delete_backup_code(user_id, opts = {}) ⇒ DisableMFA200Response
Disable all user’s Backup codes Disable all of a user’s backup codes.
-
#delete_backup_code_with_http_info(user_id, opts = {}) ⇒ Array<(DisableMFA200Response, Integer, Hash)>
Disable all user's Backup codes Disable all of a user's backup codes.
-
#delete_external_account(user_id, external_account_id, opts = {}) ⇒ DeletedObject
Delete External Account Delete an external account by ID.
-
#delete_external_account_with_http_info(user_id, external_account_id, opts = {}) ⇒ Array<(DeletedObject, Integer, Hash)>
Delete External Account Delete an external account by ID.
-
#delete_passkey(user_id, passkey_identification_id, opts = {}) ⇒ DeletedObject
Delete a user passkey Delete the passkey identification for a given user and notify them through email.
-
#delete_passkey_with_http_info(user_id, passkey_identification_id, opts = {}) ⇒ Array<(DeletedObject, Integer, Hash)>
Delete a user passkey Delete the passkey identification for a given user and notify them through email.
-
#delete_profile_image(user_id, opts = {}) ⇒ User
Delete user profile image Delete a user’s profile image.
-
#delete_profile_image_with_http_info(user_id, opts = {}) ⇒ Array<(User, Integer, Hash)>
Delete user profile image Delete a user's profile image DELETE.
-
#delete_totp(user_id, opts = {}) ⇒ DisableMFA200Response
Delete all the user’s TOTPs Deletes all of the user’s TOTPs.
-
#delete_totp_with_http_info(user_id, opts = {}) ⇒ Array<(DisableMFA200Response, Integer, Hash)>
Delete all the user's TOTPs Deletes all of the user's TOTPs.
-
#delete_web3_wallet(user_id, web3_wallet_identification_id, opts = {}) ⇒ DeletedObject
Delete a user web3 wallet Delete the web3 wallet identification for a given user.
-
#delete_web3_wallet_with_http_info(user_id, web3_wallet_identification_id, opts = {}) ⇒ Array<(DeletedObject, Integer, Hash)>
Delete a user web3 wallet Delete the web3 wallet identification for a given user.
-
#delete_with_http_info(user_id, opts = {}) ⇒ Array<(DeletedObject, Integer, Hash)>
Delete a user Delete the specified user DELETE.
-
#disable_mfa(user_id, opts = {}) ⇒ DisableMFA200Response
Disable a user’s MFA methods Disable all of a user’s MFA methods (e.g. OTP sent via SMS, TOTP on their authenticator app) at once.
-
#disable_mfa_with_http_info(user_id, opts = {}) ⇒ Array<(DisableMFA200Response, Integer, Hash)>
Disable a user's MFA methods Disable all of a user's MFA methods (e.g. OTP sent via SMS, TOTP on their authenticator app) at once.
-
#find(user_id, opts = {}) ⇒ User
Retrieve a user Retrieve the details of a user.
-
#find_with_http_info(user_id, opts = {}) ⇒ Array<(User, Integer, Hash)>
Retrieve a user Retrieve the details of a user GET.
-
#initialize(api_client = ApiClient.default) ⇒ UsersApi
constructor
A new instance of UsersApi.
-
#lock(user_id, opts = {}) ⇒ User
Lock a user Marks the given user as locked, which means they are not allowed to sign in again until the lock expires.
-
#lock_with_http_info(user_id, opts = {}) ⇒ Array<(User, Integer, Hash)>
Lock a user Marks the given user as locked, which means they are not allowed to sign in again until the lock expires.
-
#oauth_access_token(user_id, provider, opts = {}) ⇒ Array<GetOAuthAccessToken200ResponseInner>
Retrieve the OAuth access token of a user Fetch the corresponding OAuth access token for a user that has previously authenticated with a particular OAuth provider.
-
#oauth_access_token_with_http_info(user_id, provider, opts = {}) ⇒ Array<(Array<GetOAuthAccessToken200ResponseInner>, Integer, Hash)>
Retrieve the OAuth access token of a user Fetch the corresponding OAuth access token for a user that has previously authenticated with a particular OAuth provider.
-
#organization_invitations(user_id, opts = {}) ⇒ OrganizationInvitationsWithPublicOrganizationData
Retrieve all invitations for a user Retrieve a paginated list of the user’s organization invitations.
-
#organization_invitations_with_http_info(user_id, opts = {}) ⇒ Array<(OrganizationInvitationsWithPublicOrganizationData, Integer, Hash)>
Retrieve all invitations for a user Retrieve a paginated list of the user's organization invitations GET.
-
#organization_memberships(user_id, opts = {}) ⇒ OrganizationMemberships
Retrieve all memberships for a user Retrieve a paginated list of the user’s organization memberships.
-
#organization_memberships_with_http_info(user_id, opts = {}) ⇒ Array<(OrganizationMemberships, Integer, Hash)>
Retrieve all memberships for a user Retrieve a paginated list of the user's organization memberships GET.
-
#unban(user_id, opts = {}) ⇒ User
Unban a user Removes the ban mark from the given user.
-
#unban_with_http_info(user_id, opts = {}) ⇒ Array<(User, Integer, Hash)>
Unban a user Removes the ban mark from the given user.
-
#unlock(user_id, opts = {}) ⇒ User
Unlock a user Removes the lock from the given user.
-
#unlock_with_http_info(user_id, opts = {}) ⇒ Array<(User, Integer, Hash)>
Unlock a user Removes the lock from the given user.
-
#update(user_id, update_user_request, opts = {}) ⇒ User
Update a user Update a user’s attributes.
-
#update_metadata(user_id, update_user_metadata_request, opts = {}) ⇒ User
Merge and update a user’s metadata Update a user’s metadata attributes by merging existing values with the provided parameters.
-
#update_metadata_with_http_info(user_id, update_user_metadata_request, opts = {}) ⇒ Array<(User, Integer, Hash)>
Merge and update a user's metadata Update a user's metadata attributes by merging existing values with the provided parameters.
-
#update_profile_image(user_id, opts = {}) ⇒ User
Set user profile image Update a user’s profile image.
-
#update_profile_image_with_http_info(user_id, opts = {}) ⇒ Array<(User, Integer, Hash)>
Set user profile image Update a user's profile image POST.
-
#update_with_http_info(user_id, update_user_request, opts = {}) ⇒ Array<(User, Integer, Hash)>
Update a user Update a user's attributes.
-
#verify_password(user_id, verify_password_request, opts = {}) ⇒ VerifyPassword200Response
Verify the password of a user Check that the user’s password matches the supplied input.
-
#verify_password_with_http_info(user_id, verify_password_request, opts = {}) ⇒ Array<(VerifyPassword200Response, Integer, Hash)>
Verify the password of a user Check that the user's password matches the supplied input.
-
#verify_totp(user_id, verify_totp_request, opts = {}) ⇒ VerifyTOTP200Response
Verify a TOTP or backup code for a user Verify that the provided TOTP or backup code is valid for the user.
-
#verify_totp_with_http_info(user_id, verify_totp_request, opts = {}) ⇒ Array<(VerifyTOTP200Response, Integer, Hash)>
Verify a TOTP or backup code for a user Verify that the provided TOTP or backup code is valid for the user.
Constructor Details
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/clerk-http-client/api/users_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#all(opts = {}) ⇒ Array<User>
List all users Returns a list of all users. The users are returned sorted by creation date, with the newest users appearing first.
771 772 773 774 |
# File 'lib/clerk-http-client/api/users_api.rb', line 771 def all(opts = {}) data, _status_code, _headers = all_with_http_info(opts) data end |
#all_with_http_info(opts = {}) ⇒ Array<(Array<User>, Integer, Hash)>
List all users Returns a list of all users. The users are returned sorted by creation date, with the newest users appearing first. GET array
793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 |
# File 'lib/clerk-http-client/api/users_api.rb', line 793 def all_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UsersApi.get_user_list ...' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 500 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling UsersApi.get_user_list, must be smaller than or equal to 500.' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling UsersApi.get_user_list, must be greater than or equal to 1.' end if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] < 0 fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling UsersApi.get_user_list, must be greater than or equal to 0.' end # resource path local_var_path = '/users' # query parameters query_params = opts[:query_params] || {} query_params[:'email_address'] = @api_client.build_collection_param(opts[:'email_address'], :multi) if !opts[:'email_address'].nil? query_params[:'phone_number'] = @api_client.build_collection_param(opts[:'phone_number'], :multi) if !opts[:'phone_number'].nil? query_params[:'external_id'] = @api_client.build_collection_param(opts[:'external_id'], :multi) if !opts[:'external_id'].nil? query_params[:'username'] = @api_client.build_collection_param(opts[:'username'], :multi) if !opts[:'username'].nil? query_params[:'web3_wallet'] = @api_client.build_collection_param(opts[:'web3_wallet'], :multi) if !opts[:'web3_wallet'].nil? query_params[:'user_id'] = @api_client.build_collection_param(opts[:'user_id'], :multi) if !opts[:'user_id'].nil? query_params[:'organization_id'] = @api_client.build_collection_param(opts[:'organization_id'], :multi) if !opts[:'organization_id'].nil? query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil? query_params[:'last_active_at_since'] = opts[:'last_active_at_since'] if !opts[:'last_active_at_since'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? query_params[:'order_by'] = opts[:'order_by'] if !opts[:'order_by'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Array<User>' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"UsersApi.get_user_list", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#get_user_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#ban(user_id, opts = {}) ⇒ User
Ban a user Marks the given user as banned, which means that all their sessions are revoked and they are not allowed to sign in again.
28 29 30 31 |
# File 'lib/clerk-http-client/api/users_api.rb', line 28 def ban(user_id, opts = {}) data, _status_code, _headers = ban_with_http_info(user_id, opts) data end |
#ban_with_http_info(user_id, opts = {}) ⇒ Array<(User, Integer, Hash)>
Ban a user Marks the given user as banned, which means that all their sessions are revoked and they are not allowed to sign in again. POST
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 |
# File 'lib/clerk-http-client/api/users_api.rb', line 39 def ban_with_http_info(user_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UsersApi.ban_user ...' end # verify the required parameter 'user_id' is set if @api_client.config.client_side_validation && user_id.nil? fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.ban_user" end # resource path local_var_path = '/users/{user_id}/ban'.sub('{' + 'user_id' + '}', CGI.escape(user_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'User' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"UsersApi.ban_user", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#ban_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#count(opts = {}) ⇒ TotalCount
Count users Returns a total count of all users that match the given filtering criteria.
873 874 875 876 |
# File 'lib/clerk-http-client/api/users_api.rb', line 873 def count(opts = {}) data, _status_code, _headers = count_with_http_info(opts) data end |
#count_with_http_info(opts = {}) ⇒ Array<(TotalCount, Integer, Hash)>
Count users Returns a total count of all users that match the given filtering criteria. GET
890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 |
# File 'lib/clerk-http-client/api/users_api.rb', line 890 def count_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UsersApi.get_users_count ...' end # resource path local_var_path = '/users/count' # query parameters query_params = opts[:query_params] || {} query_params[:'email_address'] = @api_client.build_collection_param(opts[:'email_address'], :multi) if !opts[:'email_address'].nil? query_params[:'phone_number'] = @api_client.build_collection_param(opts[:'phone_number'], :multi) if !opts[:'phone_number'].nil? query_params[:'external_id'] = @api_client.build_collection_param(opts[:'external_id'], :multi) if !opts[:'external_id'].nil? query_params[:'username'] = @api_client.build_collection_param(opts[:'username'], :multi) if !opts[:'username'].nil? query_params[:'web3_wallet'] = @api_client.build_collection_param(opts[:'web3_wallet'], :multi) if !opts[:'web3_wallet'].nil? query_params[:'user_id'] = @api_client.build_collection_param(opts[:'user_id'], :multi) if !opts[:'user_id'].nil? query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'TotalCount' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"UsersApi.get_users_count", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#get_users_count\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create(create_user_request, opts = {}) ⇒ User
Create a new user Creates a new user. Your user management settings determine how you should setup your user model. Any email address and phone number created using this method will be marked as verified. Note: If you are performing a migration, check out our guide on [zero downtime migrations](clerk.com/docs/deployments/migrate-overview). A rate limit rule of 20 requests per 10 seconds is applied to this endpoint.
93 94 95 96 |
# File 'lib/clerk-http-client/api/users_api.rb', line 93 def create(create_user_request, opts = {}) data, _status_code, _headers = create_with_http_info(create_user_request, opts) data end |
#create_totp(user_id, opts = {}) ⇒ TOTP
Create a TOTP for a user Creates a TOTP (Time-based One-Time Password) for a given user, returning both the TOTP secret and the URI.
163 164 165 166 |
# File 'lib/clerk-http-client/api/users_api.rb', line 163 def create_totp(user_id, opts = {}) data, _status_code, _headers = create_totp_with_http_info(user_id, opts) data end |
#create_totp_with_http_info(user_id, opts = {}) ⇒ Array<(TOTP, Integer, Hash)>
Create a TOTP for a user Creates a TOTP (Time-based One-Time Password) for a given user, returning both the TOTP secret and the URI. POST
174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 |
# File 'lib/clerk-http-client/api/users_api.rb', line 174 def create_totp_with_http_info(user_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UsersApi.create_user_totp ...' end # verify the required parameter 'user_id' is set if @api_client.config.client_side_validation && user_id.nil? fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.create_user_totp" end # resource path local_var_path = '/users/{user_id}/totp'.sub('{' + 'user_id' + '}', CGI.escape(user_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'TOTP' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"UsersApi.create_user_totp", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#create_user_totp\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_with_http_info(create_user_request, opts = {}) ⇒ Array<(User, Integer, Hash)>
Create a new user Creates a new user. Your user management settings determine how you should setup your user model. Any email address and phone number created using this method will be marked as verified. Note: If you are performing a migration, check out our guide on [zero downtime migrations](clerk.com/docs/deployments/migrate-overview). A rate limit rule of 20 requests per 10 seconds is applied to this endpoint. POST
104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 |
# File 'lib/clerk-http-client/api/users_api.rb', line 104 def create_with_http_info(create_user_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UsersApi.create_user ...' end # verify the required parameter 'create_user_request' is set if @api_client.config.client_side_validation && create_user_request.nil? fail ArgumentError, "Missing the required parameter 'create_user_request' when calling UsersApi.create_user" end # resource path local_var_path = '/users' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(create_user_request) # return_type return_type = opts[:debug_return_type] || 'User' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"UsersApi.create_user", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#create_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete(user_id, opts = {}) ⇒ DeletedObject
Delete a user Delete the specified user
429 430 431 432 |
# File 'lib/clerk-http-client/api/users_api.rb', line 429 def delete(user_id, opts = {}) data, _status_code, _headers = delete_with_http_info(user_id, opts) data end |
#delete_backup_code(user_id, opts = {}) ⇒ DisableMFA200Response
Disable all user’s Backup codes Disable all of a user’s backup codes.
228 229 230 231 |
# File 'lib/clerk-http-client/api/users_api.rb', line 228 def delete_backup_code(user_id, opts = {}) data, _status_code, _headers = delete_backup_code_with_http_info(user_id, opts) data end |
#delete_backup_code_with_http_info(user_id, opts = {}) ⇒ Array<(DisableMFA200Response, Integer, Hash)>
Disable all user's Backup codes Disable all of a user's backup codes. DELETE
239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 |
# File 'lib/clerk-http-client/api/users_api.rb', line 239 def delete_backup_code_with_http_info(user_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UsersApi.delete_backup_code ...' end # verify the required parameter 'user_id' is set if @api_client.config.client_side_validation && user_id.nil? fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.delete_backup_code" end # resource path local_var_path = '/users/{user_id}/backup_code'.sub('{' + 'user_id' + '}', CGI.escape(user_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'DisableMFA200Response' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"UsersApi.delete_backup_code", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#delete_backup_code\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_external_account(user_id, external_account_id, opts = {}) ⇒ DeletedObject
Delete External Account Delete an external account by ID.
294 295 296 297 |
# File 'lib/clerk-http-client/api/users_api.rb', line 294 def delete_external_account(user_id, external_account_id, opts = {}) data, _status_code, _headers = delete_external_account_with_http_info(user_id, external_account_id, opts) data end |
#delete_external_account_with_http_info(user_id, external_account_id, opts = {}) ⇒ Array<(DeletedObject, Integer, Hash)>
Delete External Account Delete an external account by ID. DELETE
306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 |
# File 'lib/clerk-http-client/api/users_api.rb', line 306 def delete_external_account_with_http_info(user_id, external_account_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UsersApi.delete_external_account ...' end # verify the required parameter 'user_id' is set if @api_client.config.client_side_validation && user_id.nil? fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.delete_external_account" end # verify the required parameter 'external_account_id' is set if @api_client.config.client_side_validation && external_account_id.nil? fail ArgumentError, "Missing the required parameter 'external_account_id' when calling UsersApi.delete_external_account" end # resource path local_var_path = '/users/{user_id}/external_accounts/{external_account_id}'.sub('{' + 'user_id' + '}', CGI.escape(user_id.to_s)).sub('{' + 'external_account_id' + '}', CGI.escape(external_account_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'DeletedObject' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"UsersApi.delete_external_account", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#delete_external_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_passkey(user_id, passkey_identification_id, opts = {}) ⇒ DeletedObject
Delete a user passkey Delete the passkey identification for a given user and notify them through email.
1368 1369 1370 1371 |
# File 'lib/clerk-http-client/api/users_api.rb', line 1368 def delete_passkey(user_id, passkey_identification_id, opts = {}) data, _status_code, _headers = delete_passkey_with_http_info(user_id, passkey_identification_id, opts) data end |
#delete_passkey_with_http_info(user_id, passkey_identification_id, opts = {}) ⇒ Array<(DeletedObject, Integer, Hash)>
Delete a user passkey Delete the passkey identification for a given user and notify them through email. DELETE
1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 |
# File 'lib/clerk-http-client/api/users_api.rb', line 1380 def delete_passkey_with_http_info(user_id, passkey_identification_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UsersApi.user_passkey_delete ...' end # verify the required parameter 'user_id' is set if @api_client.config.client_side_validation && user_id.nil? fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.user_passkey_delete" end # verify the required parameter 'passkey_identification_id' is set if @api_client.config.client_side_validation && passkey_identification_id.nil? fail ArgumentError, "Missing the required parameter 'passkey_identification_id' when calling UsersApi.user_passkey_delete" end # resource path local_var_path = '/users/{user_id}/passkeys/{passkey_identification_id}'.sub('{' + 'user_id' + '}', CGI.escape(user_id.to_s)).sub('{' + 'passkey_identification_id' + '}', CGI.escape(passkey_identification_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'DeletedObject' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"UsersApi.user_passkey_delete", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#user_passkey_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_profile_image(user_id, opts = {}) ⇒ User
Delete user profile image Delete a user’s profile image
494 495 496 497 |
# File 'lib/clerk-http-client/api/users_api.rb', line 494 def delete_profile_image(user_id, opts = {}) data, _status_code, _headers = delete_profile_image_with_http_info(user_id, opts) data end |
#delete_profile_image_with_http_info(user_id, opts = {}) ⇒ Array<(User, Integer, Hash)>
Delete user profile image Delete a user's profile image DELETE
505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 |
# File 'lib/clerk-http-client/api/users_api.rb', line 505 def delete_profile_image_with_http_info(user_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UsersApi.delete_user_profile_image ...' end # verify the required parameter 'user_id' is set if @api_client.config.client_side_validation && user_id.nil? fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.delete_user_profile_image" end # resource path local_var_path = '/users/{user_id}/profile_image'.sub('{' + 'user_id' + '}', CGI.escape(user_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'User' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"UsersApi.delete_user_profile_image", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#delete_user_profile_image\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_totp(user_id, opts = {}) ⇒ DisableMFA200Response
Delete all the user’s TOTPs Deletes all of the user’s TOTPs.
364 365 366 367 |
# File 'lib/clerk-http-client/api/users_api.rb', line 364 def delete_totp(user_id, opts = {}) data, _status_code, _headers = delete_totp_with_http_info(user_id, opts) data end |
#delete_totp_with_http_info(user_id, opts = {}) ⇒ Array<(DisableMFA200Response, Integer, Hash)>
Delete all the user's TOTPs Deletes all of the user's TOTPs. DELETE
375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 |
# File 'lib/clerk-http-client/api/users_api.rb', line 375 def delete_totp_with_http_info(user_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UsersApi.delete_totp ...' end # verify the required parameter 'user_id' is set if @api_client.config.client_side_validation && user_id.nil? fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.delete_totp" end # resource path local_var_path = '/users/{user_id}/totp'.sub('{' + 'user_id' + '}', CGI.escape(user_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'DisableMFA200Response' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"UsersApi.delete_totp", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#delete_totp\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_web3_wallet(user_id, web3_wallet_identification_id, opts = {}) ⇒ DeletedObject
Delete a user web3 wallet Delete the web3 wallet identification for a given user.
1439 1440 1441 1442 |
# File 'lib/clerk-http-client/api/users_api.rb', line 1439 def delete_web3_wallet(user_id, web3_wallet_identification_id, opts = {}) data, _status_code, _headers = delete_web3_wallet_with_http_info(user_id, web3_wallet_identification_id, opts) data end |
#delete_web3_wallet_with_http_info(user_id, web3_wallet_identification_id, opts = {}) ⇒ Array<(DeletedObject, Integer, Hash)>
Delete a user web3 wallet Delete the web3 wallet identification for a given user. DELETE
1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 |
# File 'lib/clerk-http-client/api/users_api.rb', line 1451 def delete_web3_wallet_with_http_info(user_id, web3_wallet_identification_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UsersApi.user_web3_wallet_delete ...' end # verify the required parameter 'user_id' is set if @api_client.config.client_side_validation && user_id.nil? fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.user_web3_wallet_delete" end # verify the required parameter 'web3_wallet_identification_id' is set if @api_client.config.client_side_validation && web3_wallet_identification_id.nil? fail ArgumentError, "Missing the required parameter 'web3_wallet_identification_id' when calling UsersApi.user_web3_wallet_delete" end # resource path local_var_path = '/users/{user_id}/web3_wallets/{web3_wallet_identification_id}'.sub('{' + 'user_id' + '}', CGI.escape(user_id.to_s)).sub('{' + 'web3_wallet_identification_id' + '}', CGI.escape(web3_wallet_identification_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'DeletedObject' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"UsersApi.user_web3_wallet_delete", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#user_web3_wallet_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_with_http_info(user_id, opts = {}) ⇒ Array<(DeletedObject, Integer, Hash)>
Delete a user Delete the specified user DELETE
440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 |
# File 'lib/clerk-http-client/api/users_api.rb', line 440 def delete_with_http_info(user_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UsersApi.delete_user ...' end # verify the required parameter 'user_id' is set if @api_client.config.client_side_validation && user_id.nil? fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.delete_user" end # resource path local_var_path = '/users/{user_id}'.sub('{' + 'user_id' + '}', CGI.escape(user_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'DeletedObject' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"UsersApi.delete_user", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#delete_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#disable_mfa(user_id, opts = {}) ⇒ DisableMFA200Response
Disable a user’s MFA methods Disable all of a user’s MFA methods (e.g. OTP sent via SMS, TOTP on their authenticator app) at once.
559 560 561 562 |
# File 'lib/clerk-http-client/api/users_api.rb', line 559 def disable_mfa(user_id, opts = {}) data, _status_code, _headers = disable_mfa_with_http_info(user_id, opts) data end |
#disable_mfa_with_http_info(user_id, opts = {}) ⇒ Array<(DisableMFA200Response, Integer, Hash)>
Disable a user's MFA methods Disable all of a user's MFA methods (e.g. OTP sent via SMS, TOTP on their authenticator app) at once. DELETE
570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 |
# File 'lib/clerk-http-client/api/users_api.rb', line 570 def disable_mfa_with_http_info(user_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UsersApi.disable_mfa ...' end # verify the required parameter 'user_id' is set if @api_client.config.client_side_validation && user_id.nil? fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.disable_mfa" end # resource path local_var_path = '/users/{user_id}/mfa'.sub('{' + 'user_id' + '}', CGI.escape(user_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'DisableMFA200Response' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"UsersApi.disable_mfa", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#disable_mfa\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#find(user_id, opts = {}) ⇒ User
Retrieve a user Retrieve the details of a user
695 696 697 698 |
# File 'lib/clerk-http-client/api/users_api.rb', line 695 def find(user_id, opts = {}) data, _status_code, _headers = find_with_http_info(user_id, opts) data end |
#find_with_http_info(user_id, opts = {}) ⇒ Array<(User, Integer, Hash)>
Retrieve a user Retrieve the details of a user GET
706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 |
# File 'lib/clerk-http-client/api/users_api.rb', line 706 def find_with_http_info(user_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UsersApi.get_user ...' end # verify the required parameter 'user_id' is set if @api_client.config.client_side_validation && user_id.nil? fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.get_user" end # resource path local_var_path = '/users/{user_id}'.sub('{' + 'user_id' + '}', CGI.escape(user_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'User' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"UsersApi.get_user", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#get_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#lock(user_id, opts = {}) ⇒ User
Lock a user Marks the given user as locked, which means they are not allowed to sign in again until the lock expires. Lock duration can be configured in the instance’s restrictions settings.
947 948 949 950 |
# File 'lib/clerk-http-client/api/users_api.rb', line 947 def lock(user_id, opts = {}) data, _status_code, _headers = lock_with_http_info(user_id, opts) data end |
#lock_with_http_info(user_id, opts = {}) ⇒ Array<(User, Integer, Hash)>
Lock a user Marks the given user as locked, which means they are not allowed to sign in again until the lock expires. Lock duration can be configured in the instance's restrictions settings. POST
958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 |
# File 'lib/clerk-http-client/api/users_api.rb', line 958 def lock_with_http_info(user_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UsersApi.lock_user ...' end # verify the required parameter 'user_id' is set if @api_client.config.client_side_validation && user_id.nil? fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.lock_user" end # resource path local_var_path = '/users/{user_id}/lock'.sub('{' + 'user_id' + '}', CGI.escape(user_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'User' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"UsersApi.lock_user", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#lock_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#oauth_access_token(user_id, provider, opts = {}) ⇒ Array<GetOAuthAccessToken200ResponseInner>
Retrieve the OAuth access token of a user Fetch the corresponding OAuth access token for a user that has previously authenticated with a particular OAuth provider. For OAuth 2.0, if the access token has expired and we have a corresponding refresh token, the access token will be refreshed transparently the new one will be returned.
625 626 627 628 |
# File 'lib/clerk-http-client/api/users_api.rb', line 625 def oauth_access_token(user_id, provider, opts = {}) data, _status_code, _headers = oauth_access_token_with_http_info(user_id, provider, opts) data end |
#oauth_access_token_with_http_info(user_id, provider, opts = {}) ⇒ Array<(Array<GetOAuthAccessToken200ResponseInner>, Integer, Hash)>
Retrieve the OAuth access token of a user Fetch the corresponding OAuth access token for a user that has previously authenticated with a particular OAuth provider. For OAuth 2.0, if the access token has expired and we have a corresponding refresh token, the access token will be refreshed transparently the new one will be returned. GET array
637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 |
# File 'lib/clerk-http-client/api/users_api.rb', line 637 def oauth_access_token_with_http_info(user_id, provider, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UsersApi.get_o_auth_access_token ...' end # verify the required parameter 'user_id' is set if @api_client.config.client_side_validation && user_id.nil? fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.get_o_auth_access_token" end # verify the required parameter 'provider' is set if @api_client.config.client_side_validation && provider.nil? fail ArgumentError, "Missing the required parameter 'provider' when calling UsersApi.get_o_auth_access_token" end # resource path local_var_path = '/users/{user_id}/oauth_access_tokens/{provider}'.sub('{' + 'user_id' + '}', CGI.escape(user_id.to_s)).sub('{' + 'provider' + '}', CGI.escape(provider.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Array<GetOAuthAccessToken200ResponseInner>' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"UsersApi.get_o_auth_access_token", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#get_o_auth_access_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#organization_invitations(user_id, opts = {}) ⇒ OrganizationInvitationsWithPublicOrganizationData
Retrieve all invitations for a user Retrieve a paginated list of the user’s organization invitations
1512 1513 1514 1515 |
# File 'lib/clerk-http-client/api/users_api.rb', line 1512 def organization_invitations(user_id, opts = {}) data, _status_code, _headers = organization_invitations_with_http_info(user_id, opts) data end |
#organization_invitations_with_http_info(user_id, opts = {}) ⇒ Array<(OrganizationInvitationsWithPublicOrganizationData, Integer, Hash)>
Retrieve all invitations for a user Retrieve a paginated list of the user's organization invitations GET
1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 |
# File 'lib/clerk-http-client/api/users_api.rb', line 1526 def organization_invitations_with_http_info(user_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UsersApi.users_get_organization_invitations ...' end # verify the required parameter 'user_id' is set if @api_client.config.client_side_validation && user_id.nil? fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.users_get_organization_invitations" end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 500 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling UsersApi.users_get_organization_invitations, must be smaller than or equal to 500.' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling UsersApi.users_get_organization_invitations, must be greater than or equal to 1.' end if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] < 0 fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling UsersApi.users_get_organization_invitations, must be greater than or equal to 0.' end allowable_values = ["pending", "accepted", "revoked"] if @api_client.config.client_side_validation && opts[:'status'] && !allowable_values.include?(opts[:'status']) fail ArgumentError, "invalid value for \"status\", must be one of #{allowable_values}" end # resource path local_var_path = '/users/{user_id}/organization_invitations'.sub('{' + 'user_id' + '}', CGI.escape(user_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'OrganizationInvitationsWithPublicOrganizationData' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"UsersApi.users_get_organization_invitations", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#users_get_organization_invitations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#organization_memberships(user_id, opts = {}) ⇒ OrganizationMemberships
Retrieve all memberships for a user Retrieve a paginated list of the user’s organization memberships
1601 1602 1603 1604 |
# File 'lib/clerk-http-client/api/users_api.rb', line 1601 def organization_memberships(user_id, opts = {}) data, _status_code, _headers = organization_memberships_with_http_info(user_id, opts) data end |
#organization_memberships_with_http_info(user_id, opts = {}) ⇒ Array<(OrganizationMemberships, Integer, Hash)>
Retrieve all memberships for a user Retrieve a paginated list of the user's organization memberships GET
1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 |
# File 'lib/clerk-http-client/api/users_api.rb', line 1614 def organization_memberships_with_http_info(user_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UsersApi.users_get_organization_memberships ...' end # verify the required parameter 'user_id' is set if @api_client.config.client_side_validation && user_id.nil? fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.users_get_organization_memberships" end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 500 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling UsersApi.users_get_organization_memberships, must be smaller than or equal to 500.' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling UsersApi.users_get_organization_memberships, must be greater than or equal to 1.' end if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] < 0 fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling UsersApi.users_get_organization_memberships, must be greater than or equal to 0.' end # resource path local_var_path = '/users/{user_id}/organization_memberships'.sub('{' + 'user_id' + '}', CGI.escape(user_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'OrganizationMemberships' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"UsersApi.users_get_organization_memberships", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#users_get_organization_memberships\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#unban(user_id, opts = {}) ⇒ User
Unban a user Removes the ban mark from the given user.
1085 1086 1087 1088 |
# File 'lib/clerk-http-client/api/users_api.rb', line 1085 def unban(user_id, opts = {}) data, _status_code, _headers = unban_with_http_info(user_id, opts) data end |
#unban_with_http_info(user_id, opts = {}) ⇒ Array<(User, Integer, Hash)>
Unban a user Removes the ban mark from the given user. POST
1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 |
# File 'lib/clerk-http-client/api/users_api.rb', line 1096 def unban_with_http_info(user_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UsersApi.unban_user ...' end # verify the required parameter 'user_id' is set if @api_client.config.client_side_validation && user_id.nil? fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.unban_user" end # resource path local_var_path = '/users/{user_id}/unban'.sub('{' + 'user_id' + '}', CGI.escape(user_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'User' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"UsersApi.unban_user", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#unban_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#unlock(user_id, opts = {}) ⇒ User
Unlock a user Removes the lock from the given user.
1150 1151 1152 1153 |
# File 'lib/clerk-http-client/api/users_api.rb', line 1150 def unlock(user_id, opts = {}) data, _status_code, _headers = unlock_with_http_info(user_id, opts) data end |
#unlock_with_http_info(user_id, opts = {}) ⇒ Array<(User, Integer, Hash)>
Unlock a user Removes the lock from the given user. POST
1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 |
# File 'lib/clerk-http-client/api/users_api.rb', line 1161 def unlock_with_http_info(user_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UsersApi.unlock_user ...' end # verify the required parameter 'user_id' is set if @api_client.config.client_side_validation && user_id.nil? fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.unlock_user" end # resource path local_var_path = '/users/{user_id}/unlock'.sub('{' + 'user_id' + '}', CGI.escape(user_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'User' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"UsersApi.unlock_user", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#unlock_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update(user_id, update_user_request, opts = {}) ⇒ User
Update a user Update a user’s attributes. You can set the user’s primary contact identifiers (email address and phone numbers) by updating the ‘primary_email_address_id` and `primary_phone_number_id` attributes respectively. Both IDs should correspond to verified identifications that belong to the user. You can remove a user’s username by setting the username attribute to null or the blank string "". This is a destructive action; the identification will be deleted forever. Usernames can be removed only if they are optional in your instance settings and there’s at least one other identifier which can be used for authentication. This endpoint allows changing a user’s password. When passing the ‘password` parameter directly you have two further options. You can ignore the password policy checks for your instance by setting the `skip_password_checks` parameter to `true`. You can also choose to sign the user out of all their active sessions on any device once the password is updated. Just set `sign_out_of_other_sessions` to `true`.
1216 1217 1218 1219 |
# File 'lib/clerk-http-client/api/users_api.rb', line 1216 def update(user_id, update_user_request, opts = {}) data, _status_code, _headers = update_with_http_info(user_id, update_user_request, opts) data end |
#update_metadata(user_id, update_user_metadata_request, opts = {}) ⇒ User
Merge and update a user’s metadata Update a user’s metadata attributes by merging existing values with the provided parameters. This endpoint behaves differently than the *Update a user* endpoint. Metadata values will not be replaced entirely. Instead, a deep merge will be performed. Deep means that any nested JSON objects will be merged as well. You can remove metadata keys at any level by setting their value to ‘null`.
1292 1293 1294 1295 |
# File 'lib/clerk-http-client/api/users_api.rb', line 1292 def (user_id, , opts = {}) data, _status_code, _headers = (user_id, , opts) data end |
#update_metadata_with_http_info(user_id, update_user_metadata_request, opts = {}) ⇒ Array<(User, Integer, Hash)>
Merge and update a user's metadata Update a user's metadata attributes by merging existing values with the provided parameters. This endpoint behaves differently than the *Update a user* endpoint. Metadata values will not be replaced entirely. Instead, a deep merge will be performed. Deep means that any nested JSON objects will be merged as well. You can remove metadata keys at any level by setting their value to `null`. PATCH
1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 |
# File 'lib/clerk-http-client/api/users_api.rb', line 1304 def (user_id, , opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UsersApi.update_user_metadata ...' end # verify the required parameter 'user_id' is set if @api_client.config.client_side_validation && user_id.nil? fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.update_user_metadata" end # verify the required parameter 'update_user_metadata_request' is set if @api_client.config.client_side_validation && .nil? fail ArgumentError, "Missing the required parameter 'update_user_metadata_request' when calling UsersApi.update_user_metadata" end # resource path local_var_path = '/users/{user_id}/metadata'.sub('{' + 'user_id' + '}', CGI.escape(user_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body() # return_type return_type = opts[:debug_return_type] || 'User' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"UsersApi.update_user_metadata", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#update_user_metadata\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_profile_image(user_id, opts = {}) ⇒ User
Set user profile image Update a user’s profile image
1013 1014 1015 1016 |
# File 'lib/clerk-http-client/api/users_api.rb', line 1013 def update_profile_image(user_id, opts = {}) data, _status_code, _headers = update_profile_image_with_http_info(user_id, opts) data end |
#update_profile_image_with_http_info(user_id, opts = {}) ⇒ Array<(User, Integer, Hash)>
Set user profile image Update a user's profile image POST
1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 |
# File 'lib/clerk-http-client/api/users_api.rb', line 1025 def update_profile_image_with_http_info(user_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UsersApi.set_user_profile_image ...' end # verify the required parameter 'user_id' is set if @api_client.config.client_side_validation && user_id.nil? fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.set_user_profile_image" end # resource path local_var_path = '/users/{user_id}/profile_image'.sub('{' + 'user_id' + '}', CGI.escape(user_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['multipart/form-data']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} form_params['file'] = opts[:'file'] if !opts[:'file'].nil? # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'User' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"UsersApi.set_user_profile_image", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#set_user_profile_image\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_with_http_info(user_id, update_user_request, opts = {}) ⇒ Array<(User, Integer, Hash)>
Update a user Update a user's attributes. You can set the user's primary contact identifiers (email address and phone numbers) by updating the `primary_email_address_id` and `primary_phone_number_id` attributes respectively. Both IDs should correspond to verified identifications that belong to the user. You can remove a user's username by setting the username attribute to null or the blank string "". This is a destructive action; the identification will be deleted forever. Usernames can be removed only if they are optional in your instance settings and there's at least one other identifier which can be used for authentication. This endpoint allows changing a user's password. When passing the `password` parameter directly you have two further options. You can ignore the password policy checks for your instance by setting the `skip_password_checks` parameter to `true`. You can also choose to sign the user out of all their active sessions on any device once the password is updated. Just set `sign_out_of_other_sessions` to `true`. PATCH
1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 |
# File 'lib/clerk-http-client/api/users_api.rb', line 1228 def update_with_http_info(user_id, update_user_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UsersApi.update_user ...' end # verify the required parameter 'user_id' is set if @api_client.config.client_side_validation && user_id.nil? fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.update_user" end # verify the required parameter 'update_user_request' is set if @api_client.config.client_side_validation && update_user_request.nil? fail ArgumentError, "Missing the required parameter 'update_user_request' when calling UsersApi.update_user" end # resource path local_var_path = '/users/{user_id}'.sub('{' + 'user_id' + '}', CGI.escape(user_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(update_user_request) # return_type return_type = opts[:debug_return_type] || 'User' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"UsersApi.update_user", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#update_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#verify_password(user_id, verify_password_request, opts = {}) ⇒ VerifyPassword200Response
Verify the password of a user Check that the user’s password matches the supplied input. Useful for custom auth flows and re-verification.
1683 1684 1685 1686 |
# File 'lib/clerk-http-client/api/users_api.rb', line 1683 def verify_password(user_id, verify_password_request, opts = {}) data, _status_code, _headers = verify_password_with_http_info(user_id, verify_password_request, opts) data end |
#verify_password_with_http_info(user_id, verify_password_request, opts = {}) ⇒ Array<(VerifyPassword200Response, Integer, Hash)>
Verify the password of a user Check that the user's password matches the supplied input. Useful for custom auth flows and re-verification. POST
1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 |
# File 'lib/clerk-http-client/api/users_api.rb', line 1695 def verify_password_with_http_info(user_id, verify_password_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UsersApi.verify_password ...' end # verify the required parameter 'user_id' is set if @api_client.config.client_side_validation && user_id.nil? fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.verify_password" end # verify the required parameter 'verify_password_request' is set if @api_client.config.client_side_validation && verify_password_request.nil? fail ArgumentError, "Missing the required parameter 'verify_password_request' when calling UsersApi.verify_password" end # resource path local_var_path = '/users/{user_id}/verify_password'.sub('{' + 'user_id' + '}', CGI.escape(user_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(verify_password_request) # return_type return_type = opts[:debug_return_type] || 'VerifyPassword200Response' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"UsersApi.verify_password", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#verify_password\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#verify_totp(user_id, verify_totp_request, opts = {}) ⇒ VerifyTOTP200Response
Verify a TOTP or backup code for a user Verify that the provided TOTP or backup code is valid for the user. Verifying a backup code will result it in being consumed (i.e. it will become invalid). Useful for custom auth flows and re-verification.
1759 1760 1761 1762 |
# File 'lib/clerk-http-client/api/users_api.rb', line 1759 def verify_totp(user_id, verify_totp_request, opts = {}) data, _status_code, _headers = verify_totp_with_http_info(user_id, verify_totp_request, opts) data end |
#verify_totp_with_http_info(user_id, verify_totp_request, opts = {}) ⇒ Array<(VerifyTOTP200Response, Integer, Hash)>
Verify a TOTP or backup code for a user Verify that the provided TOTP or backup code is valid for the user. Verifying a backup code will result it in being consumed (i.e. it will become invalid). Useful for custom auth flows and re-verification. POST
1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 |
# File 'lib/clerk-http-client/api/users_api.rb', line 1771 def verify_totp_with_http_info(user_id, verify_totp_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UsersApi.verify_totp ...' end # verify the required parameter 'user_id' is set if @api_client.config.client_side_validation && user_id.nil? fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.verify_totp" end # verify the required parameter 'verify_totp_request' is set if @api_client.config.client_side_validation && verify_totp_request.nil? fail ArgumentError, "Missing the required parameter 'verify_totp_request' when calling UsersApi.verify_totp" end # resource path local_var_path = '/users/{user_id}/verify_totp'.sub('{' + 'user_id' + '}', CGI.escape(user_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(verify_totp_request) # return_type return_type = opts[:debug_return_type] || 'VerifyTOTP200Response' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"UsersApi.verify_totp", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#verify_totp\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |