Documentation ¶
Index ¶
Constants ¶
View Source
const ( NeverExpire = "never" ExpiresAtFormat = "2006-01-02" )
View Source
const ClaimsIssuer = "horizon"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClaimsOption ¶
type ClaimsOption func(*Claims)
func WithPipelinerunID ¶
func WithPipelinerunID(pipelinerunID uint) ClaimsOption
type Service ¶
type Service interface { // CreateAccessToken used for personal access Token and resource access Token CreateAccessToken(ctx context.Context, name, expiresAtStr string, userID uint, scopes []string) (*tokenmodels.Token, error) CreateJWTToken(subject string, expiresIn time.Duration, options ...ClaimsOption) (string, error) ParseJWTToken(tokenStr string) (Claims, error) }
func NewService ¶
func NewService(manager *managerparam.Manager, config tokenconfig.Config) Service
Click to show internal directories.
Click to hide internal directories.