auth

package
v0.0.0-...-84b72f1 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2024 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthedUserRedirect

func AuthedUserRedirect(
	w http.ResponseWriter,
	r *http.Request,
)

func NewContextWithSession

func NewContextWithSession(ctx context.Context, session *model.Session) context.Context

func SessionFromContext

func SessionFromContext(ctx context.Context) *model.Session

func UnauthedUserRedirect

func UnauthedUserRedirect(
	w http.ResponseWriter,
	r *http.Request,
)

Types

type Controller

type Controller struct {
	BypassHTTPS bool

	Passwordless passwordless.UseCase
	Memberships  membership.UseCase

	LoginView  interfaces.LoginView
	SignUpView interfaces.SignUpView
}

func (*Controller) Authenticate

func (c *Controller) Authenticate(next base.HTTPHandler) base.HTTPHandler

func (*Controller) Authorize

func (c *Controller) Authorize() base.HTTPHandler

func (*Controller) AuthorizeIntermediary

func (c *Controller) AuthorizeIntermediary(authRoute string) base.HTTPHandler

func (*Controller) CheckMembership

func (c *Controller) CheckMembership(next base.HTTPHandler) base.HTTPHandler

func (*Controller) LoginForm

func (c *Controller) LoginForm() base.HTTPHandler

func (*Controller) LoginPage

func (c *Controller) LoginPage() base.HTTPHandler

func (*Controller) Logout

func (c *Controller) Logout() base.HTTPHandler

func (*Controller) SignupPage

func (c *Controller) SignupPage() base.HTTPHandler

Jump to

Keyboard shortcuts

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