auth

package
v6.1.2+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 8, 2019 License: Apache-2.0 Imports: 12 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

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 (s *FakeUserAuthTokenService) CreateToken(userId int64, clientIP, userAgent string) (*models.UserToken, error)

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

func (s *FakeUserAuthTokenService) TryRotateToken(token *models.UserToken, clientIP, userAgent string) (bool, error)

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 (s *UserAuthTokenService) CreateToken(userId int64, clientIP, userAgent string) (*models.UserToken, error)

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) Run

func (srv *UserAuthTokenService) Run(ctx context.Context) error

func (*UserAuthTokenService) TryRotateToken

func (s *UserAuthTokenService) TryRotateToken(token *models.UserToken, clientIP, userAgent string) (bool, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL