handlers

package
v0.25.2 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Overview

Package handlers contains HTTP handlers used by Pomerium.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeviceEnrolled

func DeviceEnrolled(data UserInfoData) http.Handler

DeviceEnrolled displays an HTML page informing the user that they've successfully enrolled a device.

func HealthCheck

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

HealthCheck is a simple healthcheck handler that responds to GET and HEAD http requests.

func JWKSHandler

func JWKSHandler(signingKey []byte) http.Handler

JWKSHandler returns the /.well-known/pomerium/jwks.json handler.

func SignOutConfirm

func SignOutConfirm(data SignOutConfirmData) http.Handler

SignOutConfirm returns a handler that renders the sign out confirm page.

func SignedOut added in v0.24.0

func SignedOut(data SignedOutData) http.Handler

SignedOut returns a handler that renders the signed out page.

func UserInfo

func UserInfo(data UserInfoData) http.Handler

UserInfo returns a handler that renders the user info page.

func WellKnownPomerium

func WellKnownPomerium(authenticateURL *url.URL) http.Handler

WellKnownPomerium returns the /.well-known/pomerium handler.

Types

type SignOutConfirmData

type SignOutConfirmData struct {
	URL string
}

SignOutConfirmData is the data for the SignOutConfirm page.

func (SignOutConfirmData) ToJSON

func (data SignOutConfirmData) ToJSON() map[string]interface{}

ToJSON converts the data into a JSON map.

type SignedOutData added in v0.24.0

type SignedOutData struct{}

SignedOutData is the data for the SignedOut page.

func (SignedOutData) ToJSON added in v0.24.0

func (data SignedOutData) ToJSON() map[string]interface{}

ToJSON converts the data into a JSON map.

type UserInfoData

type UserInfoData struct {
	CSRFToken      string
	IsImpersonated bool
	Session        *session.Session
	User           *user.User
	Profile        *identity.Profile

	IsEnterprise    bool
	DirectoryUser   *directory.User
	DirectoryGroups []*directory.Group

	WebAuthnCreationOptions *webauthn.PublicKeyCredentialCreationOptions
	WebAuthnRequestOptions  *webauthn.PublicKeyCredentialRequestOptions
	WebAuthnURL             string

	BrandingOptions httputil.BrandingOptions
}

UserInfoData is the data for the UserInfo page.

func (UserInfoData) ToJSON

func (data UserInfoData) ToJSON() map[string]any

ToJSON converts the data into a JSON map.

Directories

Path Synopsis
Package webauthn contains handlers for the WebAuthn flow in authenticate.
Package webauthn contains handlers for the WebAuthn flow in authenticate.

Jump to

Keyboard shortcuts

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