issuernew

package
v0.0.0-...-ab2b10e Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2025 License: Apache-2.0 Imports: 52 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenDIDKey

func GenDIDKey() (did string, privateKey jwk.Key, err error)

GenDIDKey generates a new 'did:key' DID by creating an EC key pair

func GenerateRandomKey

func GenerateRandomKey(length int) []byte

func LookupEnvOrString

func LookupEnvOrString(key string, defaultVal string) string

LookupEnvOrString gets a value from the environment or returns the specified default value

func PubKeyToDIDKey

func PubKeyToDIDKey(pubKeyJWK jwk.Key) (did string, err error)

func Render

func Render(ctx echo.Context, statusCode int, t templ.Component) error

This custom Render replaces Echo's echo.Context.Render() with templ's templ.Component.Render().

func RequireAdminOrX509Auth

func RequireAdminOrX509Auth() echo.MiddlewareFunc

RequireAdminOrX509Auth middleware requires a request to have a valid admin Authorization header or x509 client certification set.

Types

type Config

type Config struct {
	ListenAddress          string     `json:"listenAddress,omitempty"`
	AppName                string     `json:"appName,omitempty"`
	IssuerURL              string     `json:"issuerURL,omitempty"`
	IssuerCertificateURL   string     `json:"issuerCertificateURL,omitempty"`
	SenderName             string     `json:"senderName,omitempty"`
	SenderAddress          string     `json:"senderAddress,omitempty"`
	VerifierURL            string     `json:"verifierURL,omitempty"`
	CallbackPath           string     `json:"callbackPath,omitempty"`
	Scopes                 string     `json:"scopes,omitempty"`
	AdminEmail             string     `json:"adminEmail,omitempty"`
	SMTP                   SMTPConfig `json:"smtp,omitempty"`
	SamedeviceWallet       string     `json:"samedeviceWallet,omitempty"`
	CredentialTemplatesDir string     `json:"credentialTemplatesDir,omitempty"`
	ClientID               string     `json:"clientID,omitempty"`
}

func ConfigFromMap

func ConfigFromMap(cfg *yaml.YAML) (*Config, error)

func (*Config) Copy

func (s *Config) Copy() Config

func (*Config) OverrideWith

func (s *Config) OverrideWith(other Config)

func (*Config) SetDefaults

func (s *Config) SetDefaults()

func (*Config) String

func (s *Config) String() string

func (*Config) Validate

func (s *Config) Validate() (err error)

type IssuerServer

type IssuerServer struct {
	App *pocketbase.PocketBase
	// contains filtered or unexported fields
}

func New

func New(cfg *my.YAML) *IssuerServer

func (*IssuerServer) GeneralLoginScreen

func (is *IssuerServer) GeneralLoginScreen(c echo.Context) error

func (*IssuerServer) LEARHomeHandler

func (is *IssuerServer) LEARHomeHandler(c echo.Context) error

func (*IssuerServer) Start

func (is *IssuerServer) Start() error

Start initializes the Issuer hooks and adds routes and spawns the server to handle them

type SMTPConfig

type SMTPConfig struct {
	Enabled  bool   `json:"enabled,omitempty"`
	Host     string `json:"host,omitempty"`
	Port     int    `json:"port,omitempty"`
	Tls      bool   `json:"tls,omitempty"`
	Username string `json:"username,omitempty"`
}

Directories

Path Synopsis
templ: version: v0.2.778
templ: version: v0.2.778

Jump to

Keyboard shortcuts

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