auth

package
v4.0.4 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2021 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ChangePasswordURL = "/change-password"
)

Variables

This section is empty.

Functions

func ChangePassword

func ChangePassword(user *models.User, password string) error

func CheckPassword

func CheckPassword(password string) error

func DeleteSession

func DeleteSession(sid string) error

func DeleteToken

func DeleteToken(accessToken string) error

func Init

func Init(cf config.AuthExtraSection)

func LogoutByUsername

func LogoutByUsername(username string) error

func PostCallback

func PostCallback(in *ssoc.CallbackOutput) error

func PostLogin

func PostLogin(user *models.User, loginErr error) error

PostLogin check user status after login

func PrepareUser

func PrepareUser(user *models.User)

func Start

func Start() error

func WhiteListAccess

func WhiteListAccess(user *models.User, remoteAddr string) error

Types

type Authenticator

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

func New

description:"enable user expire control, active -> frozen -> writen-off"

func (*Authenticator) ChangePassword

func (p *Authenticator) ChangePassword(user *models.User, password string) (err error)

func (*Authenticator) CheckPassword

func (p *Authenticator) CheckPassword(password string) error

func (*Authenticator) DeleteSession

func (p *Authenticator) DeleteSession(sid string) error

func (*Authenticator) DeleteToken

func (p *Authenticator) DeleteToken(accessToken string) error

func (*Authenticator) LogoutByUsername

func (p *Authenticator) LogoutByUsername(username string) error

LogoutByUsername

func (*Authenticator) PostCallback

func (p *Authenticator) PostCallback(in *ssoc.CallbackOutput) error

PostCallback between sso.Callback() and sessionLogin()

func (*Authenticator) PostLogin

func (p *Authenticator) PostLogin(user *models.User, loginErr error) (err error)

func (*Authenticator) PrepareUser

func (p *Authenticator) PrepareUser(user *models.User)

func (*Authenticator) Start

func (p *Authenticator) Start() error

func (*Authenticator) Stop

func (p *Authenticator) Stop() error

func (*Authenticator) WhiteListAccess

func (p *Authenticator) WhiteListAccess(user *models.User, remoteAddr string) error

Jump to

Keyboard shortcuts

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