Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Log *slog.Logger
TokenStore tokenutil.TokenStore
CertStore certs.CertStore
Repo *repository.Store
// AdminSubjects are the subjects for which the token service allows the creation of admin api tokens
AdminSubjects []string
// Issuer to sign the JWT Token with
Issuer string
}
type TokenService ¶
type TokenService interface {
apiv2connect.TokenServiceHandler
CreateUserTokenWithoutPermissionCheck(ctx context.Context, subject string, expiration *time.Duration) (*apiv2.TokenServiceCreateResponse, error)
CreateApiTokenWithoutPermissionCheck(ctx context.Context, subject string, rq *apiv2.TokenServiceCreateRequest) (*apiv2.TokenServiceCreateResponse, error)
CreateTokenForUser(ctx context.Context, user *string, req *apiv2.TokenServiceCreateRequest) (*apiv2.TokenServiceCreateResponse, error)
}
func New ¶
func New(c Config) TokenService
Click to show internal directories.
Click to hide internal directories.