👽 Removed scope fallback parsing due form package changes
parent
0b69823912
commit
c828fa0683
|
@ -2,7 +2,6 @@ package http
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
|
||||||
"net/http"
|
"net/http"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
@ -122,22 +121,6 @@ func (r *AuthAuthorizationRequest) bind(req *http.Request) error {
|
||||||
r.ResponseType = domain.ResponseTypeCode
|
r.ResponseType = domain.ResponseTypeCode
|
||||||
}
|
}
|
||||||
|
|
||||||
// NOTE(toby3d): fallback for multiple same-key form values
|
|
||||||
if req.URL.Query().Has("scope[]") {
|
|
||||||
for _, k := range req.URL.Query()["scope[]"] {
|
|
||||||
scope, err := domain.ParseScope(k)
|
|
||||||
if err != nil {
|
|
||||||
return fmt.Errorf("cannot parse requested scope: %w", err)
|
|
||||||
}
|
|
||||||
|
|
||||||
if r.Scope.Has(scope) {
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
|
|
||||||
r.Scope = append(r.Scope, scope)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue