diff options
author | Denys Konovalov <kontakt@denyskon.de> | 2024-07-19 14:28:30 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-19 14:28:30 -0400 |
commit | a8d0c879c38e21a8e78db627119bf622d919ee75 (patch) | |
tree | f55cbd55c967d11e7e4a4c4c96ce7b6db8345353 /modules | |
parent | e9aa39bda4581a69f04dd1d46aab7980940e99ce (diff) | |
download | gitea-a8d0c879c38e21a8e78db627119bf622d919ee75.tar.gz gitea-a8d0c879c38e21a8e78db627119bf622d919ee75.zip |
add skip secondary authorization option for public oauth2 clients (#31454)
Diffstat (limited to 'modules')
-rw-r--r-- | modules/structs/user_app.go | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/modules/structs/user_app.go b/modules/structs/user_app.go index 7f78fbd495..a7d2e28b41 100644 --- a/modules/structs/user_app.go +++ b/modules/structs/user_app.go @@ -31,21 +31,23 @@ type CreateAccessTokenOption struct { // CreateOAuth2ApplicationOptions holds options to create an oauth2 application type CreateOAuth2ApplicationOptions struct { - Name string `json:"name" binding:"Required"` - ConfidentialClient bool `json:"confidential_client"` - RedirectURIs []string `json:"redirect_uris" binding:"Required"` + Name string `json:"name" binding:"Required"` + ConfidentialClient bool `json:"confidential_client"` + SkipSecondaryAuthorization bool `json:"skip_secondary_authorization"` + RedirectURIs []string `json:"redirect_uris" binding:"Required"` } // OAuth2Application represents an OAuth2 application. // swagger:response OAuth2Application type OAuth2Application struct { - ID int64 `json:"id"` - Name string `json:"name"` - ClientID string `json:"client_id"` - ClientSecret string `json:"client_secret"` - ConfidentialClient bool `json:"confidential_client"` - RedirectURIs []string `json:"redirect_uris"` - Created time.Time `json:"created"` + ID int64 `json:"id"` + Name string `json:"name"` + ClientID string `json:"client_id"` + ClientSecret string `json:"client_secret"` + ConfidentialClient bool `json:"confidential_client"` + SkipSecondaryAuthorization bool `json:"skip_secondary_authorization"` + RedirectURIs []string `json:"redirect_uris"` + Created time.Time `json:"created"` } // OAuth2ApplicationList represents a list of OAuth2 applications. |