Class: DeviseSamlAuthenticatable::DefaultAttributeMapResolver
- Inherits:
-
Object
- Object
- DeviseSamlAuthenticatable::DefaultAttributeMapResolver
- Defined in:
- lib/devise_saml_authenticatable/default_attribute_map_resolver.rb
Instance Method Summary collapse
- #attribute_map ⇒ Object
-
#initialize(saml_response) ⇒ DefaultAttributeMapResolver
constructor
A new instance of DefaultAttributeMapResolver.
Constructor Details
#initialize(saml_response) ⇒ DefaultAttributeMapResolver
Returns a new instance of DefaultAttributeMapResolver.
3 4 5 |
# File 'lib/devise_saml_authenticatable/default_attribute_map_resolver.rb', line 3 def initialize(saml_response) @saml_response = saml_response end |
Instance Method Details
#attribute_map ⇒ Object
7 8 9 10 11 12 13 14 15 16 |
# File 'lib/devise_saml_authenticatable/default_attribute_map_resolver.rb', line 7 def attribute_map return {} unless File.exist?(attribute_map_path) attribute_map = YAML.load(File.read(attribute_map_path)) if attribute_map.key?(Rails.env) attribute_map[Rails.env] else attribute_map end end |