server

package
v0.0.0-...-e703bc3 Latest Latest
Warning

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

Go to latest
Published: May 20, 2026 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DevicePageData

type DevicePageData struct {
	SessionID       string
	DeviceCode      string
	UserCode        string
	VerificationURI string
	PollInterval    int
	LogoURI         string
}

DevicePageData holds data for the device flow template.

type LoginPageData

type LoginPageData struct {
	ScopesSupported []string
	LogoURI         string
	User            *session.UserClaims
	NotLoggedIn     bool
	LogoutURL       string
}

LoginPageData holds data for the login page template.

type Options

type Options struct {
	ClientID     string
	ClientSecret string
	RedirectURI  string
	IssuerURL    string
	PKCE         bool
	SessionAware bool
	RootCAs      string
	Debug        bool
}

Options configures the Server.

type Renderer

type Renderer interface {
	RenderLoginPage(w http.ResponseWriter, data LoginPageData)
	RenderTokenPage(w http.ResponseWriter, data TokenPageData)
	RenderDevicePage(w http.ResponseWriter, data DevicePageData)
}

Renderer renders HTML pages for the application.

type Server

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

Server is the HTTP server for the example OIDC client application.

func New

func New(opts Options) (*Server, error)

New creates a Server by performing OIDC discovery and initializing dependencies.

func (*Server) Run

func (s *Server) Run(listenAddr, tlsCert, tlsKey string) error

Run starts the HTTP(S) server with graceful shutdown on SIGINT/SIGTERM.

type TokenPageData

type TokenPageData struct {
	IDToken            string
	IDTokenJWTLink     string
	AccessToken        string
	AccessTokenJWTLink string
	RefreshToken       string
	RedirectURL        string
	Claims             string
	PublicKeyPEM       string
}

TokenPageData holds data for the token display template.

Jump to

Keyboard shortcuts

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