tenant

package
v0.0.0-...-a423d60 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const ClientIDFromCertificateHeader = "Client-Id-From-Certificate"

ClientIDFromCertificateHeader contains the name of the header containing the client id from the certificate

Variables

This section is empty.

Functions

This section is empty.

Types

type Middleware

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

Middleware authorizes only requests made from CMP - checks if the tenant from ID token matches the provider subaccount of CMP

func NewMiddleware

func NewMiddleware(ctx context.Context, cfg config.TenantInfo) (Middleware, error)

NewMiddleware provides new Middleware

func (*Middleware) Handler

func (m *Middleware) Handler() func(next http.Handler) http.Handler

Handler performs a tenant validation by comparing the tenant from the ID token with CMPs provider subaccount

type TenantInfo

type TenantInfo struct {
	CertSubject string `json:"certSubject"`
}

TenantInfo contains tenant information

Jump to

Keyboard shortcuts

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