File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -226,6 +226,12 @@ func (s *ServiceProvider) AcsURL() *url.URL {
226226 return & s .mw .ServiceProvider .AcsURL
227227}
228228
229+ func (s * ServiceProvider ) LoginUrl () * url.URL {
230+ logout , _ := url .JoinPath (s .root .String (), "/saml/login" )
231+ u , _ := url .Parse (logout )
232+ return u
233+ }
234+
229235func (s * ServiceProvider ) LogoutUrl () * url.URL {
230236 logout , _ := url .JoinPath (s .root .String (), "/saml/logout" )
231237 u , _ := url .Parse (logout )
@@ -376,7 +382,7 @@ func NewMux(s *ServiceProvider) *http.ServeMux {
376382 mux .HandleFunc (s .LogoutUrl ().Path , s .LogoutHandler )
377383
378384 // login endpoint
379- mux .Handle ("/saml/login" , s .RequireAccount (http .HandlerFunc (s .HomeHandler )))
385+ mux .Handle (s . LoginUrl (). Path , s .RequireAccount (http .HandlerFunc (s .HomeHandler )))
380386
381387 return mux
382388}
You can’t perform that action at this time.
0 commit comments