kbeckman / omniauth-wsfed

WS-Federation and WS-Trust strategy for OmniAuth.
Other
55 stars 45 forks source link

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

Open sagarjauhari opened 8 years ago

sagarjauhari commented 8 years ago
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 commented 8 years ago

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

thatRailsGuy commented 5 years ago

I'm seeing this too.

thatRailsGuy commented 5 years ago

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