class SAML2::NameID::Policy
Attributes
allow_create[W]
@return [Boolean, nil]
format[W]
sp_name_qualifier[W]
Public Class Methods
new(allow_create = nil, format = nil, sp_name_qualifier = nil)
click to toggle source
@param allow_create
optional [Boolean] @param format optional [String] @param sp_name_qualifier
optional [String]
Calls superclass method
SAML2::Base::new
# File lib/saml2/name_id.rb, line 33 def initialize(allow_create = nil, format = nil, sp_name_qualifier = nil) super() @allow_create = allow_create if allow_create @format = format if format @sp_name_qualifier = sp_name_qualifier if sp_name_qualifier end
Public Instance Methods
==(other)
click to toggle source
@param rhs [Policy] @return [Boolean]
# File lib/saml2/name_id.rb, line 61 def ==(other) allow_create? == other.allow_create? && format == other.format && sp_name_qualifier == other.sp_name_qualifier end
allow_create?()
click to toggle source
@return [Boolean, nil]
# File lib/saml2/name_id.rb, line 41 def allow_create? @allow_create = xml["AllowCreate"]&.== "true" if xml && !instance_variable_defined?(:@allow_create) @allow_create end
build(builder)
click to toggle source
(see Base#build
)
# File lib/saml2/name_id.rb, line 68 def build(builder) builder["samlp"].NameIDPolicy do |name_id_policy| name_id_policy.parent["Format"] = format if format name_id_policy.parent["SPNameQualifier"] = sp_name_qualifier if sp_name_qualifier name_id_policy.parent["AllowCreate"] = allow_create? unless allow_create?.nil? end end
format()
click to toggle source
@see Format
@return [String, nil]
# File lib/saml2/name_id.rb, line 48 def format @format = xml["Format"] if xml && !instance_variable_defined?(:@format) @format end
sp_name_qualifier()
click to toggle source
@return [String, nil]
# File lib/saml2/name_id.rb, line 54 def sp_name_qualifier @sp_name_qualifier = xml["SPNameQualifier"] if xml && !instance_variable_defined?(:@sp_name_qualifier) @sp_name_qualifier end