mirror of
https://git.uploadfilter24.eu/lerentis/terraform-provider-gitea.git
synced 2024-12-04 21:08:11 +00:00
feat(gitea_oauth_app): support
This commit is contained in:
parent
c1ba34b248
commit
707443c6d2
2 changed files with 21 additions and 12 deletions
|
@ -9,6 +9,7 @@ import (
|
|||
|
||||
const (
|
||||
oauth2KeyName string = "name"
|
||||
oauth2KeyConfidentialClient string = "confidential_client"
|
||||
oauth2KeyRedirectURIs string = "redirect_uris"
|
||||
oauth2KeyClientId string = "client_id"
|
||||
oauth2KeyClientSecret string = "client_secret"
|
||||
|
@ -37,6 +38,12 @@ func resourceGiteaOauthApp() *schema.Resource {
|
|||
},
|
||||
Description: "Accepted redirect URIs",
|
||||
},
|
||||
oauth2KeyConfidentialClient: {
|
||||
Type: schema.TypeBool,
|
||||
Optional: true,
|
||||
Default: false,
|
||||
Description: "If set to false, it will be a public client (PKCE will be required)",
|
||||
},
|
||||
oauth2KeyClientId: {
|
||||
Type: schema.TypeString,
|
||||
Computed: true,
|
||||
|
|
2
vendor/code.gitea.io/sdk/gitea/oauth2.go
generated
vendored
2
vendor/code.gitea.io/sdk/gitea/oauth2.go
generated
vendored
|
@ -18,6 +18,7 @@ type Oauth2 struct {
|
|||
ClientID string `json:"client_id"`
|
||||
ClientSecret string `json:"client_secret"`
|
||||
RedirectURIs []string `json:"redirect_uris"`
|
||||
ConfidentialClient bool `json:"confidential_client"`
|
||||
Created time.Time `json:"created"`
|
||||
}
|
||||
|
||||
|
@ -29,6 +30,7 @@ type ListOauth2Option struct {
|
|||
// CreateOauth2Option required options for creating an Application
|
||||
type CreateOauth2Option struct {
|
||||
Name string `json:"name"`
|
||||
ConfidentialClient bool `json:"confidential_client"`
|
||||
RedirectURIs []string `json:"redirect_uris"`
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue