Documentation ¶
Index ¶
Constants ¶
View Source
const ( ClaimSubject = "sub" ClaimIssuer = "iss" ClaimIssued = "iat" ClaimExpiry = "exp" ClaimID = "jti" ClaimScopeDomain = "github.com/dicot-project/scope/domain" ClaimScopeProject = "github.com/dicot-project/scope/project" Issuer = "github.com/dicot-project/api" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Token ¶
type Token struct { ID string Issued time.Time Expiry time.Time Subject TokenSubject Scope TokenScope }
type TokenManager ¶
type TokenManager interface { NewToken() *Token SignToken(tok *Token) (string, error) ValidateToken(toksig string) (*Token, error) }
func NewTokenManager ¶
func NewTokenManager(keys []interface{}, lifetime time.Duration, cl identity.Interface) TokenManager
func NewTokenManagerFromPEM ¶
type TokenScope ¶
type TokenSubject ¶
Click to show internal directories.
Click to hide internal directories.