lib/omniauth/strategies/cas/saml_ticket_validator.rb
# finds an `<cas:authenticationSuccess>` node in
# a `<cas:serviceResponse>` body if present; returns nil
# if the passed body is nil or if there is no such node.
#
# Depending on the CAS implementation, the success value may be
# samlp:Success or saml1p:Success, so we use a regexp to cover
# the different cases.
finds an `` node in
a `` body if present; returns nil
if the passed body is nil or if there is no such node.

Depending on the CAS implementation, the success value may be
samlp:Success or saml1p:Success, so we use a regexp to cover
the different cases.
finds an ` ` node in a ` ` body if present ; returns nil if the passed body is nil or if there is no such node . Depending on the CAS implementation the success value may be samlp : Success or saml1p : Success so we use a regexp to cover the different cases .
def find_authentication_success(body)
          return nil if body.nil? || body == ''
          begin
            doc = Nokogiri::XML(body)
            if @options.saml == true && doc.remove_namespaces!.xpath('//StatusCode').first.attributes['Value'].value =~ /saml[1]?[p]?:Success/
              doc.css('AttributeStatement')
            else
              nil
            end
          rescue Nokogiri::XML::XPath::SyntaxError
            nil
          end
        end
def find_authentication_success ( body ) return nil if body . nil? || body == '' begin doc = Nokogiri :: XML ( body ) if @options . saml == true && doc . remove_namespaces! . xpath ( '//StatusCode' ) . first . attributes [ 'Value' ] . value =~ / saml[1]?[p]?:Success / doc . css ( 'AttributeStatement' ) else nil end rescue Nokogiri :: XML :: XPath :: SyntaxError nil end end
finds an `<cas:authenticationSuccess>` node in
a `<cas:serviceResponse>` body if present; returns nil
if the passed body is nil or if there is no such node.
finds an ` <cas : authenticationSuccess > ` node in a ` <cas : serviceResponse > ` body if present ; returns nil if the passed body is nil or if there is no such node .
body
<not_specific>