auth

package
v0.0.0-...-46baba5 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: AGPL-3.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessType

type AccessType int
const (
	AdminOnly AccessType = iota
	AnyUser
)

type Authenticator

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

func NewAuthenticator

func NewAuthenticator(webSessions websessions.Service, users users.Service, html html.Writer) *Authenticator

func (*Authenticator) GetUserAndSession

func (a *Authenticator) GetUserAndSession(w http.ResponseWriter, r *http.Request, access AccessType) (*users.User, *websessions.Session, bool)

func (*Authenticator) Logout

func (a *Authenticator) Logout(w http.ResponseWriter, r *http.Request)

type ConsentPage

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

func NewConsentPage

func NewConsentPage(
	html html.Writer,
	auth *Authenticator,
	clients oauthclients.Service,
	oauthConsent oauthconsents.Service,
	tools tools.Tools,
) *ConsentPage

func (*ConsentPage) Register

func (h *ConsentPage) Register(r chi.Router, mids *router.Middlewares)

type LoginPage

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

func NewLoginPage

func NewLoginPage(
	html html.Writer,
	webSessions websessions.Service,
	users users.Service,
	clients oauthclients.Service,
	tools tools.Tools,
) *LoginPage

func (*LoginPage) Register

func (h *LoginPage) Register(r chi.Router, mids *router.Middlewares)

type MasterAskPasswordPage

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

func NewAskMasterPasswordPage

func NewAskMasterPasswordPage(html html.Writer, masterkey masterkey.Service) *MasterAskPasswordPage

func (*MasterAskPasswordPage) Register

func (h *MasterAskPasswordPage) Register(r chi.Router, mids *router.Middlewares)

type MasterRegisterPasswordPage

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

func NewRegisterMasterPasswordPage

func NewRegisterMasterPasswordPage(html html.Writer, masterkey masterkey.Service) *MasterRegisterPasswordPage

func (*MasterRegisterPasswordPage) Register

func (h *MasterRegisterPasswordPage) Register(r chi.Router, mids *router.Middlewares)

Jump to

Keyboard shortcuts

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