Documentation
¶
Index ¶
- Variables
- func CheckPasswordHash(password, hash string) bool
- func GenerateAccessToken(id, role string) (string, error)
- func GenerateRefreshToken(id string) (string, error)
- func HashPassword(password string) (string, error)
- func ValidateToken(tokenString string) (*models.Claims, error)
- type AuthenticationService
- func (u *AuthenticationService) ActivateUser(userID *uuid.UUID) error
- func (u *AuthenticationService) ChangePassword(user *models.User) error
- func (u *AuthenticationService) DeactivateUser(userID *uuid.UUID) error
- func (u *AuthenticationService) DeleteUser(user *models.User) error
- func (u *AuthenticationService) GetUserById(user *models.User) error
- func (u *AuthenticationService) GetUserProfile(user *models.User) error
- func (u *AuthenticationService) GetUsers(users *[]models.User) error
- func (u *AuthenticationService) LoginUser(user *models.User) (string, string, error)
- func (u *AuthenticationService) Logout(token string) error
- func (u *AuthenticationService) PromoteUserToAdmin(userID *uuid.UUID) error
- func (u *AuthenticationService) RefreshToken(refreshToken string) (string, error)
- func (u *AuthenticationService) RegisterUser(user *models.User) error
- func (u *AuthenticationService) UpdateUserById(user *models.User) error
- func (u *AuthenticationService) UpdateUserProfile(user *models.User) error
Constants ¶
This section is empty.
Variables ¶
View Source
var JwtSecret = []byte(os.Getenv("JWT_SECRET_KEY"))
Functions ¶
func CheckPasswordHash ¶
func GenerateAccessToken ¶
func GenerateRefreshToken ¶
func HashPassword ¶
Types ¶
type AuthenticationService ¶
type AuthenticationService struct {
// contains filtered or unexported fields
}
func NewAuthenticationService ¶
func NewAuthenticationService() *AuthenticationService
func (*AuthenticationService) ActivateUser ¶
func (u *AuthenticationService) ActivateUser(userID *uuid.UUID) error
func (*AuthenticationService) ChangePassword ¶
func (u *AuthenticationService) ChangePassword(user *models.User) error
func (*AuthenticationService) DeactivateUser ¶
func (u *AuthenticationService) DeactivateUser(userID *uuid.UUID) error
func (*AuthenticationService) DeleteUser ¶
func (u *AuthenticationService) DeleteUser(user *models.User) error
func (*AuthenticationService) GetUserById ¶
func (u *AuthenticationService) GetUserById(user *models.User) error
func (*AuthenticationService) GetUserProfile ¶
func (u *AuthenticationService) GetUserProfile(user *models.User) error
func (*AuthenticationService) GetUsers ¶
func (u *AuthenticationService) GetUsers(users *[]models.User) error
func (*AuthenticationService) Logout ¶
func (u *AuthenticationService) Logout(token string) error
func (*AuthenticationService) PromoteUserToAdmin ¶
func (u *AuthenticationService) PromoteUserToAdmin(userID *uuid.UUID) error
func (*AuthenticationService) RefreshToken ¶
func (u *AuthenticationService) RefreshToken(refreshToken string) (string, error)
func (*AuthenticationService) RegisterUser ¶
func (u *AuthenticationService) RegisterUser(user *models.User) error
func (*AuthenticationService) UpdateUserById ¶
func (u *AuthenticationService) UpdateUserById(user *models.User) error
func (*AuthenticationService) UpdateUserProfile ¶
func (u *AuthenticationService) UpdateUserProfile(user *models.User) error
Click to show internal directories.
Click to hide internal directories.