Documentation
¶
Index ¶
- Constants
- func ChangePassword(user *models.User, password string) error
- func CheckPassword(password string) error
- func DeleteSession(sid string) error
- func DeleteToken(accessToken string) error
- func Init(cf config.AuthExtraSection)
- func LogoutByUsername(username string) error
- func PostCallback(in *ssoc.CallbackOutput) error
- func PostLogin(user *models.User, loginErr error) error
- func PrepareUser(user *models.User)
- func Start() error
- func WhiteListAccess(user *models.User, remoteAddr string) error
- type Authenticator
- func (p *Authenticator) ChangePassword(user *models.User, password string) (err error)
- func (p *Authenticator) CheckPassword(password string) error
- func (p *Authenticator) DeleteSession(sid string) error
- func (p *Authenticator) DeleteToken(accessToken string) error
- func (p *Authenticator) LogoutByUsername(username string) error
- func (p *Authenticator) PostCallback(in *ssoc.CallbackOutput) error
- func (p *Authenticator) PostLogin(user *models.User, loginErr error) (err error)
- func (p *Authenticator) PrepareUser(user *models.User)
- func (p *Authenticator) Start() error
- func (p *Authenticator) Stop() error
- func (p *Authenticator) WhiteListAccess(user *models.User, remoteAddr string) error
Constants ¶
View Source
const (
ChangePasswordURL = "/change-password"
)
Variables ¶
This section is empty.
Functions ¶
func CheckPassword ¶
func DeleteSession ¶
func DeleteToken ¶
func Init ¶
func Init(cf config.AuthExtraSection)
func LogoutByUsername ¶
func PostCallback ¶
func PostCallback(in *ssoc.CallbackOutput) error
func PrepareUser ¶
Types ¶
type Authenticator ¶
type Authenticator struct {
// contains filtered or unexported fields
}
func New ¶
func New(cf config.AuthExtraSection) *Authenticator
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
Click to show internal directories.
Click to hide internal directories.