Closed joeldsa closed 11 years ago
Hi,
I'm trying to debug why the redirect does not work and the saml flow does not begin. I'm not able to find what is missing in my code. Can you help me? This is what I have. What am I getting wrong?
require 'sinatra' require 'omniauth-saml'
use Rack::Session::Cookie use OmniAuth::Strategies::SAML, :assertion_consumer_service_url => "http://idp.local.com:3000/auth/saml/callback", :issuer => "https://idp.local.com/shibboleth-sp", :idp_sso_target_url => "https://openidp.org/idp/profile/SAML2/Redirect/SSO", :idp_cert_fingerprint => "63:49:58:C9:59:57:A5:09:13:DA:62:FE:14:2C:1B:93:A8:3C:6D:B7", :name_identifier_format => "urn:oasis:names:tc:SAML:2.0:nameid-format:transient"
class SAMLLoginApplication < Sinatra::Base
get '/' do "Hello World #{SecureRandom.uuid}" end
%w(get post).each do |method| send(method, "/auth/:provider/callback") do env['omniauth.auth'] # => OmniAuth::AuthHash end end
configure :development do $logger = Logger.new(STDOUT) OmniAuth.config.logger = $logger end
end
if you are trying to setup SP-initiated SSO, issue a GET to /auth/saml, not /auth/saml/callback. this detail is now documented in the README.
/auth/saml
/auth/saml/callback
please try omniauth-saml 1.0.0 and refile if still not working.
Hi,
I'm trying to debug why the redirect does not work and the saml flow does not begin. I'm not able to find what is missing in my code. Can you help me? This is what I have. What am I getting wrong?
require 'sinatra' require 'omniauth-saml'
use Rack::Session::Cookie use OmniAuth::Strategies::SAML, :assertion_consumer_service_url => "http://idp.local.com:3000/auth/saml/callback", :issuer => "https://idp.local.com/shibboleth-sp", :idp_sso_target_url => "https://openidp.org/idp/profile/SAML2/Redirect/SSO", :idp_cert_fingerprint => "63:49:58:C9:59:57:A5:09:13:DA:62:FE:14:2C:1B:93:A8:3C:6D:B7", :name_identifier_format => "urn:oasis:names:tc:SAML:2.0:nameid-format:transient"
class SAMLLoginApplication < Sinatra::Base
get '/' do "Hello World #{SecureRandom.uuid}" end
Support both GET and POST for callbacks
%w(get post).each do |method| send(method, "/auth/:provider/callback") do env['omniauth.auth'] # => OmniAuth::AuthHash end end
configure :development do $logger = Logger.new(STDOUT) OmniAuth.config.logger = $logger end
end