Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Auth ¶
type Auth interface {
// CreateAccessToken create a new token.
// The identity of this token, which can be any data that is json serializable.
CreateAccessToken(identity interface{}, fresh bool) (string, error)
// CreateRefreshToken create a new refresh token.
// The identity of this token, which can be any data that is json serializable.
CreateRefreshToken(identity interface{}) (string, error)
// ParseToken parse a token.
ParseToken(token string) (Claims, error)
}
Auth is the interface for authentication.
type Claims ¶
type Claims interface {
// GetIdentity return the identity of this token, which can be any data that is json serializable.
GetIdentity() interface{}
// HasExpired returns true if the claims have expired.
HasExpired() bool
}
Claims is the interface for all the claims that can be made by the auth package.
Click to show internal directories.
Click to hide internal directories.