Skip to content

Commit

Permalink
config: ensure yaml/json struct tag for auth 'Issuer' field are the same
Browse files Browse the repository at this point in the history
Signed-off-by: Alec Merdler <alecmerdler@gmail.com>
  • Loading branch information
alecmerdler committed Oct 2, 2020
1 parent 2c54a82 commit 5aba727
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions config/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,13 @@ func (a *AuthKeyserver) UnmarshalYAML(f func(interface{}) error) error {
// The "Issuer" key is what the service expects to verify as the "issuer" claim.
type AuthPSK struct {
Key []byte `yaml:"key" json:"key"`
Issuer []string `yaml:"iss" json:"issuer"`
Issuer []string `yaml:"iss" json:"iss"`
}

// UnmarshalYAML implements yaml.Unmarshaler.
func (a *AuthPSK) UnmarshalYAML(f func(interface{}) error) error {
var m struct {
Issuer []string `yaml:"iss" json:"issuer"`
Issuer []string `yaml:"iss" json:"iss"`
Key string `yaml:"key" json:"key"`
}
if err := f(&m); err != nil {
Expand Down

0 comments on commit 5aba727

Please sign in to comment.