👽 Removed scope fallback parsing due form package changes

This commit is contained in:
Maxim Lebedev 2023-08-06 06:04:19 +06:00
parent 0b69823912
commit c828fa0683
Signed by: toby3d
GPG Key ID: 1F14E25B7C119FC5
1 changed files with 0 additions and 17 deletions

View File

@ -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
}