Class: SpRailsSaml::Settings
- Inherits:
-
Object
- Object
- SpRailsSaml::Settings
- Includes:
- Singleton
- Defined in:
- lib/sp-rails-saml/settings.rb
Overview
SAML2 settings for initializer.
Constant Summary collapse
- RUBY_SAML_DEFAULT_SETTINGS =
{ compress_request: true, skip_subject_confirmation: true, skip_conditions: true, skip_destination: false, want_assertions_signed: true, account_find_key: :id, user_find_key: :email, saml_response_user_find_key: :email }.freeze
Class Attribute Summary collapse
-
.account_class ⇒ Object
Returns the value of attribute account_class.
-
.account_find_key ⇒ Object
Returns the value of attribute account_find_key.
-
.authn_context ⇒ Object
Returns the value of attribute authn_context.
-
.authn_context_comparison ⇒ Object
Returns the value of attribute authn_context_comparison.
-
.name_identifier_format ⇒ Object
Returns the value of attribute name_identifier_format.
-
.saml_response_user_find_key ⇒ Object
Returns the value of attribute saml_response_user_find_key.
-
.user_class ⇒ Object
Returns the value of attribute user_class.
-
.user_find_key ⇒ Object
Returns the value of attribute user_find_key.
Instance Attribute Summary collapse
-
#account_class ⇒ Object
readonly
Returns the value of attribute account_class.
-
#account_find_key ⇒ Object
readonly
Returns the value of attribute account_find_key.
-
#authn_context ⇒ Object
readonly
Returns the value of attribute authn_context.
-
#authn_context_comparison ⇒ Object
readonly
Returns the value of attribute authn_context_comparison.
-
#name_identifier_format ⇒ Object
readonly
Returns the value of attribute name_identifier_format.
-
#saml_response_user_find_key ⇒ Object
readonly
Returns the value of attribute saml_response_user_find_key.
-
#user_class ⇒ Object
readonly
Returns the value of attribute user_class.
-
#user_find_key ⇒ Object
readonly
Returns the value of attribute user_find_key.
Class Method Summary collapse
Class Attribute Details
.account_class ⇒ Object
Returns the value of attribute account_class.
30 31 32 |
# File 'lib/sp-rails-saml/settings.rb', line 30 def account_class @account_class end |
.account_find_key ⇒ Object
Returns the value of attribute account_find_key.
30 31 32 |
# File 'lib/sp-rails-saml/settings.rb', line 30 def account_find_key @account_find_key end |
.authn_context ⇒ Object
Returns the value of attribute authn_context.
30 31 32 |
# File 'lib/sp-rails-saml/settings.rb', line 30 def authn_context @authn_context end |
.authn_context_comparison ⇒ Object
Returns the value of attribute authn_context_comparison.
30 31 32 |
# File 'lib/sp-rails-saml/settings.rb', line 30 def authn_context_comparison @authn_context_comparison end |
.name_identifier_format ⇒ Object
Returns the value of attribute name_identifier_format.
30 31 32 |
# File 'lib/sp-rails-saml/settings.rb', line 30 def name_identifier_format @name_identifier_format end |
.saml_response_user_find_key ⇒ Object
Returns the value of attribute saml_response_user_find_key.
30 31 32 |
# File 'lib/sp-rails-saml/settings.rb', line 30 def saml_response_user_find_key @saml_response_user_find_key end |
.user_class ⇒ Object
Returns the value of attribute user_class.
30 31 32 |
# File 'lib/sp-rails-saml/settings.rb', line 30 def user_class @user_class end |
.user_find_key ⇒ Object
Returns the value of attribute user_find_key.
30 31 32 |
# File 'lib/sp-rails-saml/settings.rb', line 30 def user_find_key @user_find_key end |
Instance Attribute Details
#account_class ⇒ Object (readonly)
Returns the value of attribute account_class.
20 21 22 |
# File 'lib/sp-rails-saml/settings.rb', line 20 def account_class @account_class end |
#account_find_key ⇒ Object (readonly)
Returns the value of attribute account_find_key.
20 21 22 |
# File 'lib/sp-rails-saml/settings.rb', line 20 def account_find_key @account_find_key end |
#authn_context ⇒ Object (readonly)
Returns the value of attribute authn_context.
20 21 22 |
# File 'lib/sp-rails-saml/settings.rb', line 20 def authn_context @authn_context end |
#authn_context_comparison ⇒ Object (readonly)
Returns the value of attribute authn_context_comparison.
20 21 22 |
# File 'lib/sp-rails-saml/settings.rb', line 20 def authn_context_comparison @authn_context_comparison end |
#name_identifier_format ⇒ Object (readonly)
Returns the value of attribute name_identifier_format.
20 21 22 |
# File 'lib/sp-rails-saml/settings.rb', line 20 def name_identifier_format @name_identifier_format end |
#saml_response_user_find_key ⇒ Object (readonly)
Returns the value of attribute saml_response_user_find_key.
20 21 22 |
# File 'lib/sp-rails-saml/settings.rb', line 20 def saml_response_user_find_key @saml_response_user_find_key end |
#user_class ⇒ Object (readonly)
Returns the value of attribute user_class.
20 21 22 |
# File 'lib/sp-rails-saml/settings.rb', line 20 def user_class @user_class end |
#user_find_key ⇒ Object (readonly)
Returns the value of attribute user_find_key.
20 21 22 |
# File 'lib/sp-rails-saml/settings.rb', line 20 def user_find_key @user_find_key end |
Class Method Details
.setup {|_self| ... } ⇒ Object
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
# File 'lib/sp-rails-saml/settings.rb', line 39 def setup yield self setting = SpRailsSaml::Settings.instance setting.instance_variable_set(:@name_identifier_format, SpRailsSaml::Settings.name_identifier_format) setting.instance_variable_set(:@authn_context, SpRailsSaml::Settings.authn_context) setting.instance_variable_set(:@authn_context_comparison, SpRailsSaml::Settings.authn_context_comparison) setting.instance_variable_set(:@user_class, SpRailsSaml::Settings.user_class) setting.instance_variable_set(:@account_class, SpRailsSaml::Settings.account_class) setting.instance_variable_set(:@user_find_key, SpRailsSaml::Settings.user_find_key || RUBY_SAML_DEFAULT_SETTINGS[:user_find_key]) setting.instance_variable_set(:@account_find_key, SpRailsSaml::Settings.account_find_key || RUBY_SAML_DEFAULT_SETTINGS[:account_find_key]) setting.instance_variable_set(:@saml_response_user_find_key, SpRailsSaml::Settings.saml_response_user_find_key || RUBY_SAML_DEFAULT_SETTINGS[:saml_response_user_find_key]) end |