Documentation
¶
Index ¶
- func GetMiddleware() gin.HandlerFunc
- func Register(item Authenticator) error
- type Authenticator
- type AuthenticatorRegistry
- type LocalAuthenticator
- func (a *LocalAuthenticator) AllowRegistration(register string) bool
- func (a *LocalAuthenticator) Authenticate(c *gin.Context) (*models.User, error)
- func (a *LocalAuthenticator) GenerateToken(userID string) (string, error)
- func (a *LocalAuthenticator) GetID() string
- func (a *LocalAuthenticator) HashPassword(password string) (string, error)
- func (a *LocalAuthenticator) VerifyPassword(password, hash string) error
- type OIDCAuthenticator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetMiddleware ¶
func GetMiddleware() gin.HandlerFunc
func Register ¶
func Register(item Authenticator) error
Types ¶
type Authenticator ¶
func GetAuthenticators ¶
func GetAuthenticators() []Authenticator
type AuthenticatorRegistry ¶
type AuthenticatorRegistry struct {
// contains filtered or unexported fields
}
type LocalAuthenticator ¶
type LocalAuthenticator struct {
// contains filtered or unexported fields
}
func GetLocalAuthenticator ¶
func GetLocalAuthenticator() (*LocalAuthenticator, error)
func NewLocalAuthenticator ¶
func NewLocalAuthenticator(secret string, register string) (*LocalAuthenticator, error)
func (*LocalAuthenticator) AllowRegistration ¶
func (a *LocalAuthenticator) AllowRegistration(register string) bool
func (*LocalAuthenticator) Authenticate ¶
func (*LocalAuthenticator) GenerateToken ¶
func (a *LocalAuthenticator) GenerateToken(userID string) (string, error)
func (*LocalAuthenticator) GetID ¶
func (a *LocalAuthenticator) GetID() string
func (*LocalAuthenticator) HashPassword ¶
func (a *LocalAuthenticator) HashPassword(password string) (string, error)
func (*LocalAuthenticator) VerifyPassword ¶
func (a *LocalAuthenticator) VerifyPassword(password, hash string) error
type OIDCAuthenticator ¶
type OIDCAuthenticator struct {
// contains filtered or unexported fields
}
func NewOIDCAuthenticator ¶
func NewOIDCAuthenticator(issuer, clientID string) (*OIDCAuthenticator, error)
func (*OIDCAuthenticator) Authenticate ¶
func (*OIDCAuthenticator) GetID ¶
func (a *OIDCAuthenticator) GetID() string
Click to show internal directories.
Click to hide internal directories.