fix: Omit non-standard, empty fields in RefreshTokenRequest when performing a token refresh (#599)

* Add omitempty tags

* Add omitempty to more fields
This commit is contained in:
Yuval Marcus 2024-05-06 02:13:52 -04:00 committed by GitHub
parent 24d43f538e
commit 5a84d8c4bc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -734,11 +734,11 @@ func (t tokenEndpointCaller) TokenEndpoint() string {
type RefreshTokenRequest struct {
RefreshToken string `schema:"refresh_token"`
Scopes oidc.SpaceDelimitedArray `schema:"scope"`
ClientID string `schema:"client_id"`
ClientSecret string `schema:"client_secret"`
ClientAssertion string `schema:"client_assertion"`
ClientAssertionType string `schema:"client_assertion_type"`
Scopes oidc.SpaceDelimitedArray `schema:"scope,omitempty"`
ClientID string `schema:"client_id,omitempty"`
ClientSecret string `schema:"client_secret,omitempty"`
ClientAssertion string `schema:"client_assertion,omitempty"`
ClientAssertionType string `schema:"client_assertion_type,omitempty"`
GrantType oidc.GrantType `schema:"grant_type"`
}