Documentation
¶
Index ¶
- func ErrorLogMiddleware(next echo.HandlerFunc) echo.HandlerFunc
- type AuthzServerSession
- type AuthzServerSessionStore
- type ClientPolicy
- type ClientsPolicy
- type Config
- type Option
- type Server
- func (s *Server) AuthorizationEndpoint(c echo.Context) error
- func (s *Server) JWKS(c echo.Context) error
- func (s *Server) MetadataEndpoint(c echo.Context) error
- func (s *Server) MountRoutes(group *echo.Group)
- func (s *Server) OPCallbackEndpoint(c echo.Context) error
- func (s *Server) OpenidProvider(issuer string) (oidc.Client, error)
- func (s *Server) OpenidProviders() ([]oidc.OpenidProviderInfo, error)
- func (s *Server) OpenidProvidersEndpoint(c echo.Context) error
- func (s *Server) PAREndpoint(c echo.Context) error
- func (s *Server) TokenEndpoint(c echo.Context) error
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 ¶
type Server ¶
type Server struct {
Metadata oauth2.ServerMetadata
// contains filtered or unexported fields
}
func NewFromConfigFile ¶
func (*Server) MountRoutes ¶
func (*Server) OPCallbackEndpoint ¶
OPCallbackEndpoint handles the callback from the OpenID Provider
func (*Server) OpenidProvider ¶
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 ¶
OpenidProvidersEndpoint serves the list of OpenID Providers supported by the server
Source Files
¶
Click to show internal directories.
Click to hide internal directories.