Help us shape the future of Go! Take the 2026 Go Developer Survey

authn

package
v0.112.18 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2026 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthN

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

func NewAuthN

func NewAuthN(config *server.ServerConfig) *AuthN

func (*AuthN) Middleware

func (a *AuthN) Middleware(r *middleware.RouteInfo) echo.HandlerFunc

type SessionHelpers

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

func NewSessionHelpers

func NewSessionHelpers(ss *cookie.UserSessionStore) *SessionHelpers

func (*SessionHelpers) CurrentSessionID added in v0.109.19

func (s *SessionHelpers) CurrentSessionID(c echo.Context) *uuid.UUID

CurrentSessionID returns the ID of the persisted cookie session backing this request, or nil when the request is not backed by a stored session (e.g. bearer-token auth, or a cookie whose session row no longer exists).

func (*SessionHelpers) GetKey

func (s *SessionHelpers) GetKey(
	c echo.Context,
	k string,
) (string, error)

func (*SessionHelpers) GetKeyUuid added in v0.78.0

func (s *SessionHelpers) GetKeyUuid(
	c echo.Context,
	k string,
) (*uuid.UUID, error)

func (*SessionHelpers) RemoveKey

func (s *SessionHelpers) RemoveKey(
	c echo.Context,
	k string,
) error

func (*SessionHelpers) SaveAuthenticated

func (s *SessionHelpers) SaveAuthenticated(c echo.Context, user *sqlcv1.User) error

func (*SessionHelpers) SaveKV

func (s *SessionHelpers) SaveKV(
	c echo.Context,
	k, v string,
) error

func (*SessionHelpers) SaveNewSession added in v0.79.13

func (s *SessionHelpers) SaveNewSession(c echo.Context, session *sessions.Session) error

func (*SessionHelpers) SaveOAuthState

func (s *SessionHelpers) SaveOAuthState(
	c echo.Context,
	integration string,
) (string, error)

func (*SessionHelpers) SaveUnauthenticated

func (s *SessionHelpers) SaveUnauthenticated(c echo.Context) error

func (*SessionHelpers) ValidateOAuthState

func (s *SessionHelpers) ValidateOAuthState(
	c echo.Context,
	integration string,
) (isValidated bool, isOAuthTriggered bool, err error)

Jump to

Keyboard shortcuts

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