module Saml
Constants
- ATTR_EXT_NAMESPACE
- MD_ATTR_NAMESPACE
- MD_NAMESPACE
- MD_RPI_NAMESPACE
- SAMLP_NAMESPACE
- SAML_NAMESPACE
- SAML_VERSION
- VERSION
- XML_DSIG_NAMESPACE
- XSI_NAMESPACE
- XS_NAMESPACE
Public Class Methods
current_provider()
click to toggle source
# File lib/saml.rb, line 234 def self.current_provider Thread.current['saml_current_provider'] || NullProvider.new end
current_provider=(provider)
click to toggle source
# File lib/saml.rb, line 238 def self.current_provider=(provider) Thread.current['saml_current_provider'] = provider end
current_store()
click to toggle source
# File lib/saml.rb, line 242 def self.current_store store_name = Thread.current['saml_current_store'] Saml::Config.registered_stores[store_name] || Saml::Config.registered_stores[Saml::Config.default_store] || raise(Errors::InvalidStore.new(store_name)) end
current_store=(store_name)
click to toggle source
# File lib/saml.rb, line 249 def self.current_store=(store_name) Thread.current['saml_current_store'] = store_name end
generate_id()
click to toggle source
# File lib/saml.rb, line 257 def self.generate_id "_#{::SecureRandom.hex(20)}" end
parse_message(message, type)
click to toggle source
# File lib/saml.rb, line 269 def self.parse_message(message, type) if %w(authn_request response logout_request logout_response artifact_resolve artifact_response).include?(type.to_s) klass = "Saml::#{type.to_s.camelize}".constantize klass.parse(message, single: true) elsif klass = type.to_s.camelize.safe_constantize klass.parse(message, single: true) else nil end end
provider(entity_id)
click to toggle source
# File lib/saml.rb, line 261 def self.provider(entity_id) if current_provider && current_provider.entity_id == entity_id current_provider else current_store.find_by_entity_id(entity_id) || raise(Saml::Errors::InvalidProvider.new("Cannot find provider with entity_id: #{entity_id}")) end end
setup() { |Config| ... }
click to toggle source
# File lib/saml.rb, line 253 def self.setup yield Saml::Config end