auth

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package auth holds the auth-all glue of Avero: the user and the session of a request.

The router imports no authentication library. An application that keeps its own identity therefore imports the router and never compiles auth-all. An application that uses auth-all adapts its middleware with router.Adapt and reads the user with this package.

auth-all owns authentication. Avero owns lifecycle, not semantics. See the SDD, S4.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Session

func Session(ctx context.Context) *store.Session

Session returns the auth-all session. It returns nil for an anonymous request.

func User

func User(ctx context.Context) *store.User

User returns the signed-in user. It returns nil for an anonymous request. auth-all attaches the user with RequireAuth or LoadSession.

user := auth.User(c)

Types

This section is empty.

Jump to

Keyboard shortcuts

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