This reverts commit 3fcecd521a.
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
daa6c4172a
Коммит
2999009052
17
web/saml.go
17
web/saml.go
@@ -32,7 +32,6 @@ func loginWithSaml(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
action := r.URL.Query().Get("action")
|
||||
redirectTo := r.URL.Query().Get("redirect_to")
|
||||
extensionId := r.URL.Query().Get("extension_id")
|
||||
relayProps := map[string]string{}
|
||||
relayState := ""
|
||||
|
||||
@@ -48,15 +47,6 @@ func loginWithSaml(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
relayProps["redirect_to"] = redirectTo
|
||||
}
|
||||
|
||||
if len(extensionId) != 0 {
|
||||
relayProps["extension_id"] = extensionId
|
||||
err := c.App.ValidateExtension(extensionId)
|
||||
if err != nil {
|
||||
c.Err = err
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
if len(relayProps) > 0 {
|
||||
relayState = b64.StdEncoding.EncodeToString([]byte(model.MapToJson(relayProps)))
|
||||
}
|
||||
@@ -152,13 +142,6 @@ func completeSaml(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
switch action {
|
||||
case model.OAUTH_ACTION_MOBILE:
|
||||
ReturnStatusOK(w)
|
||||
case model.OAUTH_ACTION_CLIENT:
|
||||
err = c.App.SendMessageToExtension(w, relayProps["extension_id"], c.App.Session.Token)
|
||||
|
||||
if err != nil {
|
||||
c.Err = err
|
||||
return
|
||||
}
|
||||
case model.OAUTH_ACTION_EMAIL_TO_SSO:
|
||||
http.Redirect(w, r, c.GetSiteURLHeader()+"/login?extra=signin_change", http.StatusFound)
|
||||
default:
|
||||
|
||||
Ссылка в новой задаче
Block a user