authimpl

package
v0.0.0-...-e3efe30 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2026 License: AGPL-3.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const SkipRotationTime = 5 * time.Second

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, secretService secrets.Service,
	cfg *setting.Cfg, tracer tracing.Tracer, features featuremgmt.FeatureToggles,
) (*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 (*UserAuthTokenService) DeleteUserRevokedTokens

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

func (*UserAuthTokenService) FindExternalSessions

func (s *UserAuthTokenService) FindExternalSessions(ctx context.Context, query *auth.ListExternalSessionQuery) ([]*auth.ExternalSession, error)

func (*UserAuthTokenService) GetExternalSession

func (s *UserAuthTokenService) GetExternalSession(ctx context.Context, externalSessionID int64) (*auth.ExternalSession, error)

func (*UserAuthTokenService) GetTokenByExternalSessionID

func (s *UserAuthTokenService) GetTokenByExternalSessionID(ctx context.Context, externalSessionID int64) (*auth.UserToken, 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

func (*UserAuthTokenService) UpdateExternalSession

func (s *UserAuthTokenService) UpdateExternalSession(ctx context.Context, externalSessionID int64, cmd *auth.UpdateExternalSessionCommand) error

Jump to

Keyboard shortcuts

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