diff --git a/internal/client/authconfigs/authconfigs.go b/internal/client/authconfigs/authconfigs.go index 39cfe80..6e98760 100644 --- a/internal/client/authconfigs/authconfigs.go +++ b/internal/client/authconfigs/authconfigs.go @@ -56,12 +56,13 @@ type authConfigExternal struct { } type decryptedCredential struct { - CredentialType string `json:"credentialType,omitempty"` - UsernameAndPassword *usernameAndPassword `json:"usernameAndPassword,omitempty"` - OidcToken *oidcToken `json:"oidcToken,omitempty"` - Jwt *jwt `json:"jwt,omitempty"` - ServiceAccountCredentials *serviceAccountCredentials `json:"serviceAccountCredentials,omitempty"` - AuthToken *authToken `json:"authToken,omitempty"` + CredentialType string `json:"credentialType,omitempty"` + UsernameAndPassword *usernameAndPassword `json:"usernameAndPassword,omitempty"` + OidcToken *oidcToken `json:"oidcToken,omitempty"` + Jwt *jwt `json:"jwt,omitempty"` + ServiceAccountCredentials *serviceAccountCredentials `json:"serviceAccountCredentials,omitempty"` + AuthToken *authToken `json:"authToken,omitempty"` + OAuth2ResourceOwnerCredentials *oauth2ResourceOwnerCredentials `json:"oauth2ResourceOwnerCredentials,omitempty"` } type usernameAndPassword struct { @@ -90,6 +91,16 @@ type authToken struct { Token string `json:"token,omitempty"` } +type oauth2ResourceOwnerCredentials struct { + ClientId string `json:"clientId,omitempty"` + ClientSecret string `json:"clientSecret,omitempty"` + Username string `json:"username,omitempty"` + Password string `json:"password,omitempty"` + TokenEndpoint string `json:"tokenEndpoint,omitempty"` + RequestType string `json:"requestType,omitempty"` + Scope string `json:"scope,omitempty"` +} + // Create func Create(content []byte) (respBody []byte, err error) { c := authConfig{}