Move options to the provisioner.
This commit is contained in:
parent
206bc6757a
commit
ca2fb42d68
2 changed files with 9 additions and 10 deletions
|
@ -26,12 +26,13 @@ type stepPayload struct {
|
|||
// JWK is the default provisioner, an entity that can sign tokens necessary for
|
||||
// signature requests.
|
||||
type JWK struct {
|
||||
base
|
||||
Type string `json:"type"`
|
||||
Name string `json:"name"`
|
||||
Key *jose.JSONWebKey `json:"key"`
|
||||
EncryptedKey string `json:"encryptedKey,omitempty"`
|
||||
Claims *Claims `json:"claims,omitempty"`
|
||||
*base
|
||||
Type string `json:"type"`
|
||||
Name string `json:"name"`
|
||||
Key *jose.JSONWebKey `json:"key"`
|
||||
EncryptedKey string `json:"encryptedKey,omitempty"`
|
||||
Claims *Claims `json:"claims,omitempty"`
|
||||
Options *ProvisionerOptions `json:"options"`
|
||||
claimer *Claimer
|
||||
audiences Audiences
|
||||
}
|
||||
|
|
|
@ -245,7 +245,7 @@ func (l *List) UnmarshalJSON(data []byte) error {
|
|||
continue
|
||||
}
|
||||
if err := json.Unmarshal(data, p); err != nil {
|
||||
return errors.Errorf("error unmarshaling provisioner")
|
||||
return errors.Wrap(err, "error unmarshaling provisioner")
|
||||
}
|
||||
*l = append(*l, p)
|
||||
}
|
||||
|
@ -279,9 +279,7 @@ func SanitizeSSHUserPrincipal(email string) string {
|
|||
}, strings.ToLower(email))
|
||||
}
|
||||
|
||||
type base struct {
|
||||
Options *ProvisionerOptions `json:"options"`
|
||||
}
|
||||
type base struct{}
|
||||
|
||||
// AuthorizeSign returns an unimplemented error. Provisioners should overwrite
|
||||
// this method if they will support authorizing tokens for signing x509 Certificates.
|
||||
|
|
Loading…
Reference in a new issue