Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( ErrTokenExpired = errors.New("token is expired") ErrTokenNotBefore = errors.New("token cannot be used yet") ErrTokenNotIssued = errors.New("token was issued in the future") )
Block represents ValidAt constraint errors.
var (
ErrTokenInvalidID = errors.New("token is not identified with the expected ID")
)
Block represents IdentifiedBy constraint errors.
var (
ErrTokenInvalidIssuer = errors.New("token was not issued by the given issuers")
)
Block represents IssuedBy constraint errors.
var (
ErrTokenInvalidRelation = errors.New("token is not related to the expected subject")
)
Block represents RelatedTo constraint errors.
var (
ErrTokenNotPermitted = errors.New("token is not allowed to be used by this audience")
)
Block represents PermittedFor constraint errors.
Functions ¶
This section is empty.
Types ¶
type IdentifiedBy ¶
type IdentifiedBy struct {
// contains filtered or unexported fields
}
IdentifiedBy checks if audience is valid.
func NewIdentifiedBy ¶
func NewIdentifiedBy(id string) *IdentifiedBy
NewIdentifiedBy returns new instance of IdentifiedBy.
func (*IdentifiedBy) Validate ¶
func (c *IdentifiedBy) Validate(claims jwtee.RegisteredClaims) (err error)
Validate implements Constraint.
type IssuedBy ¶
type IssuedBy struct {
// contains filtered or unexported fields
}
IssuedBy checks if audience is valid.
func NewIssuedBy ¶
NewIssuedBy returns new instance of IssuedBy.
type PermittedFor ¶
type PermittedFor struct {
// contains filtered or unexported fields
}
PermittedFor checks if audience is valid.
func NewPermittedFor ¶
func NewPermittedFor(audience string) *PermittedFor
NewPermittedFor returns new instance of PermittedFor.
func (*PermittedFor) Validate ¶
func (c *PermittedFor) Validate(claims jwtee.RegisteredClaims) (err error)
Validate implements Constraint.
type RelatedTo ¶
type RelatedTo struct {
// contains filtered or unexported fields
}
RelatedTo checks if subject is valid.
func NewRelatedTo ¶
NewRelatedTo returns new instance of RelatedTo.