Documentation ¶
Index ¶
- Variables
- func GetExpire() time.Duration
- func GetID(ctx context.Context) string
- func GetIssuedAt(ctx context.Context) int64
- func GetIssuer(ctx context.Context) string
- func GetUserId(ctx context.Context) string
- func SetExpire(d time.Duration)
- type Extra
- type Option
- type Token
- func (t *Token) GetExtra() Extra
- func (t *Token) GetID() string
- func (t *Token) GetIssuedAt() int64
- func (t *Token) GetIssuer() string
- func (t *Token) GetUserId() string
- func (t *Token) IsExpired() bool
- func (t *Token) Refresh() *Token
- func (t *Token) Sign() (string, error)
- func (t *Token) SignString() string
- func (t *Token) WithContext(ctx ...context.Context) context.Context
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotParsed = fmt.Errorf("token: not parsed")
Functions ¶
func GetIssuedAt ¶
Types ¶
type Token ¶
type Token struct {
// contains filtered or unexported fields
}
func MustFromContext ¶
func (*Token) GetIssuedAt ¶
func (*Token) SignString ¶
Click to show internal directories.
Click to hide internal directories.