Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccessTokenIssuer ¶
type AccessTokenIssuer struct {
// contains filtered or unexported fields
}
AccessTokenIssuer issues access tokens according to the Token Authentication Specification and Token Authentication Implementation.
func NewAccessTokenIssuer ¶
func NewAccessTokenIssuer(issuer string, signingKey libtrust.PrivateKey, expiration time.Duration, opts ...AccessTokenIssuerOption) AccessTokenIssuer
NewAccessTokenIssuer returns a new AccessTokenIssuer.
func (AccessTokenIssuer) IssueAccessToken ¶
type AccessTokenIssuerOption ¶
type AccessTokenIssuerOption interface {
// contains filtered or unexported methods
}
AccessTokenIssuerOption configures a AccessTokenIssuer.
func WithIDGenerator ¶
func WithIDGenerator(idGenerator IDGenerator) AccessTokenIssuerOption
WIthIDGenerator configures a token issuer to use an IDGenerator.
type IDGenerator ¶
IDGenerator generates a random ID.
type Option ¶
type Option interface { AccessTokenIssuerOption RefreshTokenIssuerOption }
Option configures a token issuer.
type RefreshTokenIssuer ¶
type RefreshTokenIssuer struct {
// contains filtered or unexported fields
}
RefreshTokenIssuer issues a refresh token.
func NewRefreshTokenIssuer ¶
func NewRefreshTokenIssuer(issuer string, signingKey libtrust.PrivateKey, opts ...RefreshTokenIssuerOption) RefreshTokenIssuer
NewRefreshTokenIssuer returns a new RefreshTokenIssuer.
func (RefreshTokenIssuer) IssueRefreshToken ¶
func (i RefreshTokenIssuer) IssueRefreshToken(_ context.Context, service string, subject auth.Subject) (string, error)
IssueRefreshToken implements auth.RefreshTokenIssuer.
func (RefreshTokenIssuer) VerifyRefreshToken ¶
func (i RefreshTokenIssuer) VerifyRefreshToken(_ context.Context, service string, refreshToken string) (auth.SubjectID, error)
VerifyRefreshToken implements authn.RefreshTokenVerifier.
type RefreshTokenIssuerOption ¶
type RefreshTokenIssuerOption interface {
// contains filtered or unexported methods
}
RefreshTokenIssuerOption configures a RefreshTokenIssuer.