👽 Removed scope fallback parsing due form package changes
This commit is contained in:
parent
0b69823912
commit
c828fa0683
1 changed files with 0 additions and 17 deletions
|
@ -2,7 +2,6 @@ package http
|
|||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"strings"
|
||||
|
||||
|
@ -122,22 +121,6 @@ func (r *AuthAuthorizationRequest) bind(req *http.Request) error {
|
|||
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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue