onelogin 1.6.0 → 3.0.0.pre.alpha.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/Gemfile +7 -4
- data/README.md +245 -484
- data/Rakefile +7 -3
- data/docs/Action.md +26 -0
- data/docs/ActivateFactorRequest.md +24 -0
- data/docs/AddAccessTokenClaimRequest.md +22 -0
- data/docs/AddClientAppRequest.md +20 -0
- data/docs/AddRoleUsers200ResponseInner.md +18 -0
- data/docs/AddScopeRequest.md +20 -0
- data/docs/AuthMethod.md +15 -0
- data/docs/AuthServerConfiguration.md +24 -0
- data/docs/ClientApp.md +20 -0
- data/docs/Condition.md +22 -0
- data/docs/Connector.md +26 -0
- data/docs/CreateAuthorizationServerRequest.md +22 -0
- data/docs/CreateEnvironmentVariableRequest.md +20 -0
- data/docs/CreateRoles201ResponseInner.md +18 -0
- data/docs/DefaultApi.md +6812 -0
- data/docs/Device.md +26 -0
- data/docs/EnrollFactorRequest.md +28 -0
- data/docs/Envvar.md +24 -0
- data/docs/ErrorStatus.md +22 -0
- data/docs/ErrorStatusErrorsInner.md +20 -0
- data/docs/FactorInner.md +32 -0
- data/docs/FactorInnerFactorData.md +20 -0
- data/docs/GenerateMfaToken200Response.md +24 -0
- data/docs/GenerateMfaToken422Response.md +24 -0
- data/docs/GenerateMfaToken422ResponseDetails.md +18 -0
- data/docs/GenerateMfaTokenRequest.md +20 -0
- data/docs/GenerateSamlAssertionRequest.md +26 -0
- data/docs/GenerateToken200Response.md +28 -0
- data/docs/GenerateToken400Response.md +18 -0
- data/docs/GenerateTokenRequest.md +18 -0
- data/docs/GetAuthorizationServer200Response.md +24 -0
- data/docs/GetAvailableFactors200ResponseInner.md +22 -0
- data/docs/GetClientApps200ResponseInner.md +24 -0
- data/docs/GetClientApps200ResponseInnerScopesInner.md +22 -0
- data/docs/GetRateLimit200Response.md +20 -0
- data/docs/GetRateLimit200ResponseData.md +22 -0
- data/docs/GetRiskScore200Response.md +20 -0
- data/docs/GetRiskScore400Response.md +18 -0
- data/docs/GetRiskScoreRequest.md +30 -0
- data/docs/GetScoreInsights200Response.md +20 -0
- data/docs/GetScoreInsights200ResponseScores.md +26 -0
- data/docs/GetUserApps200ResponseInner.md +32 -0
- data/docs/Hook.md +46 -0
- data/docs/HookConditionsInner.md +22 -0
- data/docs/HookOptions.md +22 -0
- data/docs/HookStatus.md +20 -0
- data/docs/Id.md +18 -0
- data/docs/ListAccessTokenClaims200ResponseInner.md +34 -0
- data/docs/ListActions200ResponseInner.md +20 -0
- data/docs/ListAppUsers200ResponseInner.md +26 -0
- data/docs/ListAuthorizationServers200ResponseInner.md +24 -0
- data/docs/ListAuthorizationServers200ResponseInnerConfiguration.md +20 -0
- data/docs/ListConditionOperators200ResponseInner.md +20 -0
- data/docs/ListConditionValues200ResponseInner.md +20 -0
- data/docs/ListConditions200ResponseInner.md +20 -0
- data/docs/ListMappingConditionOperators200ResponseInner.md +20 -0
- data/docs/ListMappingConditions200ResponseInner.md +20 -0
- data/docs/ListScopes200ResponseInner.md +22 -0
- data/docs/Log.md +24 -0
- data/docs/Mapping.md +30 -0
- data/docs/Registration.md +22 -0
- data/docs/RemoveRoleUsersRequest.md +18 -0
- data/docs/RevokeTokenRequest.md +18 -0
- data/docs/RiskDevice.md +18 -0
- data/docs/RiskRule.md +30 -0
- data/docs/RiskUser.md +22 -0
- data/docs/Role.md +26 -0
- data/docs/Rule.md +30 -0
- data/docs/RuleId.md +18 -0
- data/docs/Schema.md +56 -0
- data/docs/Schema1.md +28 -0
- data/docs/Schema1AddedBy.md +20 -0
- data/docs/SchemaProvisioning.md +18 -0
- data/docs/Session.md +18 -0
- data/docs/SetRoleApps200ResponseInner.md +18 -0
- data/docs/Source.md +20 -0
- data/docs/Status.md +24 -0
- data/docs/Status1.md +22 -0
- data/docs/Status2.md +18 -0
- data/docs/Status2Status.md +24 -0
- data/docs/TrackEventRequest.md +34 -0
- data/docs/UpdateAuthorizationServer400Response.md +24 -0
- data/docs/UpdateClientAppRequest.md +18 -0
- data/docs/UpdateEnvironmentVariableRequest.md +18 -0
- data/docs/UpdateRole200Response.md +18 -0
- data/docs/User.md +90 -0
- data/docs/VerifyEnrollmentRequest.md +18 -0
- data/docs/VerifyFactorRequest.md +20 -0
- data/docs/VerifyFactorSaml200Response.md +20 -0
- data/docs/VerifyFactorSamlRequest.md +26 -0
- data/docs/VerifyFactorVoice200ResponseInner.md +22 -0
- data/git_push.sh +57 -0
- data/lib/onelogin/api/default_api.rb +7334 -0
- data/lib/onelogin/api_client.rb +391 -0
- data/lib/onelogin/api_error.rb +57 -0
- data/lib/onelogin/configuration.rb +282 -0
- data/lib/onelogin/models/action.rb +262 -0
- data/lib/onelogin/models/activate_factor_request.rb +250 -0
- data/lib/onelogin/models/add_access_token_claim_request.rb +237 -0
- data/lib/onelogin/models/add_client_app_request.rb +230 -0
- data/lib/onelogin/models/add_role_users200_response_inner.rb +219 -0
- data/lib/onelogin/models/add_scope_request.rb +228 -0
- data/lib/onelogin/models/auth_method.rb +43 -0
- data/lib/onelogin/models/auth_server_configuration.rb +248 -0
- data/lib/onelogin/models/client_app.rb +228 -0
- data/lib/onelogin/models/condition.rb +240 -0
- data/lib/onelogin/models/connector.rb +259 -0
- data/lib/onelogin/models/create_authorization_server_request.rb +237 -0
- data/lib/onelogin/models/create_environment_variable_request.rb +240 -0
- data/lib/onelogin/models/create_roles201_response_inner.rb +219 -0
- data/lib/onelogin/models/device.rb +255 -0
- data/lib/onelogin/models/enroll_factor_request.rb +280 -0
- data/lib/onelogin/models/envvar.rb +250 -0
- data/lib/onelogin/models/error_status.rb +239 -0
- data/lib/onelogin/models/error_status_errors_inner.rb +230 -0
- data/lib/onelogin/models/factor_inner.rb +323 -0
- data/lib/onelogin/models/factor_inner_factor_data.rb +231 -0
- data/lib/onelogin/models/generate_mfa_token200_response.rb +250 -0
- data/lib/onelogin/models/generate_mfa_token422_response.rb +246 -0
- data/lib/onelogin/models/generate_mfa_token422_response_details.rb +221 -0
- data/lib/onelogin/models/generate_mfa_token_request.rb +230 -0
- data/lib/onelogin/models/generate_saml_assertion_request.rb +280 -0
- data/lib/onelogin/models/generate_token200_response.rb +264 -0
- data/lib/onelogin/models/generate_token400_response.rb +219 -0
- data/lib/onelogin/models/generate_token_request.rb +253 -0
- data/lib/onelogin/models/get_authorization_server200_response.rb +246 -0
- data/lib/onelogin/models/get_available_factors200_response_inner.rb +240 -0
- data/lib/onelogin/models/get_client_apps200_response_inner.rb +248 -0
- data/lib/onelogin/models/get_client_apps200_response_inner_scopes_inner.rb +237 -0
- data/lib/onelogin/models/get_rate_limit200_response.rb +228 -0
- data/lib/onelogin/models/get_rate_limit200_response_data.rb +237 -0
- data/lib/onelogin/models/get_risk_score200_response.rb +256 -0
- data/lib/onelogin/models/get_risk_score400_response.rb +221 -0
- data/lib/onelogin/models/get_risk_score_request.rb +291 -0
- data/lib/onelogin/models/get_score_insights200_response.rb +228 -0
- data/lib/onelogin/models/get_score_insights200_response_scores.rb +255 -0
- data/lib/onelogin/models/get_user_apps200_response_inner.rb +335 -0
- data/lib/onelogin/models/hook.rb +462 -0
- data/lib/onelogin/models/hook_conditions_inner.rb +237 -0
- data/lib/onelogin/models/hook_options.rb +238 -0
- data/lib/onelogin/models/hook_status.rb +228 -0
- data/lib/onelogin/models/id.rb +219 -0
- data/lib/onelogin/models/list_access_token_claims200_response_inner.rb +293 -0
- data/lib/onelogin/models/list_actions200_response_inner.rb +230 -0
- data/lib/onelogin/models/list_app_users200_response_inner.rb +255 -0
- data/lib/onelogin/models/list_authorization_servers200_response_inner.rb +246 -0
- data/lib/onelogin/models/list_authorization_servers200_response_inner_configuration.rb +230 -0
- data/lib/onelogin/models/list_condition_operators200_response_inner.rb +230 -0
- data/lib/onelogin/models/list_condition_values200_response_inner.rb +228 -0
- data/lib/onelogin/models/list_conditions200_response_inner.rb +230 -0
- data/lib/onelogin/models/list_mapping_condition_operators200_response_inner.rb +230 -0
- data/lib/onelogin/models/list_mapping_conditions200_response_inner.rb +230 -0
- data/lib/onelogin/models/list_scopes200_response_inner.rb +237 -0
- data/lib/onelogin/models/log.rb +248 -0
- data/lib/onelogin/models/mapping.rb +342 -0
- data/lib/onelogin/models/registration.rb +274 -0
- data/lib/onelogin/models/remove_role_users_request.rb +221 -0
- data/lib/onelogin/models/revoke_token_request.rb +219 -0
- data/lib/onelogin/models/risk_device.rb +221 -0
- data/lib/onelogin/models/risk_rule.rb +325 -0
- data/lib/onelogin/models/risk_user.rb +248 -0
- data/lib/onelogin/models/role.rb +266 -0
- data/lib/onelogin/models/rule.rb +317 -0
- data/lib/onelogin/models/rule_id.rb +219 -0
- data/lib/onelogin/models/schema.rb +441 -0
- data/lib/onelogin/models/schema1.rb +265 -0
- data/lib/onelogin/models/schema1_added_by.rb +228 -0
- data/lib/onelogin/models/schema_provisioning.rb +220 -0
- data/lib/onelogin/models/session.rb +221 -0
- data/lib/onelogin/models/set_role_apps200_response_inner.rb +220 -0
- data/lib/onelogin/models/source.rb +230 -0
- data/lib/onelogin/models/status.rb +246 -0
- data/lib/onelogin/models/status1.rb +237 -0
- data/lib/onelogin/models/status2.rb +219 -0
- data/lib/onelogin/models/status2_status.rb +246 -0
- data/lib/onelogin/models/track_event_request.rb +316 -0
- data/lib/onelogin/models/update_authorization_server400_response.rb +246 -0
- data/lib/onelogin/models/update_client_app_request.rb +221 -0
- data/lib/onelogin/models/update_environment_variable_request.rb +225 -0
- data/lib/onelogin/models/update_role200_response.rb +219 -0
- data/lib/onelogin/models/user.rb +615 -0
- data/lib/onelogin/models/verify_enrollment_request.rb +219 -0
- data/lib/onelogin/models/verify_factor_request.rb +230 -0
- data/lib/onelogin/models/verify_factor_saml200_response.rb +230 -0
- data/lib/onelogin/models/verify_factor_saml_request.rb +275 -0
- data/lib/onelogin/models/verify_factor_voice200_response_inner.rb +271 -0
- data/lib/onelogin/version.rb +13 -1
- data/lib/onelogin.rb +130 -1
- data/onelogin.gemspec +35 -42
- data/spec/api/default_api_spec.rb +1259 -0
- data/spec/api_client_spec.rb +226 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/action_spec.rb +58 -0
- data/spec/models/activate_factor_request_spec.rb +52 -0
- data/spec/models/add_access_token_claim_request_spec.rb +46 -0
- data/spec/models/add_client_app_request_spec.rb +40 -0
- data/spec/models/add_role_users200_response_inner_spec.rb +34 -0
- data/spec/models/add_scope_request_spec.rb +40 -0
- data/spec/models/auth_method_spec.rb +28 -0
- data/spec/models/auth_server_configuration_spec.rb +52 -0
- data/spec/models/client_app_spec.rb +40 -0
- data/spec/models/condition_spec.rb +46 -0
- data/spec/models/connector_spec.rb +58 -0
- data/spec/models/create_authorization_server_request_spec.rb +46 -0
- data/spec/models/create_environment_variable_request_spec.rb +40 -0
- data/spec/models/create_roles201_response_inner_spec.rb +34 -0
- data/spec/models/device_spec.rb +58 -0
- data/spec/models/enroll_factor_request_spec.rb +64 -0
- data/spec/models/envvar_spec.rb +52 -0
- data/spec/models/error_status_errors_inner_spec.rb +40 -0
- data/spec/models/error_status_spec.rb +46 -0
- data/spec/models/factor_inner_factor_data_spec.rb +40 -0
- data/spec/models/factor_inner_spec.rb +80 -0
- data/spec/models/generate_mfa_token200_response_spec.rb +52 -0
- data/spec/models/generate_mfa_token422_response_details_spec.rb +34 -0
- data/spec/models/generate_mfa_token422_response_spec.rb +52 -0
- data/spec/models/generate_mfa_token_request_spec.rb +40 -0
- data/spec/models/generate_saml_assertion_request_spec.rb +58 -0
- data/spec/models/generate_token200_response_spec.rb +64 -0
- data/spec/models/generate_token400_response_spec.rb +34 -0
- data/spec/models/generate_token_request_spec.rb +38 -0
- data/spec/models/get_authorization_server200_response_spec.rb +52 -0
- data/spec/models/get_available_factors200_response_inner_spec.rb +46 -0
- data/spec/models/get_client_apps200_response_inner_scopes_inner_spec.rb +46 -0
- data/spec/models/get_client_apps200_response_inner_spec.rb +52 -0
- data/spec/models/get_rate_limit200_response_data_spec.rb +46 -0
- data/spec/models/get_rate_limit200_response_spec.rb +40 -0
- data/spec/models/get_risk_score200_response_spec.rb +40 -0
- data/spec/models/get_risk_score400_response_spec.rb +34 -0
- data/spec/models/get_risk_score_request_spec.rb +70 -0
- data/spec/models/get_score_insights200_response_scores_spec.rb +58 -0
- data/spec/models/get_score_insights200_response_spec.rb +40 -0
- data/spec/models/get_user_apps200_response_inner_spec.rb +84 -0
- data/spec/models/hook_conditions_inner_spec.rb +46 -0
- data/spec/models/hook_options_spec.rb +46 -0
- data/spec/models/hook_spec.rb +122 -0
- data/spec/models/hook_status_spec.rb +40 -0
- data/spec/models/id_spec.rb +34 -0
- data/spec/models/list_access_token_claims200_response_inner_spec.rb +82 -0
- data/spec/models/list_actions200_response_inner_spec.rb +40 -0
- data/spec/models/list_app_users200_response_inner_spec.rb +58 -0
- data/spec/models/list_authorization_servers200_response_inner_configuration_spec.rb +40 -0
- data/spec/models/list_authorization_servers200_response_inner_spec.rb +52 -0
- data/spec/models/list_condition_operators200_response_inner_spec.rb +40 -0
- data/spec/models/list_condition_values200_response_inner_spec.rb +40 -0
- data/spec/models/list_conditions200_response_inner_spec.rb +40 -0
- data/spec/models/list_mapping_condition_operators200_response_inner_spec.rb +40 -0
- data/spec/models/list_mapping_conditions200_response_inner_spec.rb +40 -0
- data/spec/models/list_scopes200_response_inner_spec.rb +46 -0
- data/spec/models/log_spec.rb +52 -0
- data/spec/models/mapping_spec.rb +74 -0
- data/spec/models/registration_spec.rb +50 -0
- data/spec/models/remove_role_users_request_spec.rb +34 -0
- data/spec/models/revoke_token_request_spec.rb +34 -0
- data/spec/models/risk_device_spec.rb +34 -0
- data/spec/models/risk_rule_spec.rb +78 -0
- data/spec/models/risk_user_spec.rb +46 -0
- data/spec/models/role_spec.rb +58 -0
- data/spec/models/rule_id_spec.rb +34 -0
- data/spec/models/rule_spec.rb +74 -0
- data/spec/models/schema1_added_by_spec.rb +40 -0
- data/spec/models/schema1_spec.rb +64 -0
- data/spec/models/schema_provisioning_spec.rb +34 -0
- data/spec/models/schema_spec.rb +152 -0
- data/spec/models/session_spec.rb +34 -0
- data/spec/models/set_role_apps200_response_inner_spec.rb +34 -0
- data/spec/models/source_spec.rb +40 -0
- data/spec/models/status1_spec.rb +46 -0
- data/spec/models/status2_spec.rb +34 -0
- data/spec/models/status2_status_spec.rb +52 -0
- data/spec/models/status_spec.rb +52 -0
- data/spec/models/track_event_request_spec.rb +82 -0
- data/spec/models/update_authorization_server400_response_spec.rb +52 -0
- data/spec/models/update_client_app_request_spec.rb +34 -0
- data/spec/models/update_environment_variable_request_spec.rb +34 -0
- data/spec/models/update_role200_response_spec.rb +34 -0
- data/spec/models/user_spec.rb +258 -0
- data/spec/models/verify_enrollment_request_spec.rb +34 -0
- data/spec/models/verify_factor_request_spec.rb +40 -0
- data/spec/models/verify_factor_saml200_response_spec.rb +40 -0
- data/spec/models/verify_factor_saml_request_spec.rb +58 -0
- data/spec/models/verify_factor_voice200_response_inner_spec.rb +50 -0
- data/spec/spec_helper.rb +111 -0
- metadata +401 -216
- data/.github/workflows/git-secrets-public.yml +0 -55
- data/.gitignore +0 -12
- data/.travis.yml +0 -6
- data/bin/console +0 -14
- data/bin/setup +0 -6
- data/examples/Gemfile +0 -3
- data/examples/Gemfile.lock +0 -25
- data/examples/README.md +0 -19
- data/examples/all-users-to-csv.rb +0 -48
- data/examples/another-get-all-login-events-of-last-day-to-csv.rb +0 -141
- data/examples/create-user.rb +0 -16
- data/examples/events-to-csv.rb +0 -93
- data/examples/get-all-login-events-of-last-day-to-csv.rb +0 -88
- data/examples/last-app-user-login-to-csv.rb +0 -72
- data/examples/list-users.rb +0 -15
- data/examples/rails-custom-login-page/.gitignore +0 -45
- data/examples/rails-custom-login-page/.ruby-version +0 -1
- data/examples/rails-custom-login-page/Gemfile +0 -57
- data/examples/rails-custom-login-page/Gemfile.lock +0 -212
- data/examples/rails-custom-login-page/README.md +0 -137
- data/examples/rails-custom-login-page/Rakefile +0 -6
- data/examples/rails-custom-login-page/app/assets/config/manifest.js +0 -3
- data/examples/rails-custom-login-page/app/assets/images/.keep +0 -0
- data/examples/rails-custom-login-page/app/assets/javascripts/application.js +0 -18
- data/examples/rails-custom-login-page/app/assets/javascripts/cable.js +0 -13
- data/examples/rails-custom-login-page/app/assets/javascripts/channels/.keep +0 -0
- data/examples/rails-custom-login-page/app/assets/javascripts/dashboard.coffee +0 -3
- data/examples/rails-custom-login-page/app/assets/javascripts/home.coffee +0 -3
- data/examples/rails-custom-login-page/app/assets/javascripts/sessions.coffee +0 -3
- data/examples/rails-custom-login-page/app/assets/stylesheets/application.css +0 -15
- data/examples/rails-custom-login-page/app/assets/stylesheets/dashboard.scss +0 -3
- data/examples/rails-custom-login-page/app/assets/stylesheets/home.scss +0 -3
- data/examples/rails-custom-login-page/app/assets/stylesheets/sessions.scss +0 -3
- data/examples/rails-custom-login-page/app/channels/application_cable/channel.rb +0 -4
- data/examples/rails-custom-login-page/app/channels/application_cable/connection.rb +0 -4
- data/examples/rails-custom-login-page/app/controllers/application_controller.rb +0 -23
- data/examples/rails-custom-login-page/app/controllers/concerns/.keep +0 -0
- data/examples/rails-custom-login-page/app/controllers/dashboard_controller.rb +0 -10
- data/examples/rails-custom-login-page/app/controllers/home_controller.rb +0 -5
- data/examples/rails-custom-login-page/app/controllers/sessions_controller.rb +0 -46
- data/examples/rails-custom-login-page/app/controllers/users_controller.rb +0 -120
- data/examples/rails-custom-login-page/app/helpers/application_helper.rb +0 -2
- data/examples/rails-custom-login-page/app/helpers/dashboard_helper.rb +0 -28
- data/examples/rails-custom-login-page/app/helpers/home_helper.rb +0 -2
- data/examples/rails-custom-login-page/app/helpers/sessions_helper.rb +0 -87
- data/examples/rails-custom-login-page/app/helpers/users_helper.rb +0 -3
- data/examples/rails-custom-login-page/app/jobs/application_job.rb +0 -2
- data/examples/rails-custom-login-page/app/mailers/application_mailer.rb +0 -4
- data/examples/rails-custom-login-page/app/models/application_record.rb +0 -3
- data/examples/rails-custom-login-page/app/models/concerns/.keep +0 -0
- data/examples/rails-custom-login-page/app/views/dashboard/index.html.erb +0 -43
- data/examples/rails-custom-login-page/app/views/home/index.html.erb +0 -272
- data/examples/rails-custom-login-page/app/views/layouts/application.html.erb +0 -31
- data/examples/rails-custom-login-page/app/views/layouts/mailer.html.erb +0 -13
- data/examples/rails-custom-login-page/app/views/layouts/mailer.text.erb +0 -1
- data/examples/rails-custom-login-page/app/views/users/_form.html.erb +0 -1
- data/examples/rails-custom-login-page/app/views/users/_user.json.jbuilder +0 -2
- data/examples/rails-custom-login-page/app/views/users/edit.html.erb +0 -33
- data/examples/rails-custom-login-page/app/views/users/index.html.erb +0 -33
- data/examples/rails-custom-login-page/app/views/users/index.json.jbuilder +0 -1
- data/examples/rails-custom-login-page/app/views/users/new.html.erb +0 -60
- data/examples/rails-custom-login-page/app/views/users/onboard.html.erb +0 -54
- data/examples/rails-custom-login-page/app/views/users/show.html.erb +0 -17
- data/examples/rails-custom-login-page/app/views/users/show.json.jbuilder +0 -1
- data/examples/rails-custom-login-page/bin/bundle +0 -3
- data/examples/rails-custom-login-page/bin/rails +0 -9
- data/examples/rails-custom-login-page/bin/rake +0 -9
- data/examples/rails-custom-login-page/bin/setup +0 -38
- data/examples/rails-custom-login-page/bin/spring +0 -17
- data/examples/rails-custom-login-page/bin/update +0 -29
- data/examples/rails-custom-login-page/bin/yarn +0 -11
- data/examples/rails-custom-login-page/config/application.rb +0 -18
- data/examples/rails-custom-login-page/config/boot.rb +0 -3
- data/examples/rails-custom-login-page/config/cable.yml +0 -10
- data/examples/rails-custom-login-page/config/database.yml +0 -25
- data/examples/rails-custom-login-page/config/environment.rb +0 -5
- data/examples/rails-custom-login-page/config/environments/development.rb +0 -54
- data/examples/rails-custom-login-page/config/environments/production.rb +0 -91
- data/examples/rails-custom-login-page/config/environments/test.rb +0 -42
- data/examples/rails-custom-login-page/config/initializers/application_controller_renderer.rb +0 -8
- data/examples/rails-custom-login-page/config/initializers/assets.rb +0 -14
- data/examples/rails-custom-login-page/config/initializers/backtrace_silencers.rb +0 -7
- data/examples/rails-custom-login-page/config/initializers/cookies_serializer.rb +0 -5
- data/examples/rails-custom-login-page/config/initializers/filter_parameter_logging.rb +0 -4
- data/examples/rails-custom-login-page/config/initializers/inflections.rb +0 -16
- data/examples/rails-custom-login-page/config/initializers/mime_types.rb +0 -4
- data/examples/rails-custom-login-page/config/initializers/onelogin.rb +0 -6
- data/examples/rails-custom-login-page/config/initializers/wrap_parameters.rb +0 -14
- data/examples/rails-custom-login-page/config/locales/en.yml +0 -33
- data/examples/rails-custom-login-page/config/puma.rb +0 -56
- data/examples/rails-custom-login-page/config/routes.rb +0 -23
- data/examples/rails-custom-login-page/config/secrets.yml.sample +0 -38
- data/examples/rails-custom-login-page/config/spring.rb +0 -6
- data/examples/rails-custom-login-page/config.ru +0 -5
- data/examples/rails-custom-login-page/db/seeds.rb +0 -7
- data/examples/rails-custom-login-page/lib/assets/.keep +0 -0
- data/examples/rails-custom-login-page/lib/tasks/.keep +0 -0
- data/examples/rails-custom-login-page/package.json +0 -5
- data/examples/rails-custom-login-page/public/404.html +0 -67
- data/examples/rails-custom-login-page/public/422.html +0 -67
- data/examples/rails-custom-login-page/public/500.html +0 -66
- data/examples/rails-custom-login-page/public/apple-touch-icon-precomposed.png +0 -0
- data/examples/rails-custom-login-page/public/apple-touch-icon.png +0 -0
- data/examples/rails-custom-login-page/public/favicon.ico +0 -0
- data/examples/rails-custom-login-page/public/robots.txt +0 -1
- data/examples/rails-custom-login-page/test/application_system_test_case.rb +0 -5
- data/examples/rails-custom-login-page/test/controllers/.keep +0 -0
- data/examples/rails-custom-login-page/test/controllers/dashboard_controller_test.rb +0 -9
- data/examples/rails-custom-login-page/test/controllers/home_controller_test.rb +0 -9
- data/examples/rails-custom-login-page/test/controllers/sessions_controller_test.rb +0 -7
- data/examples/rails-custom-login-page/test/controllers/users_controller_test.rb +0 -48
- data/examples/rails-custom-login-page/test/fixtures/.keep +0 -0
- data/examples/rails-custom-login-page/test/fixtures/files/.keep +0 -0
- data/examples/rails-custom-login-page/test/helpers/.keep +0 -0
- data/examples/rails-custom-login-page/test/integration/.keep +0 -0
- data/examples/rails-custom-login-page/test/mailers/.keep +0 -0
- data/examples/rails-custom-login-page/test/models/.keep +0 -0
- data/examples/rails-custom-login-page/test/system/.keep +0 -0
- data/examples/rails-custom-login-page/test/test_helper.rb +0 -9
- data/examples/rails-custom-login-page/vendor/.keep +0 -0
- data/lib/onelogin/api/apiexception.rb +0 -10
- data/lib/onelogin/api/client.rb +0 -2954
- data/lib/onelogin/api/cursor.rb +0 -114
- data/lib/onelogin/api/models/app.rb +0 -22
- data/lib/onelogin/api/models/auth_factor.rb +0 -16
- data/lib/onelogin/api/models/connector_basic.rb +0 -20
- data/lib/onelogin/api/models/device.rb +0 -18
- data/lib/onelogin/api/models/embed_app.rb +0 -31
- data/lib/onelogin/api/models/event.rb +0 -54
- data/lib/onelogin/api/models/event_type.rb +0 -17
- data/lib/onelogin/api/models/factor_enrollment_response.rb +0 -22
- data/lib/onelogin/api/models/group.rb +0 -17
- data/lib/onelogin/api/models/mfa.rb +0 -26
- data/lib/onelogin/api/models/mfa_token.rb +0 -18
- data/lib/onelogin/api/models/onelogin_app.rb +0 -62
- data/lib/onelogin/api/models/onelogin_app_basic.rb +0 -51
- data/lib/onelogin/api/models/onelogin_app_v1.rb +0 -22
- data/lib/onelogin/api/models/onelogin_token.rb +0 -20
- data/lib/onelogin/api/models/otp_device.rb +0 -25
- data/lib/onelogin/api/models/privilege.rb +0 -51
- data/lib/onelogin/api/models/rate_limit.rb +0 -17
- data/lib/onelogin/api/models/role.rb +0 -16
- data/lib/onelogin/api/models/saml_endpoint_response.rb +0 -18
- data/lib/onelogin/api/models/session_token_info.rb +0 -21
- data/lib/onelogin/api/models/session_token_mfa_info.rb +0 -26
- data/lib/onelogin/api/models/statement.rb +0 -36
- data/lib/onelogin/api/models/user.rb +0 -135
- data/lib/onelogin/api/models/user_data.rb +0 -13
- data/lib/onelogin/api/models/user_metadata.rb +0 -13
- data/lib/onelogin/api/models.rb +0 -26
- data/lib/onelogin/api/util/constants.rb +0 -177
- data/lib/onelogin/api/util/parser.rb +0 -56
- data/lib/onelogin/api/util/url_builder.rb +0 -24
- data/lib/onelogin/api/util.rb +0 -13
- data/lib/onelogin/api.rb +0 -2
data/lib/onelogin/api/cursor.rb
DELETED
@@ -1,114 +0,0 @@
|
|
1
|
-
require 'onelogin/api/apiexception'
|
2
|
-
require 'onelogin/api/util'
|
3
|
-
|
4
|
-
# Cursor
|
5
|
-
#
|
6
|
-
# Used for paginating requests to the OneLogin API
|
7
|
-
#
|
8
|
-
# Returns an enumerable object
|
9
|
-
class Cursor
|
10
|
-
include Enumerable
|
11
|
-
include OneLogin::Api::Util
|
12
|
-
|
13
|
-
# Create a new instance of the Cursor.
|
14
|
-
#
|
15
|
-
# @param url [String] The url of the API endpoint
|
16
|
-
# @param options [Hash] Configuation options
|
17
|
-
#
|
18
|
-
def initialize(client, url, options = {})
|
19
|
-
@client = client
|
20
|
-
@url = url
|
21
|
-
@options = options
|
22
|
-
|
23
|
-
@model = options[:model]
|
24
|
-
@headers = options[:headers] || {}
|
25
|
-
@params = options[:params] || {}
|
26
|
-
@max_results = options[:max_results]
|
27
|
-
@container = options[:container] || 'data'
|
28
|
-
|
29
|
-
@collection = []
|
30
|
-
@after_cursor = options.fetch(:after_cursor, nil)
|
31
|
-
end
|
32
|
-
|
33
|
-
def each(start = 0, &proc)
|
34
|
-
return to_enum(:each, start) unless block_given?
|
35
|
-
|
36
|
-
Array(@collection[start..-1]).each do |item|
|
37
|
-
if @model
|
38
|
-
yield(@model.new(item))
|
39
|
-
else
|
40
|
-
yield(item)
|
41
|
-
end
|
42
|
-
end
|
43
|
-
|
44
|
-
unless last?
|
45
|
-
start = [@collection.size, start].max
|
46
|
-
|
47
|
-
fetch_next_page
|
48
|
-
|
49
|
-
each(start, &proc)
|
50
|
-
end
|
51
|
-
end
|
52
|
-
|
53
|
-
private
|
54
|
-
|
55
|
-
def fetch_next_page
|
56
|
-
@params = @params.merge(after_cursor: @after_cursor) if @after_cursor
|
57
|
-
@client.prepare_token
|
58
|
-
|
59
|
-
response = @client.class.get(
|
60
|
-
@url,
|
61
|
-
headers: @headers,
|
62
|
-
query: @params
|
63
|
-
)
|
64
|
-
|
65
|
-
json = response.parsed_response
|
66
|
-
|
67
|
-
if json.nil?
|
68
|
-
raise OneLogin::Api::ApiException.new("Response could not be parsed", 500)
|
69
|
-
elsif !json.has_key?(@container) && json.has_key?('status') && json["status"]["error"] == true
|
70
|
-
raise OneLogin::Api::ApiException.new(extract_error_message_from_response(response), json["status"]["code"])
|
71
|
-
elsif !json.has_key?(@container) && json.has_key?('statusCode')
|
72
|
-
raise OneLogin::Api::ApiException.new(extract_error_message_from_response(response), json["statusCode"])
|
73
|
-
else
|
74
|
-
|
75
|
-
results = json[@container]
|
76
|
-
if @container == "data"
|
77
|
-
results = results.flatten
|
78
|
-
end
|
79
|
-
|
80
|
-
@collection += if results_remaining < results.size
|
81
|
-
results.slice(0, results_remaining)
|
82
|
-
else
|
83
|
-
results
|
84
|
-
end
|
85
|
-
|
86
|
-
@after_cursor = after_cursor(json)
|
87
|
-
@last_cursor_empty = @after_cursor.nil?
|
88
|
-
end
|
89
|
-
end
|
90
|
-
|
91
|
-
def after_cursor(json)
|
92
|
-
value = nil
|
93
|
-
if json.has_key?('pagination')
|
94
|
-
value = json['pagination'].fetch('after_cursor', nil)
|
95
|
-
elsif json.has_key?('afterCursor')
|
96
|
-
value = json['afterCursor']
|
97
|
-
end
|
98
|
-
value
|
99
|
-
end
|
100
|
-
|
101
|
-
def results_remaining
|
102
|
-
@max_results - @collection.size
|
103
|
-
end
|
104
|
-
|
105
|
-
def fetch_completed?
|
106
|
-
return false unless @max_results
|
107
|
-
|
108
|
-
@collection.size >= @max_results
|
109
|
-
end
|
110
|
-
|
111
|
-
def last?
|
112
|
-
@last_cursor_empty || fetch_completed?
|
113
|
-
end
|
114
|
-
end
|
@@ -1,22 +0,0 @@
|
|
1
|
-
module OneLogin
|
2
|
-
module Api
|
3
|
-
module Models
|
4
|
-
|
5
|
-
class App
|
6
|
-
|
7
|
-
attr_accessor :id, :name, :icon, :provisioned
|
8
|
-
attr_accessor :extension, :login_id, :personal
|
9
|
-
|
10
|
-
def initialize(data)
|
11
|
-
@id = data['id']
|
12
|
-
@name = data['name']
|
13
|
-
@icon = data['icon']
|
14
|
-
@provisioned = data['provisioned']
|
15
|
-
@extension = data['extension']
|
16
|
-
@login_id = data['login_id']
|
17
|
-
@personal = data['personal']
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
@@ -1,20 +0,0 @@
|
|
1
|
-
module OneLogin
|
2
|
-
module Api
|
3
|
-
module Models
|
4
|
-
|
5
|
-
class ConnectorBasic
|
6
|
-
|
7
|
-
attr_accessor :id, :name, :auth_method
|
8
|
-
attr_accessor :icon_url, :allows_new_parameters
|
9
|
-
|
10
|
-
def initialize(data)
|
11
|
-
@id = data['id']
|
12
|
-
@name = data['name']
|
13
|
-
@icon_url = data['icon_url']
|
14
|
-
@auth_method = data['auth_method']
|
15
|
-
@allows_new_parameters = data['allows_new_parameters']
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
@@ -1,18 +0,0 @@
|
|
1
|
-
module OneLogin
|
2
|
-
module Api
|
3
|
-
module Models
|
4
|
-
|
5
|
-
class Device
|
6
|
-
|
7
|
-
attr_accessor :id, :type, :duo_api_hostname, :duo_sig_request
|
8
|
-
|
9
|
-
def initialize(data)
|
10
|
-
@id = data['device_id']
|
11
|
-
@type = data['device_type'].to_s
|
12
|
-
@duo_api_hostname = data['duo_api_hostname']
|
13
|
-
@duo_sig_request = data['duo_sig_request']
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
@@ -1,31 +0,0 @@
|
|
1
|
-
module OneLogin
|
2
|
-
module Api
|
3
|
-
module Models
|
4
|
-
|
5
|
-
class EmbedApp
|
6
|
-
|
7
|
-
attr_accessor :id, :name, :icon, :provisioned, :extension_required, :login_id, :personal
|
8
|
-
|
9
|
-
def initialize(data)
|
10
|
-
@data = data
|
11
|
-
|
12
|
-
@id = data['id'].to_i
|
13
|
-
@name = data['name'].to_s
|
14
|
-
@icon = data['icon']
|
15
|
-
@provisioned = data['provisioned'].to_i
|
16
|
-
@extension_required = truthy?('extension_required')
|
17
|
-
@login_id = data['login_id'].to_i
|
18
|
-
@personal = truthy?('personal')
|
19
|
-
end
|
20
|
-
|
21
|
-
private
|
22
|
-
|
23
|
-
def truthy?(attribute_name)
|
24
|
-
return false unless @data[attribute_name]
|
25
|
-
|
26
|
-
['yes', 'true', '1'].include? @data[attribute_name].to_s.downcase
|
27
|
-
end
|
28
|
-
end
|
29
|
-
end
|
30
|
-
end
|
31
|
-
end
|
@@ -1,54 +0,0 @@
|
|
1
|
-
module OneLogin
|
2
|
-
module Api
|
3
|
-
module Models
|
4
|
-
|
5
|
-
class Event
|
6
|
-
|
7
|
-
attr_accessor :id, :created_at, :account_id, :user_id, :user_name, :event_type_id,
|
8
|
-
:notes, :ipaddr, :actor_user_id, :actor_user_name, :assuming_acting_user_id,
|
9
|
-
:role_id, :role_name, :app_id, :app_name, :group_id, :group_name, :otp_device_id,
|
10
|
-
:otp_device_name, :policy_id, :policy_name, :actor_system, :custom_message,
|
11
|
-
:operation_name, :directory_sync_run_id, :directory_id, :resolution, :client_id,
|
12
|
-
:resource_type_id, :error_description, :risk_score, :risk_reasons, :risk_cookie_id, :browser_fingerprint
|
13
|
-
|
14
|
-
def initialize(data)
|
15
|
-
@id = data['id']
|
16
|
-
@created_at = data['created_at']? Time.iso8601(data['created_at']) : nil
|
17
|
-
@account_id = data['account_id']
|
18
|
-
@user_id = data['user_id']
|
19
|
-
@user_name = data['user_name'].to_s
|
20
|
-
@event_type_id = data['event_type_id']
|
21
|
-
@notes = data['notes'].to_s
|
22
|
-
@ipaddr = data['ipaddr'].to_s
|
23
|
-
@actor_user_id = data['actor_user_id']
|
24
|
-
@actor_user_name = data['actor_user_name'].to_s
|
25
|
-
@assuming_acting_user_id = data['assuming_acting_user_id']
|
26
|
-
@role_id = data['role_id']
|
27
|
-
@role_name = data['role_name'].to_s
|
28
|
-
@app_id = data['app_id']
|
29
|
-
@app_name = data['app_name'].to_s
|
30
|
-
@group_id = data['group_id']
|
31
|
-
@group_name = data['group_name'].to_s
|
32
|
-
@otp_device_id = data['otp_device_id']
|
33
|
-
@otp_device_name = data['otp_device_name'].to_s
|
34
|
-
@policy_id = data['policy_id']
|
35
|
-
@policy_name = data['policy_name'].to_s
|
36
|
-
@actor_system = data['actor_system'].to_s
|
37
|
-
@custom_message = data['custom_message'].to_s
|
38
|
-
@operation_name = data['operation_name'].to_s
|
39
|
-
@directory_sync_run_id = data['directory_sync_run_id']
|
40
|
-
@directory_id = data['directory_id']
|
41
|
-
@resolution = data['resolution'].to_s
|
42
|
-
@client_id = data['client_id']
|
43
|
-
@resource_type_id = data['resource_type_id']
|
44
|
-
@error_description = data['error_description'].to_s
|
45
|
-
@proxy_ip = data['proxy_ip'].to_s
|
46
|
-
@risk_score = data['risk_score']
|
47
|
-
@risk_reasons = data['risk_reasons'].to_s
|
48
|
-
@risk_cookie_id = data['risk_cookie_id']
|
49
|
-
@browser_fingerprint = data['browser_fingerprint']
|
50
|
-
end
|
51
|
-
end
|
52
|
-
end
|
53
|
-
end
|
54
|
-
end
|
@@ -1,17 +0,0 @@
|
|
1
|
-
module OneLogin
|
2
|
-
module Api
|
3
|
-
module Models
|
4
|
-
|
5
|
-
class EventType
|
6
|
-
|
7
|
-
attr_accessor :id, :name, :description
|
8
|
-
|
9
|
-
def initialize(data)
|
10
|
-
@id = data['id']
|
11
|
-
@name = data['name'].to_s
|
12
|
-
@description = data['description'].to_s
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
@@ -1,22 +0,0 @@
|
|
1
|
-
module OneLogin
|
2
|
-
module Api
|
3
|
-
module Models
|
4
|
-
|
5
|
-
class FactorEnrollmentResponse
|
6
|
-
|
7
|
-
attr_accessor :device_id, :user_id, :active, :auth_factor_name,
|
8
|
-
:type_display_name, :user_display_name, :state_token
|
9
|
-
|
10
|
-
def initialize(data)
|
11
|
-
@device_id = data['device_id']? data['device_id'].to_i : nil
|
12
|
-
@user_id = data['id']? data['id'].to_i : nil
|
13
|
-
@active = data['active']
|
14
|
-
@auth_factor_name = data['auth_factor_name']
|
15
|
-
@type_display_name = data['type_display_name']
|
16
|
-
@user_display_name = data['user_display_name']
|
17
|
-
@state_token = data['state_token']
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
@@ -1,17 +0,0 @@
|
|
1
|
-
module OneLogin
|
2
|
-
module Api
|
3
|
-
module Models
|
4
|
-
|
5
|
-
class Group
|
6
|
-
|
7
|
-
attr_accessor :id, :name, :reference
|
8
|
-
|
9
|
-
def initialize(data)
|
10
|
-
@id = data['id']
|
11
|
-
@name = data['name'].to_s
|
12
|
-
@reference = data['reference'].to_s
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
@@ -1,26 +0,0 @@
|
|
1
|
-
module OneLogin
|
2
|
-
module Api
|
3
|
-
module Models
|
4
|
-
|
5
|
-
class MFA
|
6
|
-
|
7
|
-
attr_accessor :state_token, :callback_url, :user, :devices
|
8
|
-
|
9
|
-
def initialize(data)
|
10
|
-
unless data['user'].empty?
|
11
|
-
@user = OneLogin::Api::Models::User.new(data['user']) # Partial info
|
12
|
-
end
|
13
|
-
@state_token = data['state_token'].to_s
|
14
|
-
@callback_url = data['callback_url'].to_s
|
15
|
-
@devices = []
|
16
|
-
unless data['devices'].empty?
|
17
|
-
data['devices'].each do |device_data|
|
18
|
-
@devices << OneLogin::Api::Models::Device.new(device_data)
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
23
|
-
|
24
|
-
end
|
25
|
-
end
|
26
|
-
end
|
@@ -1,18 +0,0 @@
|
|
1
|
-
module OneLogin
|
2
|
-
module Api
|
3
|
-
module Models
|
4
|
-
|
5
|
-
class MFAToken
|
6
|
-
|
7
|
-
attr_accessor :value, :expires_at, :reusable
|
8
|
-
|
9
|
-
def initialize(data)
|
10
|
-
@value = data['mfa_token']
|
11
|
-
@expires_at = data['expires_at']
|
12
|
-
@reusable = data['reusable']
|
13
|
-
end
|
14
|
-
end
|
15
|
-
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
@@ -1,62 +0,0 @@
|
|
1
|
-
module OneLogin
|
2
|
-
module Api
|
3
|
-
module Models
|
4
|
-
|
5
|
-
class OneLoginApp
|
6
|
-
|
7
|
-
attr_accessor :name, :visible, :policy_id, :is_available,
|
8
|
-
:parameters, :allow_assumed_signin,
|
9
|
-
:configuration, :notes, :description
|
10
|
-
|
11
|
-
|
12
|
-
attr_reader :created_at, :updated_at, :icon, :provisioning,
|
13
|
-
:connector_id, :sso, :auth_method, :id, :tab_id
|
14
|
-
|
15
|
-
def initialize(data)
|
16
|
-
@name = data['name']
|
17
|
-
@visible = data['visible']
|
18
|
-
@policy_id = data['policy_id']? data['policy_id'].to_i : nil
|
19
|
-
@parameters = data['parameters']
|
20
|
-
@allow_assumed_signin = data['allow_assumed_signin']
|
21
|
-
@configuration = data['configuration']
|
22
|
-
@notes = data['notes']
|
23
|
-
@description = data['description']
|
24
|
-
|
25
|
-
@created_at = data['created_at']
|
26
|
-
@updated_at = data['updated_at']
|
27
|
-
@icon = data['icon_url']
|
28
|
-
@provisioning = data['provisioning']
|
29
|
-
@connector_id = data['connector_id']? data['connector_id'].to_i : nil
|
30
|
-
@sso = data['sso']
|
31
|
-
@auth_method = data['auth_method']
|
32
|
-
@tab_id = data['tab_id']? data['tab_id'].to_i : nil
|
33
|
-
@id = data['id']? data['id'].to_i : nil
|
34
|
-
end
|
35
|
-
|
36
|
-
def get_auth_method_name
|
37
|
-
auth_method_name = nil
|
38
|
-
case @auth_method
|
39
|
-
when 0
|
40
|
-
auth_method_name = "PASSWORD"
|
41
|
-
when 1
|
42
|
-
auth_method_name = "OPENID"
|
43
|
-
when 2
|
44
|
-
auth_method_name = "SAML"
|
45
|
-
when 3
|
46
|
-
auth_method_name = "API"
|
47
|
-
when 4
|
48
|
-
auth_method_name = "GOOGLE"
|
49
|
-
when 6
|
50
|
-
auth_method_name = "BASIC_AUTH"
|
51
|
-
when 7
|
52
|
-
auth_method_name = "WSFED"
|
53
|
-
when 8
|
54
|
-
auth_method_name = "OIDC"
|
55
|
-
end
|
56
|
-
|
57
|
-
auth_method_name
|
58
|
-
end
|
59
|
-
end
|
60
|
-
end
|
61
|
-
end
|
62
|
-
end
|
@@ -1,51 +0,0 @@
|
|
1
|
-
module OneLogin
|
2
|
-
module Api
|
3
|
-
module Models
|
4
|
-
|
5
|
-
class OneLoginAppBasic
|
6
|
-
|
7
|
-
attr_accessor :name, :visible,
|
8
|
-
:description
|
9
|
-
|
10
|
-
attr_reader :created_at, :updated_at,
|
11
|
-
:connector_id, :auth_method, :id
|
12
|
-
|
13
|
-
def initialize(data)
|
14
|
-
@id = data['id']? data['id'].to_i : nil
|
15
|
-
@name = data['name']
|
16
|
-
@description = data['description']
|
17
|
-
@auth_method = data['auth_method']
|
18
|
-
@connector_id = data['connector_id']? data['connector_id'].to_i : nil
|
19
|
-
@visible = data['visible']
|
20
|
-
@created_at = data['created_at']
|
21
|
-
@updated_at = data['updated_at']
|
22
|
-
|
23
|
-
end
|
24
|
-
|
25
|
-
def get_auth_method_name
|
26
|
-
auth_method_name = nil
|
27
|
-
case @auth_method
|
28
|
-
when 0
|
29
|
-
auth_method_name = "PASSWORD"
|
30
|
-
when 1
|
31
|
-
auth_method_name = "OPENID"
|
32
|
-
when 2
|
33
|
-
auth_method_name = "SAML"
|
34
|
-
when 3
|
35
|
-
auth_method_name = "API"
|
36
|
-
when 4
|
37
|
-
auth_method_name = "GOOGLE"
|
38
|
-
when 6
|
39
|
-
auth_method_name = "BASIC_AUTH"
|
40
|
-
when 7
|
41
|
-
auth_method_name = "WSFED"
|
42
|
-
when 8
|
43
|
-
auth_method_name = "OIDC"
|
44
|
-
end
|
45
|
-
|
46
|
-
auth_method_name
|
47
|
-
end
|
48
|
-
end
|
49
|
-
end
|
50
|
-
end
|
51
|
-
end
|
@@ -1,22 +0,0 @@
|
|
1
|
-
module OneLogin
|
2
|
-
module Api
|
3
|
-
module Models
|
4
|
-
|
5
|
-
class OneLoginApp
|
6
|
-
|
7
|
-
attr_accessor :id, :connector_id, :name, :extension
|
8
|
-
attr_accessor :icon, :visible, :provisioning
|
9
|
-
|
10
|
-
def initialize(data)
|
11
|
-
@id = data['id']
|
12
|
-
@connector_id = data['connector_id']
|
13
|
-
@name = data['name']
|
14
|
-
@extension = data['extension']
|
15
|
-
@icon = data['icon']
|
16
|
-
@visible = data['visible']
|
17
|
-
@provisioning = data['provisioning']
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
@@ -1,20 +0,0 @@
|
|
1
|
-
module OneLogin
|
2
|
-
module Api
|
3
|
-
module Models
|
4
|
-
|
5
|
-
class OneLoginToken
|
6
|
-
|
7
|
-
attr_accessor :access_token, :refresh_token, :account_id, :token_type, :created_at, :expires_in
|
8
|
-
|
9
|
-
def initialize(data)
|
10
|
-
@access_token = data['access_token'].to_s
|
11
|
-
@refresh_token = data['refresh_token'].to_s
|
12
|
-
@account_id = data['account_id']
|
13
|
-
@token_type = data['token_type']
|
14
|
-
@created_at = Time.iso8601(data['created_at'])
|
15
|
-
@expires_in = data['expires_in']
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
@@ -1,25 +0,0 @@
|
|
1
|
-
module OneLogin
|
2
|
-
module Api
|
3
|
-
module Models
|
4
|
-
|
5
|
-
class OTPDevice
|
6
|
-
|
7
|
-
attr_accessor :id, :active, :default, :auth_factor_name, :phone_number,
|
8
|
-
:type_display_name, :needs_trigger, :user_display_name,
|
9
|
-
:state_token
|
10
|
-
|
11
|
-
def initialize(data)
|
12
|
-
@id = data['id']? data['id'].to_i : nil
|
13
|
-
@active = data['active']
|
14
|
-
@default = data['default']
|
15
|
-
@auth_factor_name = data['auth_factor_name']
|
16
|
-
@phone_number = data['phone_number']
|
17
|
-
@type_display_name = data['type_display_name']
|
18
|
-
@needs_trigger = data['needs_trigger']
|
19
|
-
@user_display_name = data['user_display_name']
|
20
|
-
@state_token = data['state_token']
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|
@@ -1,51 +0,0 @@
|
|
1
|
-
require 'onelogin/api/models/statement'
|
2
|
-
|
3
|
-
module OneLogin
|
4
|
-
module Api
|
5
|
-
module Models
|
6
|
-
|
7
|
-
class Privilege
|
8
|
-
|
9
|
-
attr_accessor :id, :name, :version, :statements
|
10
|
-
|
11
|
-
def initialize(*args)
|
12
|
-
if args.length == 1
|
13
|
-
self.from_data(args[0])
|
14
|
-
else
|
15
|
-
self.from_values(args[0],args[1], args[2], args[3])
|
16
|
-
end
|
17
|
-
end
|
18
|
-
|
19
|
-
def from_data(data)
|
20
|
-
@id = data['id']
|
21
|
-
@name = data['name']
|
22
|
-
@version = data['privilege']['Version']
|
23
|
-
statements_data = data['privilege']['Statement']
|
24
|
-
@statements = []
|
25
|
-
for statement_data in statements_data
|
26
|
-
@statements << Statement.new(statement_data)
|
27
|
-
end
|
28
|
-
end
|
29
|
-
|
30
|
-
def from_values(id, name, version, statements)
|
31
|
-
@id = id
|
32
|
-
@name = name
|
33
|
-
@version = version
|
34
|
-
@statements = []
|
35
|
-
for statement in statements
|
36
|
-
if statement.instance_of?(Statement)
|
37
|
-
@statements << statement
|
38
|
-
elsif statement.instance_of?(Hash) && statement.has_key?('Effect') && statement.has_key?('Action') && statement.has_key?('Scope')
|
39
|
-
@statements << Statement.new(statement['Effect'], statement['Action'], statement['Scope'])
|
40
|
-
end
|
41
|
-
end
|
42
|
-
end
|
43
|
-
|
44
|
-
def get_valid_actions
|
45
|
-
return
|
46
|
-
Constants.VALID_ACTIONS
|
47
|
-
end
|
48
|
-
end
|
49
|
-
end
|
50
|
-
end
|
51
|
-
end
|
@@ -1,17 +0,0 @@
|
|
1
|
-
module OneLogin
|
2
|
-
module Api
|
3
|
-
module Models
|
4
|
-
|
5
|
-
class RateLimit
|
6
|
-
|
7
|
-
attr_accessor :limit, :remaining, :reset
|
8
|
-
|
9
|
-
def initialize(data)
|
10
|
-
@limit = data['X-RateLimit-Limit']
|
11
|
-
@remaining = data['X-RateLimit-Remaining']
|
12
|
-
@reset = data['X-RateLimit-Reset']
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
@@ -1,18 +0,0 @@
|
|
1
|
-
module OneLogin
|
2
|
-
module Api
|
3
|
-
module Models
|
4
|
-
|
5
|
-
class SAMLEndpointResponse
|
6
|
-
|
7
|
-
attr_accessor :type, :message, :mfa, :saml_response
|
8
|
-
|
9
|
-
def initialize(status_type, status_message)
|
10
|
-
@type = status_type
|
11
|
-
@message = status_message
|
12
|
-
@saml_response = nil
|
13
|
-
@mfa = nil
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|