authimpl

package
v11.1.4-modfix Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2024 License: AGPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type UserAuthTokenService

type UserAuthTokenService struct {
	// contains filtered or unexported fields
}

func ProvideUserAuthTokenService

func ProvideUserAuthTokenService(sqlStore db.DB,
	serverLockService *serverlock.ServerLockService,
	quotaService quota.Service,
	cfg *setting.Cfg) (*UserAuthTokenService, error)

func (*UserAuthTokenService) ActiveTokenCount

func (s *UserAuthTokenService) ActiveTokenCount(ctx context.Context, userID *int64) (int64, error)

ActiveTokenCount returns the number of active tokens. If userID is nil, the count is for all users.

func (*UserAuthTokenService) BatchRevokeAllUserTokens

func (s *UserAuthTokenService) BatchRevokeAllUserTokens(ctx context.Context, userIds []int64) error

func (*UserAuthTokenService) CreateToken

func (s *UserAuthTokenService) CreateToken(ctx context.Context, user *user.User, clientIP net.IP, userAgent string) (*auth.UserToken, error)

func (*UserAuthTokenService) DeleteUserRevokedTokens

func (s *UserAuthTokenService) DeleteUserRevokedTokens(ctx context.Context, userID int64, window time.Duration) error

func (*UserAuthTokenService) GetUserRevokedTokens

func (s *UserAuthTokenService) GetUserRevokedTokens(ctx context.Context, userId int64) ([]*auth.UserToken, error)

func (*UserAuthTokenService) GetUserToken

func (s *UserAuthTokenService) GetUserToken(ctx context.Context, userId, userTokenId int64) (*auth.UserToken, error)

func (*UserAuthTokenService) GetUserTokens

func (s *UserAuthTokenService) GetUserTokens(ctx context.Context, userId int64) ([]*auth.UserToken, error)

func (*UserAuthTokenService) LookupToken

func (s *UserAuthTokenService) LookupToken(ctx context.Context, unhashedToken string) (*auth.UserToken, error)

func (*UserAuthTokenService) RevokeAllUserTokens

func (s *UserAuthTokenService) RevokeAllUserTokens(ctx context.Context, userId int64) error

func (*UserAuthTokenService) RevokeToken

func (s *UserAuthTokenService) RevokeToken(ctx context.Context, token *auth.UserToken, soft bool) error

func (*UserAuthTokenService) RotateToken

func (*UserAuthTokenService) Run

Jump to

Keyboard shortcuts

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