Class: SamlSp::ResolutionSerivceConfig

Inherits:
ConfigBlock show all
Defined in:
lib/saml_sp/config.rb

Constant Summary

Constants inherited from ConfigBlock

ConfigBlock::NOVAL_MARKER

Instance Method Summary collapse

Methods inherited from ConfigBlock

inherited

Instance Method Details

#http_basic_auth(&blk) ⇒ Object



87
88
89
90
# File 'lib/saml_sp/config.rb', line 87

def http_basic_auth(&blk)
  @auth_info = HttpBasicAuthConfig.new
  @auth_info.interpret(blk)
end

#interpret(config_block, filename = nil) ⇒ Object

Raises:



73
74
75
76
77
78
79
80
81
82
83
84
85
# File 'lib/saml_sp/config.rb', line 73

def interpret(config_block, filename = nil)
  super

  raise ConfigurationError, "Incomplete artifact resolution service information" unless @source_id && @uri && @identity_provider && @service_provider
  
  resolver = Saml2::ArtifactResolver.new(@source_id, @uri, @identity_provider, @service_provider)
  
  if @auth_info
    resolver.basic_auth_credentials(@auth_info.user_id, @auth_info.password, @auth_info.realm)
  end

  resolver
end