Class: DeviseScim::Configuration
- Inherits:
-
Object
- Object
- DeviseScim::Configuration
- Defined in:
- lib/devise_scim/configuration.rb
Constant Summary collapse
- VALID_TENANCY =
%i[single multi].freeze
- VALID_AUTH_METHODS =
%i[token oauth].freeze
- VALID_DEPROVISION =
[false, true, :error].freeze
- VALID_USER_EXCLUSIVITY =
%i[multiple one_to_one].freeze
- VALID_EXCLUSIVITY_CONFLICT =
%i[error reassign].freeze
Instance Attribute Summary collapse
-
#adapter ⇒ Object
Returns the value of attribute adapter.
-
#auth_method ⇒ Object
Returns the value of attribute auth_method.
-
#deprovision_manual_users ⇒ Object
Returns the value of attribute deprovision_manual_users.
-
#devise_model ⇒ Object
Returns the value of attribute devise_model.
-
#enable_groups ⇒ Object
Returns the value of attribute enable_groups.
-
#exclusivity_conflict ⇒ Object
Returns the value of attribute exclusivity_conflict.
-
#oauth_client_id ⇒ Object
Returns the value of attribute oauth_client_id.
-
#oauth_client_secret ⇒ Object
Returns the value of attribute oauth_client_secret.
-
#route_prefix ⇒ Object
Returns the value of attribute route_prefix.
-
#soft_delete ⇒ Object
Returns the value of attribute soft_delete.
-
#tenancy ⇒ Object
Returns the value of attribute tenancy.
-
#tenant_model ⇒ Object
Returns the value of attribute tenant_model.
-
#token ⇒ Object
Returns the value of attribute token.
-
#user_exclusivity ⇒ Object
Returns the value of attribute user_exclusivity.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #validate! ⇒ Object
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/devise_scim/configuration.rb', line 27 def initialize @route_prefix = "/scim/v2" @tenancy = :single @auth_method = :token @token = nil @oauth_client_id = nil @oauth_client_secret = nil @devise_model = "User" @tenant_model = "DeviseScim::ScimTenant" @enable_groups = false @soft_delete = true @deprovision_manual_users = false @user_exclusivity = :multiple @exclusivity_conflict = :error @adapter = nil end |
Instance Attribute Details
#adapter ⇒ Object
Returns the value of attribute adapter.
11 12 13 |
# File 'lib/devise_scim/configuration.rb', line 11 def adapter @adapter end |
#auth_method ⇒ Object
Returns the value of attribute auth_method.
11 12 13 |
# File 'lib/devise_scim/configuration.rb', line 11 def auth_method @auth_method end |
#deprovision_manual_users ⇒ Object
Returns the value of attribute deprovision_manual_users.
11 12 13 |
# File 'lib/devise_scim/configuration.rb', line 11 def deprovision_manual_users @deprovision_manual_users end |
#devise_model ⇒ Object
Returns the value of attribute devise_model.
11 12 13 |
# File 'lib/devise_scim/configuration.rb', line 11 def devise_model @devise_model end |
#enable_groups ⇒ Object
Returns the value of attribute enable_groups.
11 12 13 |
# File 'lib/devise_scim/configuration.rb', line 11 def enable_groups @enable_groups end |
#exclusivity_conflict ⇒ Object
Returns the value of attribute exclusivity_conflict.
11 12 13 |
# File 'lib/devise_scim/configuration.rb', line 11 def exclusivity_conflict @exclusivity_conflict end |
#oauth_client_id ⇒ Object
Returns the value of attribute oauth_client_id.
11 12 13 |
# File 'lib/devise_scim/configuration.rb', line 11 def oauth_client_id @oauth_client_id end |
#oauth_client_secret ⇒ Object
Returns the value of attribute oauth_client_secret.
11 12 13 |
# File 'lib/devise_scim/configuration.rb', line 11 def oauth_client_secret @oauth_client_secret end |
#route_prefix ⇒ Object
Returns the value of attribute route_prefix.
11 12 13 |
# File 'lib/devise_scim/configuration.rb', line 11 def route_prefix @route_prefix end |
#soft_delete ⇒ Object
Returns the value of attribute soft_delete.
11 12 13 |
# File 'lib/devise_scim/configuration.rb', line 11 def soft_delete @soft_delete end |
#tenancy ⇒ Object
Returns the value of attribute tenancy.
11 12 13 |
# File 'lib/devise_scim/configuration.rb', line 11 def tenancy @tenancy end |
#tenant_model ⇒ Object
Returns the value of attribute tenant_model.
11 12 13 |
# File 'lib/devise_scim/configuration.rb', line 11 def tenant_model @tenant_model end |
#token ⇒ Object
Returns the value of attribute token.
11 12 13 |
# File 'lib/devise_scim/configuration.rb', line 11 def token @token end |
#user_exclusivity ⇒ Object
Returns the value of attribute user_exclusivity.
11 12 13 |
# File 'lib/devise_scim/configuration.rb', line 11 def user_exclusivity @user_exclusivity end |
Instance Method Details
#validate! ⇒ Object
44 45 46 47 48 49 50 51 52 |
# File 'lib/devise_scim/configuration.rb', line 44 def validate! validate_enum!(:tenancy, tenancy, VALID_TENANCY) validate_enum!(:auth_method, auth_method, VALID_AUTH_METHODS) validate_enum!(:user_exclusivity, user_exclusivity, VALID_USER_EXCLUSIVITY) validate_enum!(:exclusivity_conflict, exclusivity_conflict, VALID_EXCLUSIVITY_CONFLICT) validate_deprovision! validate_oauth! end |