auth

package
v6.0.0-beta1+incompatible Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2019 License: Apache-2.0 Imports: 15 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

View Source
var (
	ErrAuthTokenNotFound = errors.New("User auth token not found")
)

Typed errors

View Source
var (
	UrgentRotateTime = 1 * time.Minute
)

Functions

This section is empty.

Types

type UserAuthTokenService

type UserAuthTokenService interface {
	InitContextWithToken(ctx *models.ReqContext, orgID int64) bool
	UserAuthenticatedHook(user *models.User, c *models.ReqContext) error
	UserSignedOutHook(c *models.ReqContext)
}

UserAuthTokenService are used for generating and validating user auth tokens

type UserAuthTokenServiceImpl

type UserAuthTokenServiceImpl struct {
	SQLStore          *sqlstore.SqlStore            `inject:""`
	ServerLockService *serverlock.ServerLockService `inject:""`
	Cfg               *setting.Cfg                  `inject:""`
	// contains filtered or unexported fields
}

func (*UserAuthTokenServiceImpl) CreateToken

func (s *UserAuthTokenServiceImpl) CreateToken(userId int64, clientIP, userAgent string) (*userAuthToken, error)

func (*UserAuthTokenServiceImpl) Init

func (s *UserAuthTokenServiceImpl) Init() error

Init this service

func (*UserAuthTokenServiceImpl) InitContextWithToken

func (s *UserAuthTokenServiceImpl) InitContextWithToken(ctx *models.ReqContext, orgID int64) bool

func (*UserAuthTokenServiceImpl) LookupToken

func (s *UserAuthTokenServiceImpl) LookupToken(unhashedToken string) (*userAuthToken, error)

func (*UserAuthTokenServiceImpl) RefreshToken

func (s *UserAuthTokenServiceImpl) RefreshToken(token *userAuthToken, clientIP, userAgent string) (bool, error)

func (*UserAuthTokenServiceImpl) Run

func (*UserAuthTokenServiceImpl) UserAuthenticatedHook

func (s *UserAuthTokenServiceImpl) UserAuthenticatedHook(user *models.User, c *models.ReqContext) error

func (*UserAuthTokenServiceImpl) UserSignedOutHook

func (s *UserAuthTokenServiceImpl) UserSignedOutHook(c *models.ReqContext)

Jump to

Keyboard shortcuts

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