Class: RSAML::Protocol::Scoping

Inherits:
Object
  • Object
show all
Defined in:
lib/rsaml/protocol/scoping.rb

Overview

specifies the identity providers trusted by the requester to authenticate the presenter, as well as limitations and context related to proxying of the <AuthnRequest> message to subsequent identity providers by the responder.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#idp_listObject

An advisory list of identity providers and associated information that the requester deems acceptable to respond to the request.



14
15
16
# File 'lib/rsaml/protocol/scoping.rb', line 14

def idp_list
  @idp_list
end

#proxy_countObject

Specifies the number of proxying indirections permissible between the identity provider that receives this <AuthnRequest> and the identity provider who ultimately authenticates the principal. A count of zero permits no proxying, while omitting this attribute expresses no such restriction.



10
11
12
# File 'lib/rsaml/protocol/scoping.rb', line 10

def proxy_count
  @proxy_count
end

Instance Method Details

#requestor_idsObject

Identifies the set of requesting entities on whose behalf the requester is acting. Used to communicate the chain of requesters when proxying occurs.



18
19
20
# File 'lib/rsaml/protocol/scoping.rb', line 18

def requestor_ids
  @requestor_ids ||= []
end

#to_xml(xml = Builder::XmlMarkup.new) ⇒ Object

Construct an XML fragment representing the scoping



23
24
25
26
27
28
29
30
# File 'lib/rsaml/protocol/scoping.rb', line 23

def to_xml(xml=Builder::XmlMarkup.new)
  attributes = {}
  attributes['ProxyCount'] = proxy_count if proxy_count
  xml.tag!('samlp:Scoping', attributes) {
    xml << idp_list.to_xml if idp_list
    requestor_ids.each { |requestor_id| xml << requestor_id.to_xml }
  }
end