forked from TrueCloudLab/certificates
Update authority/provisioner/claims.go
Co-authored-by: Mariano Cano <mariano@smallstep.com>
This commit is contained in:
parent
ab0d2503ae
commit
2de7d3fcf0
1 changed files with 4 additions and 2 deletions
|
@ -38,8 +38,10 @@ type Claimer struct {
|
||||||
// NewClaimer initializes a new claimer with the given claims.
|
// NewClaimer initializes a new claimer with the given claims.
|
||||||
func NewClaimer(claims *Claims, global Claims) (*Claimer, error) {
|
func NewClaimer(claims *Claims, global Claims) (*Claimer, error) {
|
||||||
c := &Claimer{global: global, claims: claims}
|
c := &Claimer{global: global, claims: claims}
|
||||||
err := c.Validate()
|
if err := c.Validate(); err != nil {
|
||||||
return c, err
|
return nil, err
|
||||||
|
}
|
||||||
|
return c, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// Claims returns the merge of the inner and global claims.
|
// Claims returns the merge of the inner and global claims.
|
||||||
|
|
Loading…
Reference in a new issue