Documentation ¶
Index ¶
- type FakeUserAuthTokenService
- func (s *FakeUserAuthTokenService) ActiveTokenCount() (int64, error)
- func (s *FakeUserAuthTokenService) CreateToken(userId int64, clientIP, userAgent string) (*models.UserToken, error)
- func (s *FakeUserAuthTokenService) GetUserToken(userId, userTokenId int64) (*models.UserToken, error)
- func (s *FakeUserAuthTokenService) GetUserTokens(userId int64) ([]*models.UserToken, error)
- func (s *FakeUserAuthTokenService) LookupToken(unhashedToken string) (*models.UserToken, error)
- func (s *FakeUserAuthTokenService) RevokeAllUserTokens(userId int64) error
- func (s *FakeUserAuthTokenService) RevokeToken(token *models.UserToken) error
- func (s *FakeUserAuthTokenService) TryRotateToken(token *models.UserToken, clientIP, userAgent string) (bool, error)
- type UserAuthTokenService
- func (s *UserAuthTokenService) ActiveTokenCount() (int64, error)
- func (s *UserAuthTokenService) CreateToken(userId int64, clientIP, userAgent string) (*models.UserToken, error)
- func (s *UserAuthTokenService) GetUserToken(userId, userTokenId int64) (*models.UserToken, error)
- func (s *UserAuthTokenService) GetUserTokens(userId int64) ([]*models.UserToken, error)
- func (s *UserAuthTokenService) Init() error
- func (s *UserAuthTokenService) LookupToken(unhashedToken string) (*models.UserToken, error)
- func (s *UserAuthTokenService) RevokeAllUserTokens(userId int64) error
- func (s *UserAuthTokenService) RevokeToken(token *models.UserToken) error
- func (srv *UserAuthTokenService) Run(ctx context.Context) error
- func (s *UserAuthTokenService) TryRotateToken(token *models.UserToken, clientIP, userAgent string) (bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FakeUserAuthTokenService ¶
type FakeUserAuthTokenService struct { CreateTokenProvider func(userId int64, clientIP, userAgent string) (*models.UserToken, error) TryRotateTokenProvider func(token *models.UserToken, clientIP, userAgent string) (bool, error) LookupTokenProvider func(unhashedToken string) (*models.UserToken, error) RevokeTokenProvider func(token *models.UserToken) error RevokeAllUserTokensProvider func(userId int64) error ActiveAuthTokenCount func() (int64, error) GetUserTokenProvider func(userId, userTokenId int64) (*models.UserToken, error) GetUserTokensProvider func(userId int64) ([]*models.UserToken, error) }
func NewFakeUserAuthTokenService ¶
func NewFakeUserAuthTokenService() *FakeUserAuthTokenService
func (*FakeUserAuthTokenService) ActiveTokenCount ¶
func (s *FakeUserAuthTokenService) ActiveTokenCount() (int64, error)
func (*FakeUserAuthTokenService) CreateToken ¶
func (*FakeUserAuthTokenService) GetUserToken ¶
func (s *FakeUserAuthTokenService) GetUserToken(userId, userTokenId int64) (*models.UserToken, error)
func (*FakeUserAuthTokenService) GetUserTokens ¶
func (s *FakeUserAuthTokenService) GetUserTokens(userId int64) ([]*models.UserToken, error)
func (*FakeUserAuthTokenService) LookupToken ¶
func (s *FakeUserAuthTokenService) LookupToken(unhashedToken string) (*models.UserToken, error)
func (*FakeUserAuthTokenService) RevokeAllUserTokens ¶
func (s *FakeUserAuthTokenService) RevokeAllUserTokens(userId int64) error
func (*FakeUserAuthTokenService) RevokeToken ¶
func (s *FakeUserAuthTokenService) RevokeToken(token *models.UserToken) error
func (*FakeUserAuthTokenService) TryRotateToken ¶
type UserAuthTokenService ¶
type UserAuthTokenService struct { SQLStore *sqlstore.SqlStore `inject:""` ServerLockService *serverlock.ServerLockService `inject:""` Cfg *setting.Cfg `inject:""` // contains filtered or unexported fields }
func (*UserAuthTokenService) ActiveTokenCount ¶
func (s *UserAuthTokenService) ActiveTokenCount() (int64, error)
func (*UserAuthTokenService) CreateToken ¶
func (*UserAuthTokenService) GetUserToken ¶
func (s *UserAuthTokenService) GetUserToken(userId, userTokenId int64) (*models.UserToken, error)
func (*UserAuthTokenService) GetUserTokens ¶
func (s *UserAuthTokenService) GetUserTokens(userId int64) ([]*models.UserToken, error)
func (*UserAuthTokenService) Init ¶
func (s *UserAuthTokenService) Init() error
func (*UserAuthTokenService) LookupToken ¶
func (s *UserAuthTokenService) LookupToken(unhashedToken string) (*models.UserToken, error)
func (*UserAuthTokenService) RevokeAllUserTokens ¶
func (s *UserAuthTokenService) RevokeAllUserTokens(userId int64) error
func (*UserAuthTokenService) RevokeToken ¶
func (s *UserAuthTokenService) RevokeToken(token *models.UserToken) error
func (*UserAuthTokenService) TryRotateToken ¶
Click to show internal directories.
Click to hide internal directories.