|
|
@ -38,10 +38,8 @@ 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}
|
|
|
|
if err := c.Validate(); err != nil {
|
|
|
|
err := c.Validate()
|
|
|
|
return nil, err
|
|
|
|
return c, err
|
|
|
|
}
|
|
|
|
|
|
|
|
return c, nil
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Claims returns the merge of the inner and global claims.
|
|
|
|
// Claims returns the merge of the inner and global claims.
|
|
|
|