omniauth-wsfed icon indicating copy to clipboard operation
omniauth-wsfed copied to clipboard

NoMethodError (undefined method `text' for nil:NilClass):

Open sagarjauhari opened this issue 8 years ago • 3 comments

NoMethodError (undefined method `text' for nil:NilClass): 
  vendor/bundle/ruby/2.2.0/gems/omniauth-wsfed-0.3.3.pre.beta/lib/omniauth/strategies/wsfed/saml_2_token.rb:18:in `issuer' 
  vendor/bundle/ruby/2.2.0/gems/omniauth-wsfed-0.3.3.pre.beta/lib/omniauth/strategies/wsfed/auth_callback.rb:50:in `issuer' 
  vendor/bundle/ruby/2.2.0/gems/omniauth-wsfed-0.3.3.pre.beta/lib/omniauth/strategies/wsfed/auth_callback_validator.rb:32:in `validate_issuer!' 
  vendor/bundle/ruby/2.2.0/gems/omniauth-wsfed-0.3.3.pre.beta/lib/omniauth/strategies/wsfed/auth_callback_validator.rb:21:in `validate!' 
  vendor/bundle/ruby/2.2.0/gems/omniauth-wsfed-0.3.3.pre.beta/lib/omniauth/strategies/wsfed.rb:41:in `callback_phase' 

sagarjauhari avatar Jun 22 '16 19:06 sagarjauhari

Not sure if this is problem for only the SP that I'm trying to integrate with

sagarjauhari avatar Jun 23 '16 14:06 sagarjauhari

I'm seeing this too.

thatRailsGuy avatar Nov 14 '18 21:11 thatRailsGuy

It's in the base64_cert... line below

          def validate(idp_cert_fingerprint, soft = true)

            # get cert from response

            base64_cert = self.elements["//ds:X509Certificate"].text

            cert_text   = Base64.decode64(base64_cert)

            cert        = OpenSSL::X509::Certificate.new(cert_text)

            # check cert matches registered idp cert

            fingerprint = Digest::SHA1.hexdigest(cert.to_der)

I'm on the 0.3.3.pre.beta version

thatRailsGuy avatar Nov 14 '18 21:11 thatRailsGuy