Class: Mudbase::AuthApi
- Inherits:
-
Object
- Object
- Mudbase::AuthApi
- Defined in:
- lib/mudbase/api/auth_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#auth_confirm_password_reset(auth_confirm_password_reset_request, opts = {}) ⇒ MessageResponse
Confirm password reset with OTP Set new password using the OTP sent to the user’s email.
-
#auth_confirm_password_reset_with_http_info(auth_confirm_password_reset_request, opts = {}) ⇒ Array<(MessageResponse, Integer, Hash)>
Confirm password reset with OTP Set new password using the OTP sent to the user's email.
-
#auth_convert_anonymous(auth_convert_anonymous_request, opts = {}) ⇒ AuthConvertAnonymous200Response
Convert anonymous account to full account Convert an anonymous user session to a full authenticated account.
-
#auth_convert_anonymous_with_http_info(auth_convert_anonymous_request, opts = {}) ⇒ Array<(AuthConvertAnonymous200Response, Integer, Hash)>
Convert anonymous account to full account Convert an anonymous user session to a full authenticated account.
-
#auth_create_anonymous(opts = {}) ⇒ AuthCreateAnonymous200Response
Create anonymous session Create an anonymous user session for guest access.
-
#auth_create_anonymous_with_http_info(opts = {}) ⇒ Array<(AuthCreateAnonymous200Response, Integer, Hash)>
Create anonymous session Create an anonymous user session for guest access.
-
#auth_get_o_auth_providers(opts = {}) ⇒ AuthGetOAuthProviders200Response
Get all available OAuth providers Returns a list of all supported OAuth providers with their configuration details.
-
#auth_get_o_auth_providers_with_http_info(opts = {}) ⇒ Array<(AuthGetOAuthProviders200Response, Integer, Hash)>
Get all available OAuth providers Returns a list of all supported OAuth providers with their configuration details.
-
#auth_get_session(project_id, opts = {}) ⇒ AuthGetSession200Response
Get current session Get the current authenticated user session.
-
#auth_get_session_with_http_info(project_id, opts = {}) ⇒ Array<(AuthGetSession200Response, Integer, Hash)>
Get current session Get the current authenticated user session.
-
#auth_login(auth_login_request, opts = {}) ⇒ AuthLogin200Response
Login user When the project has requireEmailVerification enabled and the user has not verified their email, returns 403 with code EMAIL_VERIFICATION_REQUIRED (user must verify email first, then login again).
-
#auth_login_with_http_info(auth_login_request, opts = {}) ⇒ Array<(AuthLogin200Response, Integer, Hash)>
Login user When the project has requireEmailVerification enabled and the user has not verified their email, returns 403 with code EMAIL_VERIFICATION_REQUIRED (user must verify email first, then login again).
-
#auth_logout(opts = {}) ⇒ MessageResponse
Logout user Logout the current authenticated user session.
-
#auth_logout_with_http_info(opts = {}) ⇒ Array<(MessageResponse, Integer, Hash)>
Logout user Logout the current authenticated user session.
-
#auth_oauth_callback(provider, opts = {}) ⇒ AuthOauthCallback200Response
OAuth callback handler OAuth provider redirects the user here after consent.
-
#auth_oauth_callback_with_http_info(provider, opts = {}) ⇒ Array<(AuthOauthCallback200Response, Integer, Hash)>
OAuth callback handler OAuth provider redirects the user here after consent.
-
#auth_oauth_initiate(provider, project_id, opts = {}) ⇒ AuthOauthInitiate200Response
Initiate OAuth authentication Initiates OAuth authentication flow for a specified provider and project.
-
#auth_oauth_initiate_with_http_info(provider, project_id, opts = {}) ⇒ Array<(AuthOauthInitiate200Response, Integer, Hash)>
Initiate OAuth authentication Initiates OAuth authentication flow for a specified provider and project.
-
#auth_refresh(auth_refresh_request, opts = {}) ⇒ AuthRefresh200Response
Refresh access token (org and project) Exchange a valid refresh token for a new JWT access token and refresh token.
-
#auth_refresh_with_http_info(auth_refresh_request, opts = {}) ⇒ Array<(AuthRefresh200Response, Integer, Hash)>
Refresh access token (org and project) Exchange a valid refresh token for a new JWT access token and refresh token.
-
#auth_register(auth_register_request, opts = {}) ⇒ AuthRegister201Response
Register new user When the project has requireEmailVerification enabled (default), the response is 201 with **requireVerification: true** and **no token**; the user must verify their email then sign in via login.
-
#auth_register_with_http_info(auth_register_request, opts = {}) ⇒ Array<(AuthRegister201Response, Integer, Hash)>
Register new user When the project has requireEmailVerification enabled (default), the response is 201 with **requireVerification: true** and **no token**; the user must verify their email then sign in via login.
-
#auth_request_password_reset(auth_request_password_reset_request, opts = {}) ⇒ MessageResponse
Request password reset (OTP) When projectId is provided, sends a 6-digit OTP to the user’s email (app reset uses OTP, not link).
-
#auth_request_password_reset_with_http_info(auth_request_password_reset_request, opts = {}) ⇒ Array<(MessageResponse, Integer, Hash)>
Request password reset (OTP) When projectId is provided, sends a 6-digit OTP to the user's email (app reset uses OTP, not link).
-
#auth_reset_password(token, auth_reset_password_request, opts = {}) ⇒ MessageResponse
Reset password with token (legacy) Legacy token-based completion.
-
#auth_reset_password_with_http_info(token, auth_reset_password_request, opts = {}) ⇒ Array<(MessageResponse, Integer, Hash)>
Reset password with token (legacy) Legacy token-based completion.
-
#auth_send_magic_link(magic_link_request, opts = {}) ⇒ MessageResponse
Send magic link Sends a one-time magic link to the given email for the project.
-
#auth_send_magic_link_with_http_info(magic_link_request, opts = {}) ⇒ Array<(MessageResponse, Integer, Hash)>
Send magic link Sends a one-time magic link to the given email for the project.
-
#auth_send_otp(otp_send_request, opts = {}) ⇒ MessageResponse
Send OTP code Sends a one-time code via SMS or email for the given project.
-
#auth_send_otp_with_http_info(otp_send_request, opts = {}) ⇒ Array<(MessageResponse, Integer, Hash)>
Send OTP code Sends a one-time code via SMS or email for the given project.
-
#auth_verify_magic_link(auth_verify_magic_link_request, opts = {}) ⇒ AuthResponse
Verify magic link Exchanges the magic link token (from the link sent by send) for a session.
-
#auth_verify_magic_link_with_http_info(auth_verify_magic_link_request, opts = {}) ⇒ Array<(AuthResponse, Integer, Hash)>
Verify magic link Exchanges the magic link token (from the link sent by send) for a session.
-
#auth_verify_otp(otp_verify_request, opts = {}) ⇒ AuthResponse
Verify OTP code Verifies the OTP code and returns a session token and user.
-
#auth_verify_otp_with_http_info(otp_verify_request, opts = {}) ⇒ Array<(AuthResponse, Integer, Hash)>
Verify OTP code Verifies the OTP code and returns a session token and user.
-
#initialize(api_client = ApiClient.default) ⇒ AuthApi
constructor
A new instance of AuthApi.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ AuthApi
Returns a new instance of AuthApi.
19 20 21 |
# File 'lib/mudbase/api/auth_api.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/mudbase/api/auth_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#auth_confirm_password_reset(auth_confirm_password_reset_request, opts = {}) ⇒ MessageResponse
Confirm password reset with OTP Set new password using the OTP sent to the user’s email. Call after POST /api/auth/local/password-reset with projectId. Rate limited (OTP limit). If the user’s email was not yet verified, it is marked as verified upon successful reset.
27 28 29 30 |
# File 'lib/mudbase/api/auth_api.rb', line 27 def auth_confirm_password_reset(auth_confirm_password_reset_request, opts = {}) data, _status_code, _headers = auth_confirm_password_reset_with_http_info(auth_confirm_password_reset_request, opts) data end |
#auth_confirm_password_reset_with_http_info(auth_confirm_password_reset_request, opts = {}) ⇒ Array<(MessageResponse, Integer, Hash)>
Confirm password reset with OTP Set new password using the OTP sent to the user's email. Call after POST /api/auth/local/password-reset with projectId. Rate limited (OTP limit). If the user's email was not yet verified, it is marked as verified upon successful reset.
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 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/mudbase/api/auth_api.rb', line 37 def auth_confirm_password_reset_with_http_info(auth_confirm_password_reset_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AuthApi.auth_confirm_password_reset ...' end # verify the required parameter 'auth_confirm_password_reset_request' is set if @api_client.config.client_side_validation && auth_confirm_password_reset_request.nil? fail ArgumentError, "Missing the required parameter 'auth_confirm_password_reset_request' when calling AuthApi.auth_confirm_password_reset" end # resource path local_var_path = '/api/auth/local/password-reset/confirm' # 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(auth_confirm_password_reset_request) # return_type return_type = opts[:debug_return_type] || 'MessageResponse' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"AuthApi.auth_confirm_password_reset", :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: AuthApi#auth_confirm_password_reset\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#auth_convert_anonymous(auth_convert_anonymous_request, opts = {}) ⇒ AuthConvertAnonymous200Response
Convert anonymous account to full account Convert an anonymous user session to a full authenticated account. Preserves user data. Requires JWT Bearer token (BearerToken). API keys are not supported for this endpoint.
95 96 97 98 |
# File 'lib/mudbase/api/auth_api.rb', line 95 def auth_convert_anonymous(auth_convert_anonymous_request, opts = {}) data, _status_code, _headers = auth_convert_anonymous_with_http_info(auth_convert_anonymous_request, opts) data end |
#auth_convert_anonymous_with_http_info(auth_convert_anonymous_request, opts = {}) ⇒ Array<(AuthConvertAnonymous200Response, Integer, Hash)>
Convert anonymous account to full account Convert an anonymous user session to a full authenticated account. Preserves user data. Requires JWT Bearer token (BearerToken). API keys are not supported for this endpoint.
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 156 |
# File 'lib/mudbase/api/auth_api.rb', line 105 def auth_convert_anonymous_with_http_info(auth_convert_anonymous_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AuthApi.auth_convert_anonymous ...' end # verify the required parameter 'auth_convert_anonymous_request' is set if @api_client.config.client_side_validation && auth_convert_anonymous_request.nil? fail ArgumentError, "Missing the required parameter 'auth_convert_anonymous_request' when calling AuthApi.auth_convert_anonymous" end # resource path local_var_path = '/api/auth/anonymous/convert' # 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(auth_convert_anonymous_request) # return_type return_type = opts[:debug_return_type] || 'AuthConvertAnonymous200Response' # auth_names auth_names = opts[:debug_auth_names] || ['BearerToken'] = opts.merge( :operation => :"AuthApi.auth_convert_anonymous", :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: AuthApi#auth_convert_anonymous\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#auth_create_anonymous(opts = {}) ⇒ AuthCreateAnonymous200Response
Create anonymous session Create an anonymous user session for guest access. Users can later convert to full accounts.
163 164 165 166 |
# File 'lib/mudbase/api/auth_api.rb', line 163 def auth_create_anonymous(opts = {}) data, _status_code, _headers = auth_create_anonymous_with_http_info(opts) data end |
#auth_create_anonymous_with_http_info(opts = {}) ⇒ Array<(AuthCreateAnonymous200Response, Integer, Hash)>
Create anonymous session Create an anonymous user session for guest access. Users can later convert to full accounts.
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 214 215 216 217 218 219 220 |
# File 'lib/mudbase/api/auth_api.rb', line 173 def auth_create_anonymous_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AuthApi.auth_create_anonymous ...' end # resource path local_var_path = '/api/auth/anonymous' # 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(opts[:'auth_create_anonymous_request']) # return_type return_type = opts[:debug_return_type] || 'AuthCreateAnonymous200Response' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"AuthApi.auth_create_anonymous", :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: AuthApi#auth_create_anonymous\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#auth_get_o_auth_providers(opts = {}) ⇒ AuthGetOAuthProviders200Response
Get all available OAuth providers Returns a list of all supported OAuth providers with their configuration details
226 227 228 229 |
# File 'lib/mudbase/api/auth_api.rb', line 226 def auth_get_o_auth_providers(opts = {}) data, _status_code, _headers = auth_get_o_auth_providers_with_http_info(opts) data end |
#auth_get_o_auth_providers_with_http_info(opts = {}) ⇒ Array<(AuthGetOAuthProviders200Response, Integer, Hash)>
Get all available OAuth providers Returns a list of all supported OAuth providers with their configuration details
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 |
# File 'lib/mudbase/api/auth_api.rb', line 235 def auth_get_o_auth_providers_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AuthApi.auth_get_o_auth_providers ...' end # resource path local_var_path = '/api/auth/oauth/providers/available' # 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] || 'AuthGetOAuthProviders200Response' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"AuthApi.auth_get_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: AuthApi#auth_get_o_auth_providers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#auth_get_session(project_id, opts = {}) ⇒ AuthGetSession200Response
Get current session Get the current authenticated user session. Requires JWT Bearer token (BearerToken). API keys are not supported for this endpoint.
284 285 286 287 |
# File 'lib/mudbase/api/auth_api.rb', line 284 def auth_get_session(project_id, opts = {}) data, _status_code, _headers = auth_get_session_with_http_info(project_id, opts) data end |
#auth_get_session_with_http_info(project_id, opts = {}) ⇒ Array<(AuthGetSession200Response, Integer, Hash)>
Get current session Get the current authenticated user session. Requires JWT Bearer token (BearerToken). API keys are not supported for this endpoint.
294 295 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 339 340 341 |
# File 'lib/mudbase/api/auth_api.rb', line 294 def auth_get_session_with_http_info(project_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AuthApi.auth_get_session ...' end # verify the required parameter 'project_id' is set if @api_client.config.client_side_validation && project_id.nil? fail ArgumentError, "Missing the required parameter 'project_id' when calling AuthApi.auth_get_session" end # resource path local_var_path = '/api/auth/local/session' # query parameters query_params = opts[:query_params] || {} query_params[:'projectId'] = project_id # 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] || 'AuthGetSession200Response' # auth_names auth_names = opts[:debug_auth_names] || ['BearerToken'] = opts.merge( :operation => :"AuthApi.auth_get_session", :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: AuthApi#auth_get_session\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#auth_login(auth_login_request, opts = {}) ⇒ AuthLogin200Response
Login user When the project has requireEmailVerification enabled and the user has not verified their email, returns 403 with code EMAIL_VERIFICATION_REQUIRED (user must verify email first, then login again).
348 349 350 351 |
# File 'lib/mudbase/api/auth_api.rb', line 348 def auth_login(auth_login_request, opts = {}) data, _status_code, _headers = auth_login_with_http_info(auth_login_request, opts) data end |
#auth_login_with_http_info(auth_login_request, opts = {}) ⇒ Array<(AuthLogin200Response, Integer, Hash)>
Login user When the project has requireEmailVerification enabled and the user has not verified their email, returns 403 with code EMAIL_VERIFICATION_REQUIRED (user must verify email first, then login again).
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 396 397 398 399 400 401 402 403 404 405 406 407 408 409 |
# File 'lib/mudbase/api/auth_api.rb', line 358 def auth_login_with_http_info(auth_login_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AuthApi.auth_login ...' end # verify the required parameter 'auth_login_request' is set if @api_client.config.client_side_validation && auth_login_request.nil? fail ArgumentError, "Missing the required parameter 'auth_login_request' when calling AuthApi.auth_login" end # resource path local_var_path = '/api/auth/local/login' # 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(auth_login_request) # return_type return_type = opts[:debug_return_type] || 'AuthLogin200Response' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"AuthApi.auth_login", :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: AuthApi#auth_login\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#auth_logout(opts = {}) ⇒ MessageResponse
Logout user Logout the current authenticated user session. Requires JWT Bearer token (BearerToken). API keys are not supported for this endpoint.
415 416 417 418 |
# File 'lib/mudbase/api/auth_api.rb', line 415 def auth_logout(opts = {}) data, _status_code, _headers = auth_logout_with_http_info(opts) data end |
#auth_logout_with_http_info(opts = {}) ⇒ Array<(MessageResponse, Integer, Hash)>
Logout user Logout the current authenticated user session. Requires JWT Bearer token (BearerToken). API keys are not supported for this endpoint.
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/auth_api.rb', line 424 def auth_logout_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AuthApi.auth_logout ...' end # resource path local_var_path = '/api/auth/local/logout' # 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] || ['BearerToken'] = opts.merge( :operation => :"AuthApi.auth_logout", :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: AuthApi#auth_logout\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#auth_oauth_callback(provider, opts = {}) ⇒ AuthOauthCallback200Response
OAuth callback handler OAuth provider redirects the user here after consent. The server exchanges the code for tokens, creates or finds the user, and redirects to the client with token, refreshToken, and expiresIn in query params.
473 474 475 476 |
# File 'lib/mudbase/api/auth_api.rb', line 473 def auth_oauth_callback(provider, opts = {}) data, _status_code, _headers = auth_oauth_callback_with_http_info(provider, opts) data end |
#auth_oauth_callback_with_http_info(provider, opts = {}) ⇒ Array<(AuthOauthCallback200Response, Integer, Hash)>
OAuth callback handler OAuth provider redirects the user here after consent. The server exchanges the code for tokens, creates or finds the user, and redirects to the client with token, refreshToken, and expiresIn in query params.
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 524 525 526 527 528 529 |
# File 'lib/mudbase/api/auth_api.rb', line 483 def auth_oauth_callback_with_http_info(provider, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AuthApi.auth_oauth_callback ...' 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 AuthApi.auth_oauth_callback" end # resource path local_var_path = '/api/auth/oauth/callback/{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] || 'AuthOauthCallback200Response' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"AuthApi.auth_oauth_callback", :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: AuthApi#auth_oauth_callback\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#auth_oauth_initiate(provider, project_id, opts = {}) ⇒ AuthOauthInitiate200Response
Initiate OAuth authentication Initiates OAuth authentication flow for a specified provider and project. The OAuth provider must be configured and enabled for the project first. After user authentication, redirects to the OAuth provider’s consent screen.
538 539 540 541 |
# File 'lib/mudbase/api/auth_api.rb', line 538 def auth_oauth_initiate(provider, project_id, opts = {}) data, _status_code, _headers = auth_oauth_initiate_with_http_info(provider, project_id, opts) data end |
#auth_oauth_initiate_with_http_info(provider, project_id, opts = {}) ⇒ Array<(AuthOauthInitiate200Response, Integer, Hash)>
Initiate OAuth authentication Initiates OAuth authentication flow for a specified provider and project. The OAuth provider must be configured and enabled for the project first. After user authentication, redirects to the OAuth provider's consent screen.
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 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 |
# File 'lib/mudbase/api/auth_api.rb', line 550 def auth_oauth_initiate_with_http_info(provider, project_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AuthApi.auth_oauth_initiate ...' 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 AuthApi.auth_oauth_initiate" end # verify enum value allowable_values = ["google", "github", "facebook", "microsoft", "apple", "twitter", "discord", "linkedin", "dropbox", "slack", "reddit", "twitch", "figma", "zoom", "bitbucket", "salesforce", "shopify", "line", "spotify", "strava", "paypal", "asana", "trello", "okta", "gitea", "yandex", "yahoo", "vk", "meetup"] if @api_client.config.client_side_validation && !allowable_values.include?(provider) fail ArgumentError, "invalid value for \"provider\", must be one of #{allowable_values}" end # verify the required parameter 'project_id' is set if @api_client.config.client_side_validation && project_id.nil? fail ArgumentError, "Missing the required parameter 'project_id' when calling AuthApi.auth_oauth_initiate" end # resource path local_var_path = '/api/auth/oauth/{provider}/{projectId}'.sub('{' + 'provider' + '}', CGI.escape(provider.to_s)).sub('{' + 'projectId' + '}', CGI.escape(project_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'redirect_url'] = opts[:'redirect_url'] if !opts[:'redirect_url'].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] || 'AuthOauthInitiate200Response' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"AuthApi.auth_oauth_initiate", :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: AuthApi#auth_oauth_initiate\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#auth_refresh(auth_refresh_request, opts = {}) ⇒ AuthRefresh200Response
Refresh access token (org and project) Exchange a valid refresh token for a new JWT access token and refresh token. Works for both organization (platform/dashboard) and app auth; the same endpoint is used. The previous refresh token is invalidated (rotation). If the same refresh token is used again, the session is revoked (reuse detection).
613 614 615 616 |
# File 'lib/mudbase/api/auth_api.rb', line 613 def auth_refresh(auth_refresh_request, opts = {}) data, _status_code, _headers = auth_refresh_with_http_info(auth_refresh_request, opts) data end |
#auth_refresh_with_http_info(auth_refresh_request, opts = {}) ⇒ Array<(AuthRefresh200Response, Integer, Hash)>
Refresh access token (org and project) Exchange a valid refresh token for a new JWT access token and refresh token. Works for both organization (platform/dashboard) and app auth; the same endpoint is used. The previous refresh token is invalidated (rotation). If the same refresh token is used again, the session is revoked (reuse detection).
623 624 625 626 627 628 629 630 631 632 633 634 635 636 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 |
# File 'lib/mudbase/api/auth_api.rb', line 623 def auth_refresh_with_http_info(auth_refresh_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AuthApi.auth_refresh ...' end # verify the required parameter 'auth_refresh_request' is set if @api_client.config.client_side_validation && auth_refresh_request.nil? fail ArgumentError, "Missing the required parameter 'auth_refresh_request' when calling AuthApi.auth_refresh" end # resource path local_var_path = '/api/auth/refresh' # 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(auth_refresh_request) # return_type return_type = opts[:debug_return_type] || 'AuthRefresh200Response' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"AuthApi.auth_refresh", :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: AuthApi#auth_refresh\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#auth_register(auth_register_request, opts = {}) ⇒ AuthRegister201Response
Register new user When the project has requireEmailVerification enabled (default), the response is 201 with **requireVerification: true** and **no token**; the user must verify their email then sign in via login. When email verification is disabled, a token and refreshToken are returned.
681 682 683 684 |
# File 'lib/mudbase/api/auth_api.rb', line 681 def auth_register(auth_register_request, opts = {}) data, _status_code, _headers = auth_register_with_http_info(auth_register_request, opts) data end |
#auth_register_with_http_info(auth_register_request, opts = {}) ⇒ Array<(AuthRegister201Response, Integer, Hash)>
Register new user When the project has requireEmailVerification enabled (default), the response is 201 with **requireVerification: true** and **no token**; the user must verify their email then sign in via login. When email verification is disabled, a token and refreshToken are returned.
691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 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 |
# File 'lib/mudbase/api/auth_api.rb', line 691 def auth_register_with_http_info(auth_register_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AuthApi.auth_register ...' end # verify the required parameter 'auth_register_request' is set if @api_client.config.client_side_validation && auth_register_request.nil? fail ArgumentError, "Missing the required parameter 'auth_register_request' when calling AuthApi.auth_register" end # resource path local_var_path = '/api/auth/local/register' # 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(auth_register_request) # return_type return_type = opts[:debug_return_type] || 'AuthRegister201Response' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"AuthApi.auth_register", :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: AuthApi#auth_register\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#auth_request_password_reset(auth_request_password_reset_request, opts = {}) ⇒ MessageResponse
Request password reset (OTP) When projectId is provided, sends a 6-digit OTP to the user’s email (app reset uses OTP, not link). When projectId is omitted, sends a token link (org/platform local account). Rate limited.
749 750 751 752 |
# File 'lib/mudbase/api/auth_api.rb', line 749 def auth_request_password_reset(auth_request_password_reset_request, opts = {}) data, _status_code, _headers = auth_request_password_reset_with_http_info(auth_request_password_reset_request, opts) data end |
#auth_request_password_reset_with_http_info(auth_request_password_reset_request, opts = {}) ⇒ Array<(MessageResponse, Integer, Hash)>
Request password reset (OTP) When projectId is provided, sends a 6-digit OTP to the user's email (app reset uses OTP, not link). When projectId is omitted, sends a token link (org/platform local account). Rate limited.
759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 |
# File 'lib/mudbase/api/auth_api.rb', line 759 def auth_request_password_reset_with_http_info(auth_request_password_reset_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AuthApi.auth_request_password_reset ...' end # verify the required parameter 'auth_request_password_reset_request' is set if @api_client.config.client_side_validation && auth_request_password_reset_request.nil? fail ArgumentError, "Missing the required parameter 'auth_request_password_reset_request' when calling AuthApi.auth_request_password_reset" end # resource path local_var_path = '/api/auth/local/password-reset' # 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(auth_request_password_reset_request) # return_type return_type = opts[:debug_return_type] || 'MessageResponse' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"AuthApi.auth_request_password_reset", :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: AuthApi#auth_request_password_reset\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#auth_reset_password(token, auth_reset_password_request, opts = {}) ⇒ MessageResponse
Reset password with token (legacy) Legacy token-based completion. Prefer OTP flow: use POST …/password-reset/confirm with the OTP sent to email for app resets.
818 819 820 821 |
# File 'lib/mudbase/api/auth_api.rb', line 818 def auth_reset_password(token, auth_reset_password_request, opts = {}) data, _status_code, _headers = auth_reset_password_with_http_info(token, auth_reset_password_request, opts) data end |
#auth_reset_password_with_http_info(token, auth_reset_password_request, opts = {}) ⇒ Array<(MessageResponse, Integer, Hash)>
Reset password with token (legacy) Legacy token-based completion. Prefer OTP flow: use POST …/password-reset/confirm with the OTP sent to email for app resets.
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 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 |
# File 'lib/mudbase/api/auth_api.rb', line 829 def auth_reset_password_with_http_info(token, auth_reset_password_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AuthApi.auth_reset_password ...' end # verify the required parameter 'token' is set if @api_client.config.client_side_validation && token.nil? fail ArgumentError, "Missing the required parameter 'token' when calling AuthApi.auth_reset_password" end # verify the required parameter 'auth_reset_password_request' is set if @api_client.config.client_side_validation && auth_reset_password_request.nil? fail ArgumentError, "Missing the required parameter 'auth_reset_password_request' when calling AuthApi.auth_reset_password" end # resource path local_var_path = '/api/auth/local/password-reset/{token}'.sub('{' + 'token' + '}', CGI.escape(token.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(auth_reset_password_request) # return_type return_type = opts[:debug_return_type] || 'MessageResponse' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"AuthApi.auth_reset_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: AuthApi#auth_reset_password\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#auth_send_magic_link(magic_link_request, opts = {}) ⇒ MessageResponse
Send magic link Sends a one-time magic link to the given email for the project. The user clicks the link and is authenticated without a password. Use verify endpoint with the token from the link. Public endpoint; rate limited.
891 892 893 894 |
# File 'lib/mudbase/api/auth_api.rb', line 891 def auth_send_magic_link(magic_link_request, opts = {}) data, _status_code, _headers = auth_send_magic_link_with_http_info(magic_link_request, opts) data end |
#auth_send_magic_link_with_http_info(magic_link_request, opts = {}) ⇒ Array<(MessageResponse, Integer, Hash)>
Send magic link Sends a one-time magic link to the given email for the project. The user clicks the link and is authenticated without a password. Use verify endpoint with the token from the link. Public endpoint; rate limited.
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 940 941 942 943 944 945 946 947 948 949 950 951 952 |
# File 'lib/mudbase/api/auth_api.rb', line 901 def auth_send_magic_link_with_http_info(magic_link_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AuthApi.auth_send_magic_link ...' end # verify the required parameter 'magic_link_request' is set if @api_client.config.client_side_validation && magic_link_request.nil? fail ArgumentError, "Missing the required parameter 'magic_link_request' when calling AuthApi.auth_send_magic_link" end # resource path local_var_path = '/api/auth/magic-link/send' # 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(magic_link_request) # return_type return_type = opts[:debug_return_type] || 'MessageResponse' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"AuthApi.auth_send_magic_link", :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: AuthApi#auth_send_magic_link\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#auth_send_otp(otp_send_request, opts = {}) ⇒ MessageResponse
Send OTP code Sends a one-time code via SMS or email for the given project. Use verify endpoint to exchange the code for a session. Public endpoint; rate limited.
959 960 961 962 |
# File 'lib/mudbase/api/auth_api.rb', line 959 def auth_send_otp(otp_send_request, opts = {}) data, _status_code, _headers = auth_send_otp_with_http_info(otp_send_request, opts) data end |
#auth_send_otp_with_http_info(otp_send_request, opts = {}) ⇒ Array<(MessageResponse, Integer, Hash)>
Send OTP code Sends a one-time code via SMS or email for the given project. Use verify endpoint to exchange the code for a session. Public endpoint; rate limited.
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 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 |
# File 'lib/mudbase/api/auth_api.rb', line 969 def auth_send_otp_with_http_info(otp_send_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AuthApi.auth_send_otp ...' end # verify the required parameter 'otp_send_request' is set if @api_client.config.client_side_validation && otp_send_request.nil? fail ArgumentError, "Missing the required parameter 'otp_send_request' when calling AuthApi.auth_send_otp" end # resource path local_var_path = '/api/auth/otp/send' # 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(otp_send_request) # return_type return_type = opts[:debug_return_type] || 'MessageResponse' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"AuthApi.auth_send_otp", :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: AuthApi#auth_send_otp\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#auth_verify_magic_link(auth_verify_magic_link_request, opts = {}) ⇒ AuthResponse
Verify magic link Exchanges the magic link token (from the link sent by send) for a session. Returns token and user on success. Token is short-lived and single-use.
1027 1028 1029 1030 |
# File 'lib/mudbase/api/auth_api.rb', line 1027 def auth_verify_magic_link(auth_verify_magic_link_request, opts = {}) data, _status_code, _headers = auth_verify_magic_link_with_http_info(auth_verify_magic_link_request, opts) data end |
#auth_verify_magic_link_with_http_info(auth_verify_magic_link_request, opts = {}) ⇒ Array<(AuthResponse, Integer, Hash)>
Verify magic link Exchanges the magic link token (from the link sent by send) for a session. Returns token and user on success. Token is short-lived and single-use.
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 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 |
# File 'lib/mudbase/api/auth_api.rb', line 1037 def auth_verify_magic_link_with_http_info(auth_verify_magic_link_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AuthApi.auth_verify_magic_link ...' end # verify the required parameter 'auth_verify_magic_link_request' is set if @api_client.config.client_side_validation && auth_verify_magic_link_request.nil? fail ArgumentError, "Missing the required parameter 'auth_verify_magic_link_request' when calling AuthApi.auth_verify_magic_link" end # resource path local_var_path = '/api/auth/magic-link/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(auth_verify_magic_link_request) # return_type return_type = opts[:debug_return_type] || 'AuthResponse' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"AuthApi.auth_verify_magic_link", :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: AuthApi#auth_verify_magic_link\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#auth_verify_otp(otp_verify_request, opts = {}) ⇒ AuthResponse
Verify OTP code Verifies the OTP code and returns a session token and user. Public endpoint.
1095 1096 1097 1098 |
# File 'lib/mudbase/api/auth_api.rb', line 1095 def auth_verify_otp(otp_verify_request, opts = {}) data, _status_code, _headers = auth_verify_otp_with_http_info(otp_verify_request, opts) data end |
#auth_verify_otp_with_http_info(otp_verify_request, opts = {}) ⇒ Array<(AuthResponse, Integer, Hash)>
Verify OTP code Verifies the OTP code and returns a session token and user. Public endpoint.
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 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 |
# File 'lib/mudbase/api/auth_api.rb', line 1105 def auth_verify_otp_with_http_info(otp_verify_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AuthApi.auth_verify_otp ...' end # verify the required parameter 'otp_verify_request' is set if @api_client.config.client_side_validation && otp_verify_request.nil? fail ArgumentError, "Missing the required parameter 'otp_verify_request' when calling AuthApi.auth_verify_otp" end # resource path local_var_path = '/api/auth/otp/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(otp_verify_request) # return_type return_type = opts[:debug_return_type] || 'AuthResponse' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"AuthApi.auth_verify_otp", :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: AuthApi#auth_verify_otp\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |