authzserver

package module
v0.0.0-...-ce5cb77 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2025 License: EUPL-1.2 Imports: 24 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ErrorLogMiddleware

func ErrorLogMiddleware(next echo.HandlerFunc) echo.HandlerFunc

Types

type AuthzServerSession

type AuthzServerSession struct {
	ResponseType              string                   `json:"response_type"`
	ClientID                  string                   `json:"client_id"`
	RedirectURI               string                   `json:"redirect_uri"`
	CodeChallenge             string                   `json:"code_challenge"`
	CodeChallengeMethod       string                   `json:"code_challenge_method"`
	Nonce                     string                   `json:"nonce"`
	State                     string                   `json:"state"`
	Scope                     string                   `json:"scope"`
	OPIssuer                  string                   `json:"op_issuer"`
	OPIntermediaryRedirectURI string                   `json:"op_intermediary_redirect_uri"`
	RequestUri                string                   `json:"request_uri"`
	AuthnClientSession        *oidc.AuthnClientSession `json:"authn_client_session"`
	Code                      string                   `json:"code"`
}

type AuthzServerSessionStore

type AuthzServerSessionStore interface {
	oidc.AuthnClientSessionStore
	GetAuthzServerSession(state string) (*AuthzServerSession, error)
	GetAuthzServerSessionByAuthnState(authnState string) (*AuthzServerSession, error)
	GetAutzhServerSessionByRequestURI(requestURI string) (*AuthzServerSession, error)
	GetAuthzServerSessionByCode(code string) (*AuthzServerSession, error)
	SaveAutzhServerSession(session *AuthzServerSession) error
	DeleteAuthzServerSession(state string) error
}

type ClientPolicy

type ClientPolicy struct {
	ProductID          string      `yaml:"product_id"`
	ProductName        string      `yaml:"product_name"`
	ManufacturerID     string      `yaml:"manufacturer_id"`
	ManufacturerName   string      `yaml:"manufacturer_name"`
	Platform           string      `yaml:"platform"`
	PlatformProductID  interface{} `yaml:"platform_product_id"`
	RedirectURIs       []string    `yaml:"redirect_uris"`
	OPIntermediaryURIs []string    `yaml:"op_intermediary_redirect_uris"`
	PushGateway        interface{} `yaml:"push_gateway"`
}

type ClientsPolicy

type ClientsPolicy struct {
	Clients []*ClientPolicy `yaml:"clients"`
}

func LoadClientsPolicy

func LoadClientsPolicy(path string) (*ClientsPolicy, error)

func (*ClientsPolicy) AllowedClient

func (p *ClientsPolicy) AllowedClient(clientID string) bool

func (*ClientsPolicy) AllowedOPIntermediaryURL

func (p *ClientsPolicy) AllowedOPIntermediaryURL(clientID, url string) bool

func (*ClientsPolicy) AllowedRedirectURI

func (p *ClientsPolicy) AllowedRedirectURI(clientID, uri string) bool

type Config

type Config struct {
	Issuer               string                `yaml:"issuer"`
	SignPrivateKeyPath   string                `yaml:"sign_private_key_path"`
	EncPublicKeyPath     string                `yaml:"enc_public_key_path"`
	ScopesSupported      []string              `yaml:"scopes_supported"`
	MetadataTemplate     oauth2.ServerMetadata `yaml:"metadata_template"`
	OidcProviders        []oidc.Config         `yaml:"oidc_providers"`
	GematikIdp           []gemidp.ClientConfig `yaml:"gematik_idp"`
	ClientsPolicyPath    string                `yaml:"clients_policy_path"`
	OidfRelyingPartyPath string                `yaml:"oidf_relying_party_path"`
	// contains filtered or unexported fields
}

func LoadConfigFile

func LoadConfigFile(path string) (*Config, error)

type Option

type Option func(*Server) error

type Server

type Server struct {
	Metadata oauth2.ServerMetadata
	// contains filtered or unexported fields
}

func New

func New(cfg *Config) (*Server, error)

func NewFromConfigFile

func NewFromConfigFile(path string) (*Server, error)

func (*Server) AuthorizationEndpoint

func (s *Server) AuthorizationEndpoint(c echo.Context) error

func (*Server) JWKS

func (s *Server) JWKS(c echo.Context) error

JWKS serves the JSON Web Key Set for the server

func (*Server) MetadataEndpoint

func (s *Server) MetadataEndpoint(c echo.Context) error

func (*Server) MountRoutes

func (s *Server) MountRoutes(group *echo.Group)

func (*Server) OPCallbackEndpoint

func (s *Server) OPCallbackEndpoint(c echo.Context) error

OPCallbackEndpoint handles the callback from the OpenID Provider

func (*Server) OpenidProvider

func (s *Server) OpenidProvider(issuer string) (oidc.Client, error)

OpenidProvider returns an OpenID Connect client for the given issuer

func (*Server) OpenidProviders

func (s *Server) OpenidProviders() ([]oidc.OpenidProviderInfo, error)

OpenidProviders returns the list of OpenID Providers supported by the server

func (*Server) OpenidProvidersEndpoint

func (s *Server) OpenidProvidersEndpoint(c echo.Context) error

OpenidProvidersEndpoint serves the list of OpenID Providers supported by the server

func (*Server) PAREndpoint

func (s *Server) PAREndpoint(c echo.Context) error

func (*Server) TokenEndpoint

func (s *Server) TokenEndpoint(c echo.Context) error

TokenEndpoint handles the token request

Directories

Path Synopsis
cmd
zero-pdp command

Jump to

Keyboard shortcuts

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