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

extaccountwire

package
v1.149.0 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package extaccountwire assembles external accounts (#2092) from the platform: the service over the platform's database, persona registry, mailer and browser-session cookie; its admin and public routes; the judge every cookie session passes; and the identity-provider sign-in that converts an account.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Mount

func Mount(mux *http.ServeMux, d Deps) *extaccount.Service

Mount assembles the feature and registers its routes, returning the service, or nil when the deployment cannot have external accounts.

func MountPlatform

func MountPlatform(mux *http.ServeMux, p *platform.Platform, notify *notifydelivery.Handle, h Platform) *extaccount.Service

MountPlatform assembles the feature from the running platform and mounts it; see Mount.

Types

type Deps

type Deps struct {
	DB       *sql.DB
	Personas extaccount.Personas
	// StoredPersona reads a persona from the persona store.
	StoredPersona func(ctx context.Context, name string) (*persona.Persona, bool)
	Users         user.Store
	Mail          extaccount.Mailer
	Cookie        browsersession.CookieConfig
	BaseURL       string
	// SessionAuth is the cookie authenticator every surface reads a session
	// through; the account judge is installed on it.
	SessionAuth *browsersession.Authenticator
	// Flow is the identity-provider sign-in, whose completions convert an
	// account; nil when the deployment has none.
	Flow *browsersession.Flow
	// AdminWrap is the admin API's authentication; nil mounts no admin route.
	AdminWrap func(http.Handler) http.Handler
	Author    func(*http.Request) string
}

Deps is what the feature is assembled from. A deployment without a database or a browser-session signing key has no external accounts: the session a link opens is a browser session.

type Platform

type Platform struct {
	SigningKey []byte
	AdminWrap  func(http.Handler) http.Handler
	Author     func(*http.Request) string
}

Platform is what the assembly takes from the HTTP layer rather than the platform: the browser-session signing key, and the admin API's authentication and author, nil when the admin API is off.

Jump to

Keyboard shortcuts

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