class Rack::Saml::ResponseHandler
Attributes
response[R]
Public Class Methods
extract_attrs(env, session)
click to toggle source
# File lib/rack/saml/response_handler.rb, line 36 def self.extract_attrs(env, session) session.env.each do |k, v| env[k] = v end end
new(request, config, metadata)
click to toggle source
Rack::Saml::ResponseHandler
request: Rack
current request instance config: config/saml.yml metadata: specified idp entity in the config/metadata.yml
# File lib/rack/saml/response_handler.rb, line 14 def initialize(request, config, metadata) @response = (eval "Rack::Saml::#{config['assertion_handler'].to_s.capitalize}Response").new(request, config, metadata) end
Public Instance Methods
extract_attrs(env, session, attribute_map)
click to toggle source
# File lib/rack/saml/response_handler.rb, line 18 def extract_attrs(env, session, attribute_map) if session.env.empty? attribute_map.each do |attr_name, env_name| attribute = @response.attributes[attr_name] if !attribute.nil? session.env[env_name] = attribute end end if !@response.config['shib_app_id'].nil? session.env['Shib-Application-ID'] = @response.config['shib_app_id'] end session.env['Shib-Session-ID'] = session.get_sid('saml_res') end session.env.each do |k, v| env[k] = v end end