Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthService ¶
type AuthService struct {
// contains filtered or unexported fields
}
AuthService represents underlying authentication implementation
func NewService ¶
func NewService(config config.AuthConfig, jwtGen jwt.JwtGen) *AuthService
NewService creates a new authentication service with provided configuration
func (*AuthService) Authenticate ¶
Authenticate decodes token and returns user id expiry time and error if any
func (*AuthService) GenerateRefreshToken ¶
func (svc *AuthService) GenerateRefreshToken(userID string) (string, error)
GenerateRefreshToken generates a refresh token for a provided user id
func (*AuthService) GenerateToken ¶
func (svc *AuthService) GenerateToken(userID string) (string, error)
GenerateToken generates an access token for a provided user id
Click to show internal directories.
Click to hide internal directories.