Class: Saml::Elements::StatusCode

Inherits:
Object
  • Object
show all
Includes:
Base
Defined in:
lib/saml/elements/status_code.rb

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ StatusCode

Returns a new instance of StatusCode.



15
16
17
18
19
# File 'lib/saml/elements/status_code.rb', line 15

def initialize(*args)
  options          = args.extract_options!
  @sub_status_code = Saml::Elements::SubStatusCode.new(:value => options.delete(:sub_status_value)) if options[:sub_status_value]
  super(*(args << options))
end

Instance Method Details

#authn_failed?Boolean

Returns:

  • (Boolean)


25
26
27
# File 'lib/saml/elements/status_code.rb', line 25

def authn_failed?
  sub_status_code.value == SubStatusCodes::AUTHN_FAILED
end

#no_authn_context?Boolean

Returns:

  • (Boolean)


33
34
35
# File 'lib/saml/elements/status_code.rb', line 33

def no_authn_context?
  sub_status_code.value == SubStatusCodes::NO_AUTHN_CONTEXT
end

#partial_logout?Boolean

Returns:

  • (Boolean)


37
38
39
# File 'lib/saml/elements/status_code.rb', line 37

def partial_logout?
  sub_status_code.value == SubStatusCodes::PARTIAL_LOGOUT
end

#request_denied?Boolean

Returns:

  • (Boolean)


29
30
31
# File 'lib/saml/elements/status_code.rb', line 29

def request_denied?
  sub_status_code.value == SubStatusCodes::REQUEST_DENIED
end

#success?Boolean

Returns:

  • (Boolean)


21
22
23
# File 'lib/saml/elements/status_code.rb', line 21

def success?
  value == TopLevelCodes::SUCCESS
end