Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HashPassword ¶
func ValidatePassword ¶
func ValidatePasswordCorrect ¶
Types ¶
type AuthMiddleware ¶
type AuthMiddleware struct {
// contains filtered or unexported fields
}
func NewAuthMiddleware ¶
func NewAuthMiddleware(db Store, auth *AuthService) *AuthMiddleware
type AuthService ¶
type AuthService struct {
// contains filtered or unexported fields
}
func NewAuthService ¶
func NewAuthService(secretKey string) *AuthService
func (*AuthService) GenerateTokens ¶
func (a *AuthService) GenerateTokens(uuid string) (*user.AuthTokens, error)
func (*AuthService) GetTokenAuth ¶
func (a *AuthService) GetTokenAuth() *jwtauth.JWTAuth
func (*AuthService) ParseAccessToken ¶
func (a *AuthService) ParseAccessToken(accessToken string) (*uuid.UUID, error)
func (*AuthService) ParseRefreshToken ¶
func (a *AuthService) ParseRefreshToken(refreshToken string) (*uuid.UUID, error)
Click to show internal directories.
Click to hide internal directories.