generator

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	JWKSUriExtensionName  = "x-authenticator-jwks-uri"
	IssuerExtensionName   = "x-authenticator-issuer"
	AudienceExtensionName = "x-authenticator-audience"
)

Functions

func NewAuthenticatorFromSecurityScheme added in v0.6.0

func NewAuthenticatorFromSecurityScheme(ss *openapi3.SecuritySchemeRef, jwksUri *string, allowedIssuer *string, allowedAudience *string) (authenticator.Authenticator, error)

Types

type Generator

type Generator struct {
	PrefixId string
	// contains filtered or unexported fields
}

func NewGenerator

func NewGenerator(ctx context.Context, d *openapi3.T, prefixId string, jwksUris map[string]string, allowedIssuers map[string]string, allowedAudiences map[string]string, serverUrls []string, upstreamUrl string, upstreamStripPath string) (*Generator, error)

func (*Generator) Generate

func (g *Generator) Generate() ([]rule.Rule, error)

type RulesById added in v0.5.4

type RulesById []rule.Rule

func (RulesById) Len added in v0.5.4

func (r RulesById) Len() int

func (RulesById) Less added in v0.5.4

func (r RulesById) Less(i, j int) bool

func (RulesById) Swap added in v0.5.4

func (r RulesById) Swap(i, j int)

type SecurityScheme added in v0.6.0

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

func (*SecurityScheme) GetAllowedAudience added in v0.6.0

func (s *SecurityScheme) GetAllowedAudience() string

func (*SecurityScheme) GetAllowedIssuer added in v0.6.0

func (s *SecurityScheme) GetAllowedIssuer() (string, error)

func (*SecurityScheme) GetAuthenticator added in v0.6.0

func (s *SecurityScheme) GetAuthenticator() *authenticator.Authenticator

func (*SecurityScheme) GetJwksUri added in v0.6.0

func (s *SecurityScheme) GetJwksUri() (string, error)

Jump to

Keyboard shortcuts

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