Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix login form being submitted to /sso instead of /login #565

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions identity_provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ type IdentityProvider struct {
Intermediates []*x509.Certificate
MetadataURL url.URL
SSOURL url.URL
LoginURL url.URL
LogoutURL url.URL
ServiceProviderProvider ServiceProviderProvider
SessionProvider SessionProvider
Expand Down
3 changes: 3 additions & 0 deletions samlidp/samlidp.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ func New(opts Options) (*Server, error) {
metadataURL.Path += "/metadata"
ssoURL := opts.URL
ssoURL.Path += "/sso"
loginURL := opts.URL
loginURL.Path += "/login"
logr := opts.Logger
if logr == nil {
logr = logger.DefaultLogger
Expand All @@ -65,6 +67,7 @@ func New(opts Options) (*Server, error) {
Certificate: opts.Certificate,
MetadataURL: metadataURL,
SSOURL: ssoURL,
LoginURL: loginURL,
},
logger: logr,
Store: opts.Store,
Expand Down
2 changes: 1 addition & 1 deletion samlidp/session.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ func (s *Server) sendLoginForm(w http.ResponseWriter, _ *http.Request, req *saml
RelayState string
}{
Toast: toast,
URL: req.IDP.SSOURL.String(),
URL: req.IDP.LoginURL.String(),
SAMLRequest: base64.StdEncoding.EncodeToString(req.RequestBuffer),
RelayState: req.RelayState,
}
Expand Down
Loading