Documentation
¶
Index ¶
- func NewAuthService(repo storage.AuthRepository, userRepo storage.UserRepository, ...) service.AuthService
- func NewDummyAuthService(repo storage.UserRepository) service.AuthService
- type AuthDummyService
- func (s *AuthDummyService) ClientTokenCallback(_ context.Context, _ *entities.LoginCallback) (*entities.ClientToken, error)
- func (s *AuthDummyService) GetAll(ctx context.Context) ([]*entities.User, error)
- func (s *AuthDummyService) GetAllByRole(ctx context.Context, role entities.UserRole) ([]*entities.User, error)
- func (s *AuthDummyService) GetByIDs(ctx context.Context, ids []string) ([]*entities.User, error)
- func (s *AuthDummyService) LoginRequest(ctx context.Context, loginRequest *entities.LoginRequest) *entities.LoginResp
- func (s *AuthDummyService) LogoutRequest(_ context.Context, _ *entities.Logout) error
- func (s *AuthDummyService) Ready() bool
- func (s *AuthDummyService) RefreshToken(_ context.Context, _ string) (*entities.ClientToken, error)
- func (s *AuthDummyService) Register(_ context.Context, _ *entities.RegisterUser) (*entities.User, error)
- func (s *AuthDummyService) RetrospectToken(_ context.Context, _ string) (*entities.IntroSpectTokenResult, error)
- type AuthService
- func (s *AuthService) ClientTokenCallback(ctx context.Context, loginCallback *domain.LoginCallback) (*domain.ClientToken, error)
- func (s *AuthService) GetAll(ctx context.Context) ([]*domain.User, error)
- func (s *AuthService) GetAllByRole(ctx context.Context, role domain.UserRole) ([]*domain.User, error)
- func (s *AuthService) GetByIDs(ctx context.Context, ids []string) ([]*domain.User, error)
- func (s *AuthService) LoginRequest(ctx context.Context, loginRequest *domain.LoginRequest) *domain.LoginResp
- func (s *AuthService) LogoutRequest(ctx context.Context, logoutRequest *domain.Logout) error
- func (s *AuthService) Ready() bool
- func (s *AuthService) RefreshToken(ctx context.Context, token string) (*domain.ClientToken, error)
- func (s *AuthService) Register(ctx context.Context, user *domain.RegisterUser) (*domain.User, error)
- func (s *AuthService) RetrospectToken(ctx context.Context, token string) (*domain.IntroSpectTokenResult, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAuthService ¶
func NewAuthService(repo storage.AuthRepository, userRepo storage.UserRepository, cfg *config.IdentityAuthConfig) service.AuthService
func NewDummyAuthService ¶
func NewDummyAuthService(repo storage.UserRepository) service.AuthService
Types ¶
type AuthDummyService ¶
type AuthDummyService struct {
// contains filtered or unexported fields
}
AuthDummyService is used to disable the auth service by configuration
func (*AuthDummyService) ClientTokenCallback ¶
func (s *AuthDummyService) ClientTokenCallback(_ context.Context, _ *entities.LoginCallback) (*entities.ClientToken, error)
func (*AuthDummyService) GetAllByRole ¶
func (*AuthDummyService) LoginRequest ¶
func (s *AuthDummyService) LoginRequest(ctx context.Context, loginRequest *entities.LoginRequest) *entities.LoginResp
func (*AuthDummyService) LogoutRequest ¶
func (*AuthDummyService) Ready ¶
func (s *AuthDummyService) Ready() bool
func (*AuthDummyService) RefreshToken ¶
func (s *AuthDummyService) RefreshToken(_ context.Context, _ string) (*entities.ClientToken, error)
func (*AuthDummyService) Register ¶
func (s *AuthDummyService) Register(_ context.Context, _ *entities.RegisterUser) (*entities.User, error)
func (*AuthDummyService) RetrospectToken ¶
func (s *AuthDummyService) RetrospectToken(_ context.Context, _ string) (*entities.IntroSpectTokenResult, error)
type AuthService ¶
type AuthService struct {
// contains filtered or unexported fields
}
func (*AuthService) ClientTokenCallback ¶
func (s *AuthService) ClientTokenCallback(ctx context.Context, loginCallback *domain.LoginCallback) (*domain.ClientToken, error)
func (*AuthService) GetAllByRole ¶
func (*AuthService) LoginRequest ¶
func (s *AuthService) LoginRequest(ctx context.Context, loginRequest *domain.LoginRequest) *domain.LoginResp
func (*AuthService) LogoutRequest ¶
func (*AuthService) Ready ¶
func (s *AuthService) Ready() bool
func (*AuthService) RefreshToken ¶
func (s *AuthService) RefreshToken(ctx context.Context, token string) (*domain.ClientToken, error)
func (*AuthService) Register ¶
func (s *AuthService) Register(ctx context.Context, user *domain.RegisterUser) (*domain.User, error)
func (*AuthService) RetrospectToken ¶
func (s *AuthService) RetrospectToken(ctx context.Context, token string) (*domain.IntroSpectTokenResult, error)
Click to show internal directories.
Click to hide internal directories.