requestidentity

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2026 License: Apache-2.0 Imports: 4 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package requestidentity extracts trusted Core account identity from module proxy headers.

Module HTTP ports must not be exposed directly to untrusted clients because the identity headers are trusted only when requests come through Core.

Index

Constants

View Source
const (
	// HeaderAccountID contains the authenticated Core account identifier.
	HeaderAccountID = "X-ProcessModule-Account-ID"

	// HeaderSystemAdministrator indicates whether the Core account is a
	// system administrator.
	HeaderSystemAdministrator = "X-ProcessModule-System-Administrator"
)

Variables

This section is empty.

Functions

func RequireAuthenticated

func RequireAuthenticated() echo.MiddlewareFunc

RequireAuthenticated requires a valid Core account identity.

func RequireSystemAdministrator

func RequireSystemAdministrator() echo.MiddlewareFunc

RequireSystemAdministrator requires a valid Core system administrator identity.

Types

type Identity

type Identity struct {
	AccountID           int64
	SystemAdministrator bool
}

Identity describes the authenticated Core account forwarded to a module.

func From

func From(c *echo.Context) (Identity, bool)

From returns the Core account identity stored in the Echo request context.

Jump to

Keyboard shortcuts

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