Module: Devise

Defined in:
lib/devise_saml_authenticatable.rb,
lib/devise_saml_authenticatable/model.rb,
lib/devise_saml_authenticatable/strategy.rb

Overview

Get saml information from config/saml.yml now

Defined Under Namespace

Modules: Models, Strategies Classes: SamlSessionsController

Constant Summary collapse

@@saml_logger =
true
@@saml_create_user =
false
@@saml_update_user =
false
@@saml_config =
OneLogin::RubySaml::Settings.new
@@saml_default_update_resource_hook =
Proc.new do |user, saml_response, auth_value|
  saml_response.attributes.resource_keys.each do |key|
    user.send "#{key}=", saml_response.attribute_value_by_resource_key(key)
  end
   if (Devise.saml_use_subject)
    user.send "#{Devise.saml_default_user_key}=", auth_value
  end
   user.save!
end
@@saml_update_resource_hook =
@@saml_default_update_resource_hook
@@saml_default_resource_locator =
Proc.new do |model, saml_response, auth_value|
  model.where(Devise.saml_default_user_key => auth_value).first
end
@@saml_resource_locator =
@@saml_default_resource_locator
@@saml_name_identifier_retriever =
Proc.new do |current_user|
  current_user.public_send(Devise.saml_default_user_key)
end

Class Method Summary collapse

Class Method Details

.saml_configure {|saml_config| ... } ⇒ Object

Yields:

  • (saml_config)

93
94
95
# File 'lib/devise_saml_authenticatable.rb', line 93

def self.saml_configure
  yield saml_config
end