Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Authenticator ¶
type Authenticator struct {
// contains filtered or unexported fields
}
Authenticator uses Unkey to authenticate API keys.
func NewAuthenticator ¶
func NewAuthenticator(apiID string, rootKey string, u *url.URL) Authenticator
NewAuthenticator returns a new Authenticator.
func (Authenticator) AuthenticatePassword ¶
func (a Authenticator) AuthenticatePassword(ctx context.Context, username string, password string) (auth.Subject, error)
AuthenticatePassword implements the auth.PasswordAuthenticator interface.
func (Authenticator) GetSubjectByID ¶
type Config ¶
type Config struct { APIID string `mapstructure:"apiId"` RootKey string `mapstructure:"rootKey"` URL string `mapstructure:"url"` }
Config implements the PasswordAuthenticatorFactory interface defined by Portward.
func (Config) New ¶
func (c Config) New() (auth.PasswordAuthenticator, error)
New returns a new Authenticator from the configuration.
Click to show internal directories.
Click to hide internal directories.