diff --git a/authority/provisioner/claims.go b/authority/provisioner/claims.go index b6a5a81e..4c99ee06 100644 --- a/authority/provisioner/claims.go +++ b/authority/provisioner/claims.go @@ -38,8 +38,10 @@ type Claimer struct { // NewClaimer initializes a new claimer with the given claims. func NewClaimer(claims *Claims, global Claims) (*Claimer, error) { c := &Claimer{global: global, claims: claims} - err := c.Validate() - return c, err + if err := c.Validate(); err != nil { + return nil, err + } + return c, nil } // Claims returns the merge of the inner and global claims.