Class: RSAML::Identifier::Base

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

Overview

An extension point that allows applications to add new kinds of identifiers.

Direct Known Subclasses

Name

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#name_qualifierObject

The security or administrative domain that qualifies the name. This attribute provides a means to federate names from disparate user stores without collision.



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

def name_qualifier
  @name_qualifier
end

#sp_name_qualifierObject

Further qualifies a name with the name of a service provider or affiliation of providers. This attribute provides an additional means to federate names on the basis of the relying party or parties.



12
13
14
# File 'lib/rsaml/identifier/base.rb', line 12

def sp_name_qualifier
  @sp_name_qualifier
end

Instance Method Details

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

Create an XML fragment representing the identifier



15
16
17
18
19
20
# File 'lib/rsaml/identifier/base.rb', line 15

def to_xml(xml=Builder::XmlMarkup.new)
  attributes = {}
  attributes['NameQualifier'] = name_qualifier unless name_qualifier.nil?
  attributes['SPNameQualifier'] = sp_name_qualifier unless sp_name_qualifier.nil?
  xml.tag!('saml:BaseID', '', attributes)
end