Class: RSAML::Audience

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

Overview

A URI reference that identifies an intended audience. The URI reference MAY identify a document that describes the terms and conditions of audience membership. It MAY also contain the unique identifier URI from a SAML name identifier that describes a system entity.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(uri) ⇒ Audience

Initialize the Audience instance with the given URI



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

def initialize(uri)
  @uri = uri
end

Instance Attribute Details

#uriObject

URI for the audience



7
8
9
# File 'lib/rsaml/audience.rb', line 7

def uri
  @uri
end

Instance Method Details

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

Construct an XML fragment representing the audience



15
16
17
# File 'lib/rsaml/audience.rb', line 15

def to_xml(xml=Builder::XmlMarkup.new)
  xml.tag!('saml:Audience', uri)
end