Full upgrade (#19)
- SecretName is now mandatory - One can update client_secret in Hydra by creating new Secret object and changing the SecretName in CR instance
This commit is contained in:
committed by
Tomasz Smelcerz
parent
8009fd63d3
commit
294c171ac6
@ -1,11 +1,25 @@
|
||||
package hydra
|
||||
|
||||
import "k8s.io/utils/pointer"
|
||||
|
||||
// OAuth2ClientJSON represents an OAuth2 client digestible by ORY Hydra
|
||||
type OAuth2ClientJSON struct {
|
||||
ClientID *string `json:"client_id,omitempty"`
|
||||
Secret *string `json:"client_secret,omitempty"`
|
||||
Name string `json:"client_name"`
|
||||
GrantTypes []string `json:"grant_types"`
|
||||
ResponseTypes []string `json:"response_types,omitempty"`
|
||||
Scope string `json:"scope"`
|
||||
Secret *string `json:"client_secret,omitempty"`
|
||||
}
|
||||
|
||||
// Oauth2ClientCredentials represents client ID and password fetched from a Kubernetes secret
|
||||
type Oauth2ClientCredentials struct {
|
||||
ID []byte
|
||||
Password []byte
|
||||
}
|
||||
|
||||
func (oj *OAuth2ClientJSON) WithCredentials(credentials *Oauth2ClientCredentials) *OAuth2ClientJSON {
|
||||
oj.ClientID = pointer.StringPtr(string(credentials.ID))
|
||||
oj.Secret = pointer.StringPtr(string(credentials.Password))
|
||||
return oj
|
||||
}
|
||||
|
Reference in New Issue
Block a user