onelogin 1.4.1 → 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 -423
- 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 +36 -43
- 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 +402 -210
- 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 -21
- data/examples/README.md +0 -19
- data/examples/all-users-to-csv.rb +0 -48
- data/examples/create-user.rb +0 -16
- data/examples/events-to-csv.rb +0 -93
- 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 -208
- data/examples/rails-custom-login-page/README.md +0 -105
- 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 -4
- 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 -116
- 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 -50
- data/examples/rails-custom-login-page/app/views/home/index.html.erb +0 -209
- 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 -27
- data/examples/rails-custom-login-page/app/views/users/index.html.erb +0 -30
- 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 -14
- 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 -4
- 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 -36
- 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 -2328
- data/lib/onelogin/api/cursor.rb +0 -113
- data/lib/onelogin/api/models/app.rb +0 -22
- data/lib/onelogin/api/models/auth_factor.rb +0 -16
- 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_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 -22
- data/lib/onelogin/api/util/constants.rb +0 -160
- 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
@@ -1,135 +0,0 @@
|
|
1
|
-
module OneLogin
|
2
|
-
module Api
|
3
|
-
module Models
|
4
|
-
|
5
|
-
class User
|
6
|
-
|
7
|
-
attr_accessor :id, :external_id, :email, :username, :firstname, :lastname, :distinguished_name,
|
8
|
-
:phone, :company, :department, :status, :state, :member_of, :samaccountname, :userprincipalname,
|
9
|
-
:group_id, :role_ids, :custom_attributes, :openid_name, :locale_code, :comment, :directory_id,
|
10
|
-
:title, :manager_ad_id, :trusted_idp_id, :manager_user_id, :activated_at, :created_at, :updated_at,
|
11
|
-
:password_changed_at, :invitation_sent_at, :invalid_login_attempts, :last_login, :locked_until
|
12
|
-
|
13
|
-
def initialize(data)
|
14
|
-
@id = data['id']
|
15
|
-
@external_id = data['external_id']
|
16
|
-
@email = data['email'].to_s
|
17
|
-
@username = data['username'].to_s
|
18
|
-
@firstname = data['firstname'].to_s
|
19
|
-
@lastname = data['lastname'].to_s
|
20
|
-
@distinguished_name = data['distinguished_name'].to_s
|
21
|
-
@phone = data['phone'].to_s
|
22
|
-
@company = data['company'].to_s
|
23
|
-
@department = data['department'].to_s
|
24
|
-
@title = data['title'].to_s
|
25
|
-
@status = data['status']
|
26
|
-
@state = data['state']
|
27
|
-
@member_of = data['member_of'].to_s
|
28
|
-
@samaccountname = data['samaccountname'].to_s
|
29
|
-
@userprincipalname = data['userprincipalname'].to_s
|
30
|
-
@group_id = data['group_id']? data['group_id'].to_i : nil
|
31
|
-
@role_ids = data['role_id']? data['role_id'] : []
|
32
|
-
@custom_attributes = data['custom_attributes'] ? data['custom_attributes'] : []
|
33
|
-
@openid_name = data['openid_name'].to_s
|
34
|
-
@locale_code = data['locale_code'].to_s
|
35
|
-
@comment = data['comment'].to_s
|
36
|
-
@directory_id = data['directory_id']
|
37
|
-
@manager_ad_id = data['manager_ad_id']
|
38
|
-
@trusted_idp_id = data['trusted_idp_id']
|
39
|
-
@manager_user_id = data['manager_user_id']
|
40
|
-
@activated_at = data['activated_at']? Time.iso8601(data['activated_at']) : nil
|
41
|
-
@created_at = data['created_at']? Time.iso8601(data['created_at']) : nil
|
42
|
-
@updated_at = data['updated_at']? Time.iso8601(data['updated_at']) : nil
|
43
|
-
@password_changed_at = data['password_changed_at']? Time.iso8601(data['password_changed_at']) : nil
|
44
|
-
@invitation_sent_at = data['invitation_sent_at']? Time.iso8601(data['invitation_sent_at']) : nil
|
45
|
-
@invalid_login_attempts = data['invalid_login_attempts']
|
46
|
-
@last_login = data['last_login']? Time.iso8601(data['last_login']) : nil
|
47
|
-
@locked_until = data['locked_until']? Time.iso8601(data['locked_until']) : nil
|
48
|
-
end
|
49
|
-
|
50
|
-
def get_role_ids
|
51
|
-
@role_ids
|
52
|
-
end
|
53
|
-
|
54
|
-
def get_role_ids
|
55
|
-
@group_id
|
56
|
-
end
|
57
|
-
|
58
|
-
def get_user_data
|
59
|
-
user_data = UserData.new
|
60
|
-
user_data.id = @id
|
61
|
-
user_data.external_id = @external_id
|
62
|
-
user_data.email = @email
|
63
|
-
user_data.username = @username
|
64
|
-
user_data.firstname = @firstname
|
65
|
-
user_data.lastname = @lastname
|
66
|
-
user_data.distinguished_name = @distinguished_name
|
67
|
-
user_data.phone = @phone
|
68
|
-
user_data.company = @company
|
69
|
-
user_data.department = @department
|
70
|
-
user_data.title = @title
|
71
|
-
user_data.status = @status
|
72
|
-
user_data.state = @state
|
73
|
-
user_data.member_of = @member_of
|
74
|
-
user_data.samaccountname = @samaccountname
|
75
|
-
user_data.userprincipalname = @userprincipalname
|
76
|
-
user_data.openid_name = @openid_name
|
77
|
-
user_data.locale_code = @locale_code
|
78
|
-
user_data.directory_id = @directory_id
|
79
|
-
user_data.manager_ad_id = @manager_ad_id
|
80
|
-
user_data.trusted_idp_id = @trusted_idp_id
|
81
|
-
user_data.manager_user_id = @manager_user_id
|
82
|
-
return user_data
|
83
|
-
end
|
84
|
-
|
85
|
-
def get_user_metadata
|
86
|
-
user_metadata = UserMetadata.new
|
87
|
-
user_metadata.id = @id
|
88
|
-
user_metadata.activated_at = @activated_at
|
89
|
-
user_metadata.created_at = @created_at
|
90
|
-
user_metadata.updated_at = @updated_at
|
91
|
-
user_metadata.password_changed_at = @password_changed_at
|
92
|
-
user_metadata.invalid_login_attempts = @invalid_login_attempts
|
93
|
-
user_metadata.invitation_sent_at = @invitation_sent_at
|
94
|
-
user_metadata.last_login = @last_login
|
95
|
-
user_metadata.locked_until = @locked_until
|
96
|
-
user_metadata.comment = @comment
|
97
|
-
|
98
|
-
return user_metadata
|
99
|
-
end
|
100
|
-
|
101
|
-
def get_custom_attributes
|
102
|
-
@custom_attributes
|
103
|
-
end
|
104
|
-
|
105
|
-
def get_user_params
|
106
|
-
return {
|
107
|
-
"external_id"=> self.external_id,
|
108
|
-
"email"=> self.email,
|
109
|
-
"username"=> self.username,
|
110
|
-
"firstname"=> self.firstname,
|
111
|
-
"lastname"=> self.lastname,
|
112
|
-
"distinguished_name"=> self.distinguished_name,
|
113
|
-
"phone"=> self.phone,
|
114
|
-
"company"=> self.company,
|
115
|
-
"department"=> self.department,
|
116
|
-
"title"=> self.title,
|
117
|
-
"status"=> self.status,
|
118
|
-
"state"=> self.state,
|
119
|
-
"member_of"=> self.member_of,
|
120
|
-
"samaccountname"=> self.samaccountname,
|
121
|
-
"invalid_login_attempts"=> self.invalid_login_attempts,
|
122
|
-
"userprincipalname"=> self.userprincipalname,
|
123
|
-
"group_id"=> self.group_id,
|
124
|
-
"locale_code"=> self.locale_code,
|
125
|
-
"openid_name"=> self.openid_name,
|
126
|
-
"directory_id"=> self.directory_id,
|
127
|
-
"manager_ad_id"=> self.manager_ad_id,
|
128
|
-
"trusted_idp_id"=> self.trusted_idp_id,
|
129
|
-
"manager_user_id"=> self.manager_user_id
|
130
|
-
}
|
131
|
-
end
|
132
|
-
end
|
133
|
-
end
|
134
|
-
end
|
135
|
-
end
|
@@ -1,13 +0,0 @@
|
|
1
|
-
module OneLogin
|
2
|
-
module Api
|
3
|
-
module Models
|
4
|
-
|
5
|
-
class UserData
|
6
|
-
|
7
|
-
attr_accessor :id, :external_id, :email, :username, :firstname, :lastname, :distinguished_name,
|
8
|
-
:phone, :company, :department, :status, :state, :member_of, :samaccountname, :userprincipalname,
|
9
|
-
:title, :openid_name, :locale_code, :directory_id, :manager_ad_id, :trusted_idp_id, :manager_user_id
|
10
|
-
end
|
11
|
-
end
|
12
|
-
end
|
13
|
-
end
|
@@ -1,13 +0,0 @@
|
|
1
|
-
module OneLogin
|
2
|
-
module Api
|
3
|
-
module Models
|
4
|
-
|
5
|
-
class UserMetadata
|
6
|
-
|
7
|
-
attr_accessor :id, :activated_at, :created_at, :updated_at, :password_changed_at,
|
8
|
-
:invitation_sent_at, :invalid_login_attempts, :last_login, :locked_until,
|
9
|
-
:comment
|
10
|
-
end
|
11
|
-
end
|
12
|
-
end
|
13
|
-
end
|
data/lib/onelogin/api/models.rb
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
require 'onelogin/api/models/app'
|
2
|
-
require 'onelogin/api/models/auth_factor'
|
3
|
-
require 'onelogin/api/models/device'
|
4
|
-
require 'onelogin/api/models/event'
|
5
|
-
require 'onelogin/api/models/event_type'
|
6
|
-
require 'onelogin/api/models/factor_enrollment_response'
|
7
|
-
require 'onelogin/api/models/group'
|
8
|
-
require 'onelogin/api/models/mfa'
|
9
|
-
require 'onelogin/api/models/mfa_token'
|
10
|
-
require 'onelogin/api/models/onelogin_token'
|
11
|
-
require 'onelogin/api/models/otp_device'
|
12
|
-
require 'onelogin/api/models/privilege'
|
13
|
-
require 'onelogin/api/models/rate_limit'
|
14
|
-
require 'onelogin/api/models/role'
|
15
|
-
require 'onelogin/api/models/saml_endpoint_response'
|
16
|
-
require 'onelogin/api/models/session_token_info'
|
17
|
-
require 'onelogin/api/models/session_token_mfa_info'
|
18
|
-
require 'onelogin/api/models/statement'
|
19
|
-
require 'onelogin/api/models/user_data'
|
20
|
-
require 'onelogin/api/models/user_metadata'
|
21
|
-
require 'onelogin/api/models/user'
|
22
|
-
require 'onelogin/api/models/embed_app'
|
@@ -1,160 +0,0 @@
|
|
1
|
-
module OneLogin
|
2
|
-
module Api
|
3
|
-
module Util
|
4
|
-
# Constants class of the OneLogin's Ruby SDK.
|
5
|
-
#
|
6
|
-
# This class defines all the constants that will be used
|
7
|
-
# in the OneLogin's Ruby SDK.
|
8
|
-
#
|
9
|
-
module Constants
|
10
|
-
# OAuth2 Tokens URLs
|
11
|
-
TOKEN_REQUEST_URL = "https://api.%s.onelogin.com/auth/oauth2/v2/token"
|
12
|
-
TOKEN_REFRESH_URL = "https://api.%s.onelogin.com/auth/oauth2/v2/token"
|
13
|
-
TOKEN_REVOKE_URL = "https://api.%s.onelogin.com/auth/oauth2/revoke"
|
14
|
-
GET_RATE_URL = "https://api.%s.onelogin.com/auth/rate_limit"
|
15
|
-
|
16
|
-
# User URLs
|
17
|
-
GET_USERS_URL = "https://api.%s.onelogin.com/api/1/users"
|
18
|
-
GET_USER_URL = "https://api.%s.onelogin.com/api/1/users/%s"
|
19
|
-
GET_APPS_FOR_USER_URL = "https://api.%s.onelogin.com/api/1/users/%s/apps"
|
20
|
-
GET_ROLES_FOR_USER_URL = "https://api.%s.onelogin.com/api/1/users/%s/roles"
|
21
|
-
GET_CUSTOM_ATTRIBUTES_URL = "https://api.%s.onelogin.com/api/1/users/custom_attributes"
|
22
|
-
CREATE_USER_URL = "https://api.%s.onelogin.com/api/1/users"
|
23
|
-
SESSION_LOGIN_TOKEN_URL = "https://api.%s.onelogin.com/api/1/login/auth"
|
24
|
-
GET_TOKEN_VERIFY_FACTOR = "https://api.%s.onelogin.com/api/1/login/verify_factor"
|
25
|
-
UPDATE_USER_URL = "https://api.%s.onelogin.com/api/1/users/%s"
|
26
|
-
DELETE_USER_URL = "https://api.%s.onelogin.com/api/1/users/%s"
|
27
|
-
ADD_ROLE_TO_USER_URL = "https://api.%s.onelogin.com/api/1/users/%s/add_roles"
|
28
|
-
DELETE_ROLE_TO_USER_URL = "https://api.%s.onelogin.com/api/1/users/%s/remove_roles"
|
29
|
-
SET_PW_CLEARTEXT = "https://api.%s.onelogin.com/api/1/users/set_password_clear_text/%s"
|
30
|
-
SET_PW_SALT = "https://api.%s.onelogin.com/api/1/users/set_password_using_salt/%s"
|
31
|
-
SET_CUSTOM_ATTRIBUTE_TO_USER_URL = "https://api.%s.onelogin.com/api/1/users/%s/set_custom_attributes"
|
32
|
-
SET_USER_STATE_URL = "https://api.%s.onelogin.com/api/1/users/%s/set_state"
|
33
|
-
LOG_USER_OUT_URL = "https://api.%s.onelogin.com/api/1/users/%s/logout"
|
34
|
-
LOCK_USER_URL = "https://api.%s.onelogin.com/api/1/users/%s/lock_user"
|
35
|
-
GENERATE_MFA_TOKEN_URL = "https://api.%s.onelogin.com/api/1/users/%s/mfa_token"
|
36
|
-
|
37
|
-
# Role URLs
|
38
|
-
GET_ROLES_URL = "https://api.%s.onelogin.com/api/1/roles"
|
39
|
-
CREATE_ROLE_URL = "https://api.%s.onelogin.com/api/1/roles"
|
40
|
-
GET_ROLE_URL = "https://api.%s.onelogin.com/api/1/roles/%s"
|
41
|
-
|
42
|
-
# Event URLS
|
43
|
-
GET_EVENT_TYPES_URL = "https://api.%s.onelogin.com/api/1/events/types"
|
44
|
-
GET_EVENTS_URL = "https://api.%s.onelogin.com/api/1/events"
|
45
|
-
CREATE_EVENT_URL = "https://api.%s.onelogin.com/api/1/events"
|
46
|
-
GET_EVENT_URL = "https://api.%s.onelogin.com/api/1/events/%s"
|
47
|
-
|
48
|
-
# Group URLs
|
49
|
-
GET_GROUPS_URL = "https://api.%s.onelogin.com/api/1/groups"
|
50
|
-
CREATE_GROUP_URL = "https://api.%s.onelogin.com/api/1/groups"
|
51
|
-
GET_GROUP_URL = "https://api.%s.onelogin.com/api/1/groups/%s"
|
52
|
-
|
53
|
-
# SAML Assertion URLs
|
54
|
-
GET_SAML_ASSERTION_URL = "https://api.%s.onelogin.com/api/1/saml_assertion"
|
55
|
-
GET_SAML_VERIFY_FACTOR = "https://api.%s.onelogin.com/api/1/saml_assertion/verify_factor"
|
56
|
-
|
57
|
-
# Multi-Factor Authentication URLs
|
58
|
-
GET_FACTORS_URL = "https://api.%s.onelogin.com/api/1/users/%s/auth_factors"
|
59
|
-
ENROLL_FACTOR_URL = "https://api.%s.onelogin.com/api/1/users/%s/otp_devices"
|
60
|
-
GET_ENROLLED_FACTORS_URL = "https://api.%s.onelogin.com/api/1/users/%s/otp_devices"
|
61
|
-
ACTIVATE_FACTOR_URL = "https://api.%s.onelogin.com/api/1/users/%s/otp_devices/%s/trigger"
|
62
|
-
VERIFY_FACTOR_URL = "https://api.%s.onelogin.com/api/1/users/%s/otp_devices/%s/verify"
|
63
|
-
REMOVE_FACTOR_URL = "https://api.%s.onelogin.com/api/1/users/%s/otp_devices/%s"
|
64
|
-
|
65
|
-
# Invite Link URLS
|
66
|
-
GENERATE_INVITE_LINK_URL = "https://api.%s.onelogin.com/api/1/invites/get_invite_link"
|
67
|
-
SEND_INVITE_LINK_URL = "https://api.%s.onelogin.com/api/1/invites/send_invite_link"
|
68
|
-
|
69
|
-
# Embed Apps URL
|
70
|
-
EMBED_APP_URL = "https://api.onelogin.com/client/apps/embed2"
|
71
|
-
|
72
|
-
# Privileges URLS
|
73
|
-
LIST_PRIVILEGES_URL = "https://api.%s.onelogin.com/api/1/privileges"
|
74
|
-
CREATE_PRIVILEGE_URL = "https://api.%s.onelogin.com/api/1/privileges"
|
75
|
-
UPDATE_PRIVILEGE_URL = "https://api.%s.onelogin.com/api/1/privileges/%s"
|
76
|
-
GET_PRIVILEGE_URL = "https://api.%s.onelogin.com/api/1/privileges/%s"
|
77
|
-
DELETE_PRIVILEGE_URL = "https://api.%s.onelogin.com/api/1/privileges/%s"
|
78
|
-
GET_ROLES_ASSIGNED_TO_PRIVILEGE_URL = "https://api.%s.onelogin.com/api/1/privileges/%s/roles"
|
79
|
-
ASSIGN_ROLES_TO_PRIVILEGE_URL = "https://api.%s.onelogin.com/api/1/privileges/%s/roles"
|
80
|
-
REMOVE_ROLE_FROM_PRIVILEGE_URL = "https://api.%s.onelogin.com/api/1/privileges/%s/roles/%s"
|
81
|
-
GET_USERS_ASSIGNED_TO_PRIVILEGE_URL = "https://api.%s.onelogin.com/api/1/privileges/%s/users"
|
82
|
-
ASSIGN_USERS_TO_PRIVILEGE_URL = "https://api.%s.onelogin.com/api/1/privileges/%s/users"
|
83
|
-
REMOVE_USER_FROM_PRIVILEGE_URL = "https://api.%s.onelogin.com/api/1/privileges/%s/users/%s"
|
84
|
-
VALID_ACTIONS = [
|
85
|
-
"apps:List",
|
86
|
-
"apps:Get",
|
87
|
-
"apps:Create",
|
88
|
-
"apps:Update",
|
89
|
-
"apps:Delete",
|
90
|
-
"apps:ManageRoles",
|
91
|
-
"apps:ManageUsers",
|
92
|
-
"directories:List",
|
93
|
-
"directories:Get",
|
94
|
-
"directories:Create",
|
95
|
-
"directories:Update",
|
96
|
-
"directories:Delete",
|
97
|
-
"directories:SyncUsers",
|
98
|
-
"directories:RefreshSchema",
|
99
|
-
"events:List",
|
100
|
-
"events:Get",
|
101
|
-
"mappings:List",
|
102
|
-
"mappings:Get",
|
103
|
-
"mappings:Create",
|
104
|
-
"mappings:Update",
|
105
|
-
"mappings:Delete",
|
106
|
-
"mappings:ReapplyAll",
|
107
|
-
"policies:List",
|
108
|
-
"policies:user:Get",
|
109
|
-
"policies:user:Create",
|
110
|
-
"policies:user:Update",
|
111
|
-
"policies:user:Delete",
|
112
|
-
"policies:app:Get",
|
113
|
-
"policies:app:Create",
|
114
|
-
"policies:app:Update",
|
115
|
-
"policies:app:Delete",
|
116
|
-
"privileges:List",
|
117
|
-
"privileges:Get",
|
118
|
-
"privileges:Create",
|
119
|
-
"privileges:Update",
|
120
|
-
"privileges:Delete",
|
121
|
-
"privileges:ListUsers",
|
122
|
-
"privileges:ListRoles",
|
123
|
-
"privileges:ManageUsers",
|
124
|
-
"privileges:ManageRoles",
|
125
|
-
"reports:List",
|
126
|
-
"reports:Get",
|
127
|
-
"reports:Create",
|
128
|
-
"reports:Update",
|
129
|
-
"reports:Delete",
|
130
|
-
"reports:Run",
|
131
|
-
"roles:List",
|
132
|
-
"roles:Get",
|
133
|
-
"roles:Create",
|
134
|
-
"roles:Update",
|
135
|
-
"roles:Delete",
|
136
|
-
"roles:ManageUsers",
|
137
|
-
"roles:ManageApps",
|
138
|
-
"trustedidp:List",
|
139
|
-
"trustedidp:Get",
|
140
|
-
"trustedidp:Create",
|
141
|
-
"trustedidp:Update",
|
142
|
-
"trustedidp:Delete",
|
143
|
-
"users:List",
|
144
|
-
"users:Get",
|
145
|
-
"users:Create",
|
146
|
-
"users:Update",
|
147
|
-
"users:Delete",
|
148
|
-
"users:Unlock",
|
149
|
-
"users:ResetPassword",
|
150
|
-
"users:ForceLogout",
|
151
|
-
"users:Invite",
|
152
|
-
"users:ReapplyMappings",
|
153
|
-
"users:ManageRoles",
|
154
|
-
"users:ManageApps",
|
155
|
-
"users:GenerateTempMfaToken"
|
156
|
-
]
|
157
|
-
end
|
158
|
-
end
|
159
|
-
end
|
160
|
-
end
|
@@ -1,56 +0,0 @@
|
|
1
|
-
module OneLogin
|
2
|
-
module Api
|
3
|
-
module Util
|
4
|
-
module Parser
|
5
|
-
def extract_error_message_from_response(response)
|
6
|
-
message = ''
|
7
|
-
content = JSON.parse(response.body)
|
8
|
-
if content
|
9
|
-
if content.has_key?('status')
|
10
|
-
status = content['status']
|
11
|
-
if status.has_key?('message')
|
12
|
-
if status['message'].instance_of?(Hash)
|
13
|
-
if status['message'].has_key?('description')
|
14
|
-
message = status['message']['description']
|
15
|
-
end
|
16
|
-
else
|
17
|
-
message = status['message']
|
18
|
-
end
|
19
|
-
elsif status.has_key?('type')
|
20
|
-
message = status['type']
|
21
|
-
end
|
22
|
-
elsif content.has_key?('message')
|
23
|
-
message = content['message']
|
24
|
-
elsif content.has_key?('name')
|
25
|
-
message = content['name']
|
26
|
-
end
|
27
|
-
end
|
28
|
-
message
|
29
|
-
end
|
30
|
-
|
31
|
-
def extract_error_attribute_from_response(response)
|
32
|
-
attribute = nil
|
33
|
-
content = JSON.parse(response.body)
|
34
|
-
if content && content.has_key?('status')
|
35
|
-
status = content['status']
|
36
|
-
if status.has_key?('message') && status['message'].instance_of?(Hash)
|
37
|
-
if status['message'].has_key?('attribute')
|
38
|
-
attribute = status['message']['attribute']
|
39
|
-
end
|
40
|
-
end
|
41
|
-
end
|
42
|
-
attribute
|
43
|
-
end
|
44
|
-
|
45
|
-
def extract_status_code_from_response(response)
|
46
|
-
status_code = ''
|
47
|
-
content = JSON.parse(response.body)
|
48
|
-
if content && content.has_key?('statusCode')
|
49
|
-
status_code = content['statusCode']
|
50
|
-
end
|
51
|
-
status_code
|
52
|
-
end
|
53
|
-
end
|
54
|
-
end
|
55
|
-
end
|
56
|
-
end
|
@@ -1,24 +0,0 @@
|
|
1
|
-
module OneLogin
|
2
|
-
module Api
|
3
|
-
module Util
|
4
|
-
module UrlBuilder
|
5
|
-
|
6
|
-
# Build the URL of the API endpoint
|
7
|
-
#
|
8
|
-
# @param base [String] Base of the endpoint
|
9
|
-
# @param obj_id [String, nil] Id of the referenced object
|
10
|
-
# @param extra_id [String, nil] Id of the secundary referenced object
|
11
|
-
#
|
12
|
-
def url_for(base, obj_id=nil, extra_id=nil)
|
13
|
-
if obj_id.nil? || obj_id.to_s.empty?
|
14
|
-
base % [@region]
|
15
|
-
elsif extra_id.nil? || extra_id.to_s.empty?
|
16
|
-
base % [@region, obj_id]
|
17
|
-
else
|
18
|
-
base % [@region, obj_id, extra_id]
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
data/lib/onelogin/api/util.rb
DELETED
@@ -1,13 +0,0 @@
|
|
1
|
-
require 'onelogin/api/util/constants'
|
2
|
-
require 'onelogin/api/util/url_builder'
|
3
|
-
require 'onelogin/api/util/parser'
|
4
|
-
|
5
|
-
module OneLogin
|
6
|
-
module Api
|
7
|
-
module Util
|
8
|
-
include OneLogin::Api::Util::Constants
|
9
|
-
include OneLogin::Api::Util::UrlBuilder
|
10
|
-
include OneLogin::Api::Util::Parser
|
11
|
-
end
|
12
|
-
end
|
13
|
-
end
|
data/lib/onelogin/api.rb
DELETED