Class: Spid::Saml2::SamlParser
- Inherits:
-
Object
- Object
- Spid::Saml2::SamlParser
- Includes:
- Utils
- Defined in:
- lib/spid/saml2/saml_parser.rb
Overview
:nodoc:
Direct Known Subclasses
Instance Attribute Summary collapse
-
#document ⇒ Object
readonly
Returns the value of attribute document.
-
#saml_message ⇒ Object
readonly
Returns the value of attribute saml_message.
Instance Method Summary collapse
- #element_from_xpath(xpath) ⇒ Object
-
#initialize(saml_message:) ⇒ SamlParser
constructor
A new instance of SamlParser.
Methods included from Utils
#certificate_from_encoded_der, #decode, #decode_and_inflate, #deflate, #deflate_and_encode, #encode, #escaped_params, #escaped_query_string, #inflate, #query_param, #query_params, #query_string
Constructor Details
#initialize(saml_message:) ⇒ SamlParser
Returns a new instance of SamlParser.
13 14 15 16 |
# File 'lib/spid/saml2/saml_parser.rb', line 13 def initialize(saml_message:) @saml_message = @document = REXML::Document.new(@saml_message) end |
Instance Attribute Details
#document ⇒ Object (readonly)
Returns the value of attribute document.
11 12 13 |
# File 'lib/spid/saml2/saml_parser.rb', line 11 def document @document end |
#saml_message ⇒ Object (readonly)
Returns the value of attribute saml_message.
10 11 12 |
# File 'lib/spid/saml2/saml_parser.rb', line 10 def @saml_message end |
Instance Method Details
#element_from_xpath(xpath) ⇒ Object
18 19 20 |
# File 'lib/spid/saml2/saml_parser.rb', line 18 def element_from_xpath(xpath) document.elements[xpath]&.value&.strip end |