authentication

package
v0.0.35 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2026 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const SignupDisabledError = "signup is currently disabled"

Variables

This section is empty.

Functions

func ClearAccountCookie

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

func GetOrganizationIdFromMetadata

func GetOrganizationIdFromMetadata(ctx context.Context) (string, bool)

func GetUserIdFromMetadata

func GetUserIdFromMetadata(ctx context.Context) (string, bool)

func SetUserIdInMetadata

func SetUserIdInMetadata(ctx context.Context, userId string) context.Context

Types

type Handler

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

func NewHandler

func NewHandler(jwtSigner *jwt.Signer, encryptor crypto.Encryptor, authService authorization.Authorization, appEnv string, templateDir string, blockSignup bool, passwordLoginEnabled bool) *Handler

func (*Handler) FindOrCreateAccountForProvider

func (a *Handler) FindOrCreateAccountForProvider(gothUser goth.User) (*models.Account, error)

func (*Handler) InitializeProviders

func (a *Handler) InitializeProviders(providers map[string]ProviderConfig)

func (*Handler) RegisterRoutes

func (a *Handler) RegisterRoutes(router *mux.Router)

type ProviderConfig

type ProviderConfig struct {
	Key         string
	Secret      string
	CallbackURL string
}

Jump to

Keyboard shortcuts

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