Documentation ¶
Index ¶
- func RegisterAccessTokenIssuerFactory(name string, factory func() AccessTokenIssuerFactory)
- func RegisterAuthorizerFactory(name string, factory func() AuthorizerFactory)
- func RegisterPasswordAuthenticatorFactory(name string, factory func() PasswordAuthenticatorFactory)
- func RegisterRefreshTokenIssuerFactory(name string, factory func() RefreshTokenIssuerFactory)
- type AccessTokenIssuer
- type AccessTokenIssuerFactory
- type Authorizer
- type AuthorizerFactory
- type Config
- type Factory
- type PasswordAuthenticator
- type PasswordAuthenticatorFactory
- type RefreshTokenIssuer
- type RefreshTokenIssuerFactory
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterAccessTokenIssuerFactory ¶
func RegisterAccessTokenIssuerFactory(name string, factory func() AccessTokenIssuerFactory)
RegisterAccessTokenIssuerFactory makes a AccessTokenIssuerFactory available by the provided name in configuration.
If RegisterAccessTokenIssuerFactory is called twice with the same name or if factory is nil, it panics.
func RegisterAuthorizerFactory ¶
func RegisterAuthorizerFactory(name string, factory func() AuthorizerFactory)
RegisterAuthorizerFactory makes a AuthorizerFactory available by the provided name in configuration.
If RegisterAuthorizerFactory is called twice with the same name or if factory is nil, it panics.
func RegisterPasswordAuthenticatorFactory ¶
func RegisterPasswordAuthenticatorFactory(name string, factory func() PasswordAuthenticatorFactory)
RegisterPasswordAuthenticatorFactory makes a PasswordAuthenticatorFactory available by the provided name in configuration.
If RegisterPasswordAuthenticatorFactory is called twice with the same name or if factory is nil, it panics.
func RegisterRefreshTokenIssuerFactory ¶
func RegisterRefreshTokenIssuerFactory(name string, factory func() RefreshTokenIssuerFactory)
RegisterRefreshTokenIssuerFactory makes a RefreshTokenIssuerFactory available by the provided name in configuration.
If RegisterRefreshTokenIssuerFactory is called twice with the same name or if factory is nil, it panics.
Types ¶
type AccessTokenIssuer ¶
type AccessTokenIssuer struct {
AccessTokenIssuerFactory
}
AccessTokenIssuer is the configuration for an auth.AccessTokenIssuer.
func (*AccessTokenIssuer) UnmarshalYAML ¶
func (c *AccessTokenIssuer) UnmarshalYAML(value *yaml.Node) error
type AccessTokenIssuerFactory ¶
type AccessTokenIssuerFactory = Factory[auth.AccessTokenIssuer]
AccessTokenIssuerFactory creates a new auth.AccessTokenIssuer.
type Authorizer ¶
type Authorizer struct {
AuthorizerFactory
}
Authorizer is the configuration for an auth.Authorizer.
func (*Authorizer) UnmarshalYAML ¶
func (c *Authorizer) UnmarshalYAML(value *yaml.Node) error
type AuthorizerFactory ¶
type AuthorizerFactory = Factory[auth.Authorizer]
AuthorizerFactory creates a new auth.Authorizer.
type Config ¶
type Config struct { PasswordAuthenticator PasswordAuthenticator `yaml:"passwordAuthenticator"` AccessTokenIssuer AccessTokenIssuer `yaml:"accessTokenIssuer"` RefreshTokenIssuer RefreshTokenIssuer `yaml:"refreshTokenIssuer"` Authorizer Authorizer `yaml:"authorizer"` }
Config collects all configuration options.
type Factory ¶
Factory is a stateful factory holding the necessary information to validate and construct T.
type PasswordAuthenticator ¶
type PasswordAuthenticator struct {
PasswordAuthenticatorFactory
}
PasswordAuthenticator is the configuration for an auth.PasswordAuthenticator.
func (*PasswordAuthenticator) UnmarshalYAML ¶
func (c *PasswordAuthenticator) UnmarshalYAML(value *yaml.Node) error
type PasswordAuthenticatorFactory ¶
type PasswordAuthenticatorFactory = Factory[auth.PasswordAuthenticator]
PasswordAuthenticatorFactory creates a new auth.PasswordAuthenticator.
type RefreshTokenIssuer ¶
type RefreshTokenIssuer struct {
RefreshTokenIssuerFactory
}
RefreshTokenIssuer is the configuration for an auth.RefreshTokenIssuer.
func (*RefreshTokenIssuer) UnmarshalYAML ¶
func (c *RefreshTokenIssuer) UnmarshalYAML(value *yaml.Node) error
type RefreshTokenIssuerFactory ¶
type RefreshTokenIssuerFactory = Factory[auth.RefreshTokenIssuer]
RefreshTokenIssuerFactory creates a new auth.RefreshTokenIssuer.