Class: Mudbase::UsersApi
- Inherits:
-
Object
- Object
- Mudbase::UsersApi
- Defined in:
- lib/mudbase/api/users_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#api_me_bootstrap_get(opts = {}) ⇒ ApiMeBootstrapGet200Response
Dashboard bootstrap (session + orgs + default org + projects) Consolidated dashboard warmup in a single round-trip.
-
#api_me_bootstrap_get_with_http_info(opts = {}) ⇒ Array<(ApiMeBootstrapGet200Response, Integer, Hash)>
Dashboard bootstrap (session + orgs + default org + projects) Consolidated dashboard warmup in a single round-trip.
-
#change_password(change_password_request, opts = {}) ⇒ MessageResponse
Change password Change the current user's password.
-
#change_password_with_http_info(change_password_request, opts = {}) ⇒ Array<(MessageResponse, Integer, Hash)>
Change password Change the current user's password.
-
#disable2_fa(disable2_fa_request, opts = {}) ⇒ MessageResponse
Disable 2FA Disable two-factor authentication for the current user.
-
#disable2_fa_with_http_info(disable2_fa_request, opts = {}) ⇒ Array<(MessageResponse, Integer, Hash)>
Disable 2FA Disable two-factor authentication for the current user.
-
#erase_user_data(erase_user_data_request, opts = {}) ⇒ EraseUserData200Response
Delete user data (GDPR Article 17) Request account erasure (right to be forgotten).
-
#erase_user_data_with_http_info(erase_user_data_request, opts = {}) ⇒ Array<(EraseUserData200Response, Integer, Hash)>
Delete user data (GDPR Article 17) Request account erasure (right to be forgotten).
-
#export_user_data(opts = {}) ⇒ ExportUserData200Response
Export user data (GDPR Article 15) Export all user data in JSON format for GDPR data portability compliance.
-
#export_user_data_with_http_info(opts = {}) ⇒ Array<(ExportUserData200Response, Integer, Hash)>
Export user data (GDPR Article 15) Export all user data in JSON format for GDPR data portability compliance.
-
#get_current_user(opts = {}) ⇒ GetCurrentUser200Response
Get current user profile Get the current authenticated user's profile.
-
#get_current_user_with_http_info(opts = {}) ⇒ Array<(GetCurrentUser200Response, Integer, Hash)>
Get current user profile Get the current authenticated user's profile.
-
#initialize(api_client = ApiClient.default) ⇒ UsersApi
constructor
A new instance of UsersApi.
-
#link_o_auth_provider(provider, opts = {}) ⇒ nil
Link OAuth provider to account Initiate OAuth flow to link a new provider to the current account.
-
#link_o_auth_provider_with_http_info(provider, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Link OAuth provider to account Initiate OAuth flow to link a new provider to the current account.
-
#list_o_auth_providers(opts = {}) ⇒ ListOAuthProviders200Response
List linked OAuth providers Get all OAuth providers linked to the current user's account.
-
#list_o_auth_providers_with_http_info(opts = {}) ⇒ Array<(ListOAuthProviders200Response, Integer, Hash)>
List linked OAuth providers Get all OAuth providers linked to the current user's account.
-
#resend_verification_email(opts = {}) ⇒ MessageResponse
Resend verification email Sends a new verification email to the authenticated user.
-
#resend_verification_email_with_http_info(opts = {}) ⇒ Array<(MessageResponse, Integer, Hash)>
Resend verification email Sends a new verification email to the authenticated user.
-
#setup2_fa(opts = {}) ⇒ TwoFASetupResponse
Setup 2FA Setup two-factor authentication for the current user.
-
#setup2_fa_with_http_info(opts = {}) ⇒ Array<(TwoFASetupResponse, Integer, Hash)>
Setup 2FA Setup two-factor authentication for the current user.
-
#unlink_o_auth_provider(provider, opts = {}) ⇒ UnlinkOAuthProvider200Response
Unlink OAuth provider Remove an OAuth provider from the current account.
-
#unlink_o_auth_provider_with_http_info(provider, opts = {}) ⇒ Array<(UnlinkOAuthProvider200Response, Integer, Hash)>
Unlink OAuth provider Remove an OAuth provider from the current account.
-
#update_user_profile(update_user_request, opts = {}) ⇒ UpdateUserProfile200Response
Update user profile Update the current user's profile.
-
#update_user_profile_with_http_info(update_user_request, opts = {}) ⇒ Array<(UpdateUserProfile200Response, Integer, Hash)>
Update user profile Update the current user's profile.
-
#verify2_fa(verify2_fa_request, opts = {}) ⇒ MessageResponse
Verify and enable 2FA Verify and enable two-factor authentication for the current user.
-
#verify2_fa_with_http_info(verify2_fa_request, opts = {}) ⇒ Array<(MessageResponse, Integer, Hash)>
Verify and enable 2FA Verify and enable two-factor authentication for the current user.
-
#verify_email(verify_email_auth_request, opts = {}) ⇒ MessageResponse
Verify email address (organization and project) Verifies the user's email using the token from the link sent at signup.
-
#verify_email_with_http_info(verify_email_auth_request, opts = {}) ⇒ Array<(MessageResponse, Integer, Hash)>
Verify email address (organization and project) Verifies the user's email using the token from the link sent at signup.
Constructor Details
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/mudbase/api/users_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#api_me_bootstrap_get(opts = {}) ⇒ ApiMeBootstrapGet200Response
Dashboard bootstrap (session + orgs + default org + projects) Consolidated dashboard warmup in a single round-trip. Returns the session user, the user's organizations, the resolved default organization, and that org's projects. Shapes match GET /api/auth/session, GET /api/orgs and GET /api/projects.
26 27 28 29 |
# File 'lib/mudbase/api/users_api.rb', line 26 def api_me_bootstrap_get(opts = {}) data, _status_code, _headers = api_me_bootstrap_get_with_http_info(opts) data end |
#api_me_bootstrap_get_with_http_info(opts = {}) ⇒ Array<(ApiMeBootstrapGet200Response, Integer, Hash)>
Dashboard bootstrap (session + orgs + default org + projects) Consolidated dashboard warmup in a single round-trip. Returns the session user, the user's organizations, the resolved default organization, and that org's projects. Shapes match GET /api/auth/session, GET /api/orgs and GET /api/projects.
35 36 37 38 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 |
# File 'lib/mudbase/api/users_api.rb', line 35 def api_me_bootstrap_get_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UsersApi.api_me_bootstrap_get ...' end # resource path local_var_path = '/api/me/bootstrap' # 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] || 'ApiMeBootstrapGet200Response' # auth_names auth_names = opts[:debug_auth_names] || ['OrgBearerAuth'] = opts.merge( :operation => :"UsersApi.api_me_bootstrap_get", :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#api_me_bootstrap_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#change_password(change_password_request, opts = {}) ⇒ MessageResponse
Change password Change the current user's password. Accepts JWT Bearer token (OrgBearerAuth or ProjectBearerAuth - both are the same JWT token format). API keys are not supported for this endpoint.
84 85 86 87 |
# File 'lib/mudbase/api/users_api.rb', line 84 def change_password(change_password_request, opts = {}) data, _status_code, _headers = change_password_with_http_info(change_password_request, opts) data end |
#change_password_with_http_info(change_password_request, opts = {}) ⇒ Array<(MessageResponse, Integer, Hash)>
Change password Change the current user's password. Accepts JWT Bearer token (OrgBearerAuth or ProjectBearerAuth - both are the same JWT token format). API keys are not supported for this endpoint.
94 95 96 97 98 99 100 101 102 103 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 |
# File 'lib/mudbase/api/users_api.rb', line 94 def change_password_with_http_info(change_password_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UsersApi.change_password ...' end # verify the required parameter 'change_password_request' is set if @api_client.config.client_side_validation && change_password_request.nil? fail ArgumentError, "Missing the required parameter 'change_password_request' when calling UsersApi.change_password" end # resource path local_var_path = '/api/users/password' # 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(change_password_request) # return_type return_type = opts[:debug_return_type] || 'MessageResponse' # auth_names auth_names = opts[:debug_auth_names] || ['OrgBearerAuth', 'ProjectBearerAuth'] = opts.merge( :operation => :"UsersApi.change_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(:PATCH, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#change_password\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#disable2_fa(disable2_fa_request, opts = {}) ⇒ MessageResponse
Disable 2FA Disable two-factor authentication for the current user. Requires JWT Bearer token authentication. Both OrgBearerAuth and ProjectBearerAuth are supported (they use the same JWT token format). API keys are not supported for this endpoint.
152 153 154 155 |
# File 'lib/mudbase/api/users_api.rb', line 152 def disable2_fa(disable2_fa_request, opts = {}) data, _status_code, _headers = disable2_fa_with_http_info(disable2_fa_request, opts) data end |
#disable2_fa_with_http_info(disable2_fa_request, opts = {}) ⇒ Array<(MessageResponse, Integer, Hash)>
Disable 2FA Disable two-factor authentication for the current user. Requires JWT Bearer token authentication. Both OrgBearerAuth and ProjectBearerAuth are supported (they use the same JWT token format). API keys are not supported for this endpoint.
162 163 164 165 166 167 168 169 170 171 172 173 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 |
# File 'lib/mudbase/api/users_api.rb', line 162 def disable2_fa_with_http_info(disable2_fa_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UsersApi.disable2_fa ...' end # verify the required parameter 'disable2_fa_request' is set if @api_client.config.client_side_validation && disable2_fa_request.nil? fail ArgumentError, "Missing the required parameter 'disable2_fa_request' when calling UsersApi.disable2_fa" end # resource path local_var_path = '/api/users/2fa/disable' # 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(disable2_fa_request) # return_type return_type = opts[:debug_return_type] || 'MessageResponse' # auth_names auth_names = opts[:debug_auth_names] || ['OrgBearerAuth', 'ProjectBearerAuth'] = opts.merge( :operation => :"UsersApi.disable2_fa", :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#disable2_fa\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#erase_user_data(erase_user_data_request, opts = {}) ⇒ EraseUserData200Response
Delete user data (GDPR Article 17)
Request account erasure (right to be forgotten). Anonymizes PII, revokes all sessions and API keys, and disables the account immediately (not a grace period - the effect is immediate and irreversible). Accepts JWT Bearer token (OrgBearerAuth or ProjectBearerAuth - both are the same JWT token format). API keys are not supported for this endpoint. Requires re-proving your current password (skipped only for OAuth-only accounts with no password set) and, if 2FA is enabled, a fresh TOTP code - the same step-up re-authentication already required by the less-destructive PATCH /api/users/password and POST /api/users/2fa/disable.
220 221 222 223 |
# File 'lib/mudbase/api/users_api.rb', line 220 def erase_user_data(erase_user_data_request, opts = {}) data, _status_code, _headers = erase_user_data_with_http_info(erase_user_data_request, opts) data end |
#erase_user_data_with_http_info(erase_user_data_request, opts = {}) ⇒ Array<(EraseUserData200Response, Integer, Hash)>
Delete user data (GDPR Article 17) Request account erasure (right to be forgotten). Anonymizes PII, revokes all sessions and API keys, and disables the account immediately (not a grace period - the effect is immediate and irreversible). Accepts JWT Bearer token (OrgBearerAuth or ProjectBearerAuth - both are the same JWT token format). API keys are not supported for this endpoint. Requires re-proving your current password (skipped only for OAuth-only accounts with no password set) and, if 2FA is enabled, a fresh TOTP code - the same step-up re-authentication already required by the less-destructive `PATCH /api/users/password` and `POST /api/users/2fa/disable`.
230 231 232 233 234 235 236 237 238 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 |
# File 'lib/mudbase/api/users_api.rb', line 230 def erase_user_data_with_http_info(erase_user_data_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UsersApi.erase_user_data ...' end # verify the required parameter 'erase_user_data_request' is set if @api_client.config.client_side_validation && erase_user_data_request.nil? fail ArgumentError, "Missing the required parameter 'erase_user_data_request' when calling UsersApi.erase_user_data" end # resource path local_var_path = '/api/users/me/erase' # 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(erase_user_data_request) # return_type return_type = opts[:debug_return_type] || 'EraseUserData200Response' # auth_names auth_names = opts[:debug_auth_names] || ['OrgBearerAuth', 'ProjectBearerAuth'] = opts.merge( :operation => :"UsersApi.erase_user_data", :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#erase_user_data\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#export_user_data(opts = {}) ⇒ ExportUserData200Response
Export user data (GDPR Article 15) Export all user data in JSON format for GDPR data portability compliance. Accepts JWT Bearer token (OrgBearerAuth or ProjectBearerAuth - both are the same JWT token format). API keys are not supported for this endpoint.
287 288 289 290 |
# File 'lib/mudbase/api/users_api.rb', line 287 def export_user_data(opts = {}) data, _status_code, _headers = export_user_data_with_http_info(opts) data end |
#export_user_data_with_http_info(opts = {}) ⇒ Array<(ExportUserData200Response, Integer, Hash)>
Export user data (GDPR Article 15) Export all user data in JSON format for GDPR data portability compliance. Accepts JWT Bearer token (OrgBearerAuth or ProjectBearerAuth - both are the same JWT token format). API keys are not supported for this endpoint.
296 297 298 299 300 301 302 303 304 305 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 |
# File 'lib/mudbase/api/users_api.rb', line 296 def export_user_data_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UsersApi.export_user_data ...' end # resource path local_var_path = '/api/users/me/export' # 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] || 'ExportUserData200Response' # auth_names auth_names = opts[:debug_auth_names] || ['OrgBearerAuth', 'ProjectBearerAuth'] = opts.merge( :operation => :"UsersApi.export_user_data", :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#export_user_data\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_current_user(opts = {}) ⇒ GetCurrentUser200Response
Get current user profile Get the current authenticated user's profile. Accepts JWT Bearer token (OrgBearerAuth or ProjectBearerAuth - both are the same JWT token format).
344 345 346 347 |
# File 'lib/mudbase/api/users_api.rb', line 344 def get_current_user(opts = {}) data, _status_code, _headers = get_current_user_with_http_info(opts) data end |
#get_current_user_with_http_info(opts = {}) ⇒ Array<(GetCurrentUser200Response, Integer, Hash)>
Get current user profile Get the current authenticated user's profile. Accepts JWT Bearer token (OrgBearerAuth or ProjectBearerAuth - both are the same JWT token format).
353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 |
# File 'lib/mudbase/api/users_api.rb', line 353 def get_current_user_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UsersApi.get_current_user ...' end # resource path local_var_path = '/api/users/me' # 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] || 'GetCurrentUser200Response' # auth_names auth_names = opts[:debug_auth_names] || ['OrgBearerAuth', 'ProjectBearerAuth'] = opts.merge( :operation => :"UsersApi.get_current_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_current_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#link_o_auth_provider(provider, opts = {}) ⇒ nil
Link OAuth provider to account Initiate OAuth flow to link a new provider to the current account. Accepts JWT Bearer token (OrgBearerAuth or ProjectBearerAuth - both are the same JWT token format). API keys are not supported for this endpoint.
403 404 405 406 |
# File 'lib/mudbase/api/users_api.rb', line 403 def link_o_auth_provider(provider, opts = {}) link_o_auth_provider_with_http_info(provider, opts) nil end |
#link_o_auth_provider_with_http_info(provider, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Link OAuth provider to account Initiate OAuth flow to link a new provider to the current account. Accepts JWT Bearer token (OrgBearerAuth or ProjectBearerAuth - both are the same JWT token format). API keys are not supported for this endpoint.
414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 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 |
# File 'lib/mudbase/api/users_api.rb', line 414 def link_o_auth_provider_with_http_info(provider, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UsersApi.link_o_auth_provider ...' 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.link_o_auth_provider" end # verify enum value allowable_values = ["google", "github", "facebook", "microsoft", "apple", "twitter", "discord", "linkedin"] if @api_client.config.client_side_validation && !allowable_values.include?(provider) fail ArgumentError, "invalid value for \"provider\", must be one of #{allowable_values}" end # resource path local_var_path = '/api/users/me/oauth-providers/link/{provider}'.sub('{' + 'provider' + '}', CGI.escape(provider.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'projectId'] = opts[:'project_id'] if !opts[:'project_id'].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] # auth_names auth_names = opts[:debug_auth_names] || ['OrgBearerAuth', 'ProjectBearerAuth'] = opts.merge( :operation => :"UsersApi.link_o_auth_provider", :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#link_o_auth_provider\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_o_auth_providers(opts = {}) ⇒ ListOAuthProviders200Response
List linked OAuth providers Get all OAuth providers linked to the current user's account. Accepts JWT Bearer token (OrgBearerAuth or ProjectBearerAuth - both are the same JWT token format). API keys are not supported for this endpoint.
472 473 474 475 |
# File 'lib/mudbase/api/users_api.rb', line 472 def list_o_auth_providers(opts = {}) data, _status_code, _headers = list_o_auth_providers_with_http_info(opts) data end |
#list_o_auth_providers_with_http_info(opts = {}) ⇒ Array<(ListOAuthProviders200Response, Integer, Hash)>
List linked OAuth providers Get all OAuth providers linked to the current user's account. Accepts JWT Bearer token (OrgBearerAuth or ProjectBearerAuth - both are the same JWT token format). API keys are not supported for this endpoint.
481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 |
# File 'lib/mudbase/api/users_api.rb', line 481 def list_o_auth_providers_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UsersApi.list_o_auth_providers ...' end # resource path local_var_path = '/api/users/me/oauth-providers' # 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] || 'ListOAuthProviders200Response' # auth_names auth_names = opts[:debug_auth_names] || ['OrgBearerAuth', 'ProjectBearerAuth'] = opts.merge( :operation => :"UsersApi.list_o_auth_providers", :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#list_o_auth_providers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#resend_verification_email(opts = {}) ⇒ MessageResponse
Resend verification email Sends a new verification email to the authenticated user. Rate limited (e.g. 3 requests per 15 minutes per user). For project-scoped users the link includes project context.
529 530 531 532 |
# File 'lib/mudbase/api/users_api.rb', line 529 def resend_verification_email(opts = {}) data, _status_code, _headers = resend_verification_email_with_http_info(opts) data end |
#resend_verification_email_with_http_info(opts = {}) ⇒ Array<(MessageResponse, Integer, Hash)>
Resend verification email Sends a new verification email to the authenticated user. Rate limited (e.g. 3 requests per 15 minutes per user). For project-scoped users the link includes project context.
538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 |
# File 'lib/mudbase/api/users_api.rb', line 538 def resend_verification_email_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UsersApi.resend_verification_email ...' end # resource path local_var_path = '/api/users/resend-verification' # 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] || 'MessageResponse' # auth_names auth_names = opts[:debug_auth_names] || ['OrgBearerAuth', 'ProjectBearerAuth'] = opts.merge( :operation => :"UsersApi.resend_verification_email", :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#resend_verification_email\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#setup2_fa(opts = {}) ⇒ TwoFASetupResponse
Setup 2FA Setup two-factor authentication for the current user. Requires JWT Bearer token authentication. Both OrgBearerAuth and ProjectBearerAuth are supported (they use the same JWT token format). API keys are not supported for this endpoint.
586 587 588 589 |
# File 'lib/mudbase/api/users_api.rb', line 586 def setup2_fa(opts = {}) data, _status_code, _headers = setup2_fa_with_http_info(opts) data end |
#setup2_fa_with_http_info(opts = {}) ⇒ Array<(TwoFASetupResponse, Integer, Hash)>
Setup 2FA Setup two-factor authentication for the current user. Requires JWT Bearer token authentication. Both OrgBearerAuth and ProjectBearerAuth are supported (they use the same JWT token format). API keys are not supported for this endpoint.
595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 |
# File 'lib/mudbase/api/users_api.rb', line 595 def setup2_fa_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UsersApi.setup2_fa ...' end # resource path local_var_path = '/api/users/2fa/setup' # 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] || 'TwoFASetupResponse' # auth_names auth_names = opts[:debug_auth_names] || ['OrgBearerAuth', 'ProjectBearerAuth'] = opts.merge( :operation => :"UsersApi.setup2_fa", :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#setup2_fa\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#unlink_o_auth_provider(provider, opts = {}) ⇒ UnlinkOAuthProvider200Response
Unlink OAuth provider Remove an OAuth provider from the current account. Cannot unlink if it's the only authentication method. Requires JWT Bearer token authentication. Both OrgBearerAuth and ProjectBearerAuth are supported (they use the same JWT token format). API keys are not supported for this endpoint.
644 645 646 647 |
# File 'lib/mudbase/api/users_api.rb', line 644 def unlink_o_auth_provider(provider, opts = {}) data, _status_code, _headers = unlink_o_auth_provider_with_http_info(provider, opts) data end |
#unlink_o_auth_provider_with_http_info(provider, opts = {}) ⇒ Array<(UnlinkOAuthProvider200Response, Integer, Hash)>
Unlink OAuth provider Remove an OAuth provider from the current account. Cannot unlink if it's the only authentication method. Requires JWT Bearer token authentication. Both OrgBearerAuth and ProjectBearerAuth are supported (they use the same JWT token format). API keys are not supported for this endpoint.
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 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 |
# File 'lib/mudbase/api/users_api.rb', line 654 def unlink_o_auth_provider_with_http_info(provider, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UsersApi.unlink_o_auth_provider ...' 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.unlink_o_auth_provider" end # verify enum value allowable_values = ["google", "github", "facebook", "microsoft", "apple", "twitter", "discord", "linkedin"] if @api_client.config.client_side_validation && !allowable_values.include?(provider) fail ArgumentError, "invalid value for \"provider\", must be one of #{allowable_values}" end # resource path local_var_path = '/api/users/me/oauth-providers/{provider}'.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] || 'UnlinkOAuthProvider200Response' # auth_names auth_names = opts[:debug_auth_names] || ['OrgBearerAuth', 'ProjectBearerAuth'] = opts.merge( :operation => :"UsersApi.unlink_o_auth_provider", :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#unlink_o_auth_provider\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_user_profile(update_user_request, opts = {}) ⇒ UpdateUserProfile200Response
Update user profile Update the current user's profile. Requires JWT Bearer token authentication. Both OrgBearerAuth and ProjectBearerAuth are supported (they use the same JWT token format). API keys are not supported for this endpoint.
712 713 714 715 |
# File 'lib/mudbase/api/users_api.rb', line 712 def update_user_profile(update_user_request, opts = {}) data, _status_code, _headers = update_user_profile_with_http_info(update_user_request, opts) data end |
#update_user_profile_with_http_info(update_user_request, opts = {}) ⇒ Array<(UpdateUserProfile200Response, Integer, Hash)>
Update user profile Update the current user's profile. Requires JWT Bearer token authentication. Both OrgBearerAuth and ProjectBearerAuth are supported (they use the same JWT token format). API keys are not supported for this endpoint.
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 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 |
# File 'lib/mudbase/api/users_api.rb', line 722 def update_user_profile_with_http_info(update_user_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UsersApi.update_user_profile ...' 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_profile" end # resource path local_var_path = '/api/users/update' # 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] || 'UpdateUserProfile200Response' # auth_names auth_names = opts[:debug_auth_names] || ['OrgBearerAuth', 'ProjectBearerAuth'] = opts.merge( :operation => :"UsersApi.update_user_profile", :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_profile\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#verify2_fa(verify2_fa_request, opts = {}) ⇒ MessageResponse
Verify and enable 2FA Verify and enable two-factor authentication for the current user. Accepts JWT Bearer token (OrgBearerAuth or ProjectBearerAuth - both are the same JWT token format). API keys are not supported for this endpoint.
780 781 782 783 |
# File 'lib/mudbase/api/users_api.rb', line 780 def verify2_fa(verify2_fa_request, opts = {}) data, _status_code, _headers = verify2_fa_with_http_info(verify2_fa_request, opts) data end |
#verify2_fa_with_http_info(verify2_fa_request, opts = {}) ⇒ Array<(MessageResponse, Integer, Hash)>
Verify and enable 2FA Verify and enable two-factor authentication for the current user. Accepts JWT Bearer token (OrgBearerAuth or ProjectBearerAuth - both are the same JWT token format). API keys are not supported for this endpoint.
790 791 792 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 |
# File 'lib/mudbase/api/users_api.rb', line 790 def verify2_fa_with_http_info(verify2_fa_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UsersApi.verify2_fa ...' end # verify the required parameter 'verify2_fa_request' is set if @api_client.config.client_side_validation && verify2_fa_request.nil? fail ArgumentError, "Missing the required parameter 'verify2_fa_request' when calling UsersApi.verify2_fa" end # resource path local_var_path = '/api/users/2fa/verify' # 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(verify2_fa_request) # return_type return_type = opts[:debug_return_type] || 'MessageResponse' # auth_names auth_names = opts[:debug_auth_names] || ['OrgBearerAuth', 'ProjectBearerAuth'] = opts.merge( :operation => :"UsersApi.verify2_fa", :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#verify2_fa\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#verify_email(verify_email_auth_request, opts = {}) ⇒ MessageResponse
Verify email address (organization and project) Verifies the user's email using the token from the link sent at signup. Works for both organization (platform) and project-based signups; the token is from the verification link (e.g. verify-email?token=... for org, or verify-email?token=...&project=... for project).
848 849 850 851 |
# File 'lib/mudbase/api/users_api.rb', line 848 def verify_email(verify_email_auth_request, opts = {}) data, _status_code, _headers = verify_email_with_http_info(verify_email_auth_request, opts) data end |
#verify_email_with_http_info(verify_email_auth_request, opts = {}) ⇒ Array<(MessageResponse, Integer, Hash)>
Verify email address (organization and project) Verifies the user's email using the token from the link sent at signup. Works for both organization (platform) and project-based signups; the token is from the verification link (e.g. verify-email?token=... for org, or verify-email?token=...&project=... for project).
858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 |
# File 'lib/mudbase/api/users_api.rb', line 858 def verify_email_with_http_info(verify_email_auth_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UsersApi.verify_email ...' end # verify the required parameter 'verify_email_auth_request' is set if @api_client.config.client_side_validation && verify_email_auth_request.nil? fail ArgumentError, "Missing the required parameter 'verify_email_auth_request' when calling UsersApi.verify_email" end # resource path local_var_path = '/api/users/verify-email' # 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_email_auth_request) # return_type return_type = opts[:debug_return_type] || 'MessageResponse' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"UsersApi.verify_email", :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_email\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |