Class: Isaca::Rails::Configuration
- Inherits:
-
Object
- Object
- Isaca::Rails::Configuration
- Defined in:
- lib/isaca/rails.rb
Instance Attribute Summary collapse
-
#cache_sso ⇒ Object
Whether or not Rails should cache ISACA SSO endpoints.
-
#cache_sso_details_expires_in ⇒ Object
If cache_sso is true, user details caching should expire based on the given value.
-
#cache_sso_token_expires_in ⇒ Object
If cache_sso is true, token caching should expire based on the given value.
-
#redirect_after_account_creation ⇒ Object
Will append RedirectURL to Isaca Account creation wizard URI if value is not nil.
-
#redirect_for_consent ⇒ Object
Whether or not users should be redirected and required to provide consent if they have not already.
-
#user_model ⇒ Object
ActiveRecord class that represents the users of your application.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
105 106 107 108 109 110 |
# File 'lib/isaca/rails.rb', line 105 def initialize @redirect_for_consent = true @cache_sso = false @cache_sso_token_expires_in = 2.minutes @cache_sso_details_expires_in = 15.minutes end |
Instance Attribute Details
#cache_sso ⇒ Object
Whether or not Rails should cache ISACA SSO endpoints.
Isaca::Rails.configure {|config| config.cache_sso = false}
Default false
79 80 81 |
# File 'lib/isaca/rails.rb', line 79 def cache_sso @cache_sso end |
#cache_sso_details_expires_in ⇒ Object
If cache_sso is true, user details caching should expire based on the given value. The duration of this cache will impact how frequently a user’s personal data is “synced”.
Isaca::Rails.configure {|config| config.cache_sso_details_expires_in = 15.minutes}
Default 15 minutes
96 97 98 |
# File 'lib/isaca/rails.rb', line 96 def cache_sso_details_expires_in @cache_sso_details_expires_in end |
#cache_sso_token_expires_in ⇒ Object
If cache_sso is true, token caching should expire based on the given value. Keep in mind that if a user logs out of another ISACA service that the session cannot be validated until the cache expires [assuming a Token cookie still exists].
Isaca::Rails.configure {|config| config.cache_sso_token_expires_in = 2.minutes}
Default 2 minutes
88 89 90 |
# File 'lib/isaca/rails.rb', line 88 def cache_sso_token_expires_in @cache_sso_token_expires_in end |
#redirect_after_account_creation ⇒ Object
Will append RedirectURL to Isaca Account creation wizard URI if value is not nil
Isaca::Rails.configure {|config| config.redirect_after_account_creation = “myapp.isaca.org”}
Default nil
103 104 105 |
# File 'lib/isaca/rails.rb', line 103 def redirect_after_account_creation @redirect_after_account_creation end |
#redirect_for_consent ⇒ Object
Whether or not users should be redirected and required to provide consent if they have not already.
Isaca::Rails.configure {|config| config.redirect_for_consent = ::Person}
Default true
72 73 74 |
# File 'lib/isaca/rails.rb', line 72 def @redirect_for_consent end |
#user_model ⇒ Object
ActiveRecord class that represents the users of your application. Should return an ActiveRecord class.
You can set the user_model in the configuration for this engine.
Isaca::Rails.configure {|config| config.user_model = ::Person}
Default ‘::User`
65 66 67 |
# File 'lib/isaca/rails.rb', line 65 def user_model @user_model end |