Class: RSAML::AuthenticationContext

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

Overview

Specifies the context of an authentication event. The element can contain an authentication context class reference, an authentication context declaration or declaration reference, or both.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#class_referenceObject

A URI reference identifying an authentication context class that describes the authentication context declaration that follows.



8
9
10
# File 'lib/rsaml/authentication_context.rb', line 8

def class_reference
  @class_reference
end

#context_declarationObject

An authentication context declaration provided by value.



11
12
13
# File 'lib/rsaml/authentication_context.rb', line 11

def context_declaration
  @context_declaration
end

#context_declaration_refObject

A URI reference that identifies a declaration. The URI reference MAY directly resolve into an XML document containing the referenced declaration.



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

def context_declaration_ref
  @context_declaration_ref
end

Instance Method Details

#authenticating_authorityObject

Zero or more unique identifiers of authentication authorities that were involved in the authentication of the principal



19
20
21
# File 'lib/rsaml/authentication_context.rb', line 19

def authenticating_authority
  @authenticating_authority ||= []
end

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

Construct an XML fragment representing the authentication statement



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

def to_xml(xml=Builder::XmlMarkup.new)
  xml.tag!('saml:AuthnContext') {
    xml.tag!('saml:AuthnContextClassRef', class_reference) unless class_reference.nil?
    xml.tag!('saml:AuthnContextDecl', context_declaration) unless context_declaration.nil?
    xml.tag!('saml:AuthnContextDeclRef', context_declaration_ref) unless context_declaration_ref.nil?
  }
end