auth

package
v0.0.0-...-4673371 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2024 License: EUPL-1.2 Imports: 31 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FormValueEmail    = "email"
	FormValuePassword = "password"
	FormValueUsername = "username"

	FormValueCredentialName = "name"
	FormValueConfirm        = "cnf"
	FormValueToken          = "token"
	FormValueCode           = "code"
	FormValueRecoveryCode   = "recovery_code"
	FormValuePhoneNumber    = "phone_number"
)

FormValue types

Variables

This section is empty.

Functions

func NewAuthenticationProvider

func NewAuthenticationProvider(baseURL string, querier db.TransactionQuerier, authKey []byte, sessionKey []byte, emailTaskRunner emailTaskRunner, cache cache.CacheProvider[queries.User]) (*authenticationProvider, error)

func NewNoAuth

func NewNoAuth(user *queries.User) *noAuth

func URLValuesToMap

func URLValuesToMap(form url.Values) map[string]string

URLValuesToMap helps create a map from url.Values

Types

type CreateWebauthnCredential

type CreateWebauthnCredential struct {
	protocol.CredentialCreationResponse

	Name string
}

type WebauthnValues

type WebauthnValues struct {
	defaults.HTTPFormValidator

	PID string

	Name                string
	CreationCredential  *protocol.ParsedCredentialCreationData
	CredentialAssertion *protocol.ParsedCredentialAssertionData
}

WebauthnValues from the login form

func (WebauthnValues) GetCreationCredential

func (u WebauthnValues) GetCreationCredential() protocol.ParsedCredentialCreationData

func (WebauthnValues) GetCredentialAssertion

func (u WebauthnValues) GetCredentialAssertion() protocol.ParsedCredentialAssertionData

func (WebauthnValues) GetCredentialName

func (u WebauthnValues) GetCredentialName() string

func (WebauthnValues) GetPID

func (u WebauthnValues) GetPID() string

GetPID from the values

func (WebauthnValues) GetShouldRemember

func (u WebauthnValues) GetShouldRemember() bool

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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