Add json tags for oauth2 form (#6627)

This commit is contained in:
Jonas Franz 2019-04-15 17:54:50 +02:00 committed by techknowlogick
parent e6161b09ff
commit 62d3f49c28
2 changed files with 31 additions and 8 deletions

View file

@ -168,15 +168,15 @@ func (f *GrantApplicationForm) Validate(ctx *macaron.Context, errs binding.Error
// AccessTokenForm for issuing access tokens from authorization codes or refresh tokens
type AccessTokenForm struct {
GrantType string
ClientID string
ClientSecret string
RedirectURI string
Code string
RefreshToken string
GrantType string `json:"grant_type"`
ClientID string `json:"client_id"`
ClientSecret string `json:"client_secret"`
RedirectURI string `json:"redirect_uri"`
Code string `json:"code"`
RefreshToken string `json:"refresh_token"`
// PKCE support
CodeVerifier string
CodeVerifier string `json:"code_verifier"`
}
// Validate valideates the fields