Documentation ¶
Index ¶
- func CreateRefreshTokenFromData(guid string, id string, t int64) []byte
- type AuthService
- func (authService *AuthService) Access(guid string, clientIP string) (string, string, time.Time, time.Time, error)
- func (authService *AuthService) CreateUser(user goproj.User) (string, error)
- func (authService *AuthService) GetUserRTokensByGUID(guid string) ([]string, error)
- func (authService *AuthService) Refresh(usrRefreshToken string, AccessToken string, clientIP string) (string, time.Time, error)
- func (authService *AuthService) UpdateUserRefreshTokens(guid string, rTokens []string) error
- type Authorization
- type Service
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AuthService ¶
type AuthService struct {
// contains filtered or unexported fields
}
func NewAuthService ¶
func NewAuthService(repo repository.Authorization) *AuthService
func (*AuthService) Access ¶
func (authService *AuthService) Access(guid string, clientIP string) (string, string, time.Time, time.Time, error)
usr token is jwt, db token is "custom" and bcrypted access is jwt, only on user
func (*AuthService) CreateUser ¶
func (authService *AuthService) CreateUser(user goproj.User) (string, error)
func (*AuthService) GetUserRTokensByGUID ¶
func (authService *AuthService) GetUserRTokensByGUID(guid string) ([]string, error)
func (*AuthService) UpdateUserRefreshTokens ¶
func (authService *AuthService) UpdateUserRefreshTokens(guid string, rTokens []string) error
type Authorization ¶
type Service ¶
type Service struct {
Authorization
}
func NewService ¶
func NewService(repo *repository.Repository) *Service
Click to show internal directories.
Click to hide internal directories.