From a3526eade6e281afa921e9fe81fbd2b6119fc3d7 Mon Sep 17 00:00:00 2001 From: Maxim Lebedev Date: Fri, 10 Jun 2022 15:00:03 +0500 Subject: [PATCH] :bug: Allow empty scope parameter in authorization request --- internal/auth/delivery/http/auth_http.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/auth/delivery/http/auth_http.go b/internal/auth/delivery/http/auth_http.go index f65abc2..5173a02 100644 --- a/internal/auth/delivery/http/auth_http.go +++ b/internal/auth/delivery/http/auth_http.go @@ -52,7 +52,7 @@ type ( // value, the authorization server MUST NOT issue an access // token for this authorization code. Only the user's profile // URL may be returned without any scope requested. - Scope domain.Scopes `form:"scope"` + Scope domain.Scopes `form:"scope,omitempty"` // The URL that the user entered. Me *domain.Me `form:"me"` @@ -64,7 +64,7 @@ type ( RedirectURI *domain.URL `form:"redirect_uri"` CodeChallengeMethod domain.CodeChallengeMethod `form:"code_challenge_method"` ResponseType domain.ResponseType `form:"response_type"` - Scope domain.Scopes `form:"scope[]"` + Scope domain.Scopes `form:"scope[],omitempty"` Authorize string `form:"authorize"` CodeChallenge string `form:"code_challenge"` State string `form:"state"`