issuer

package
v0.0.0-...-a6c0751 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2024 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

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

func NewManager

func NewManager(services []SsoConfig) (*Manager, error)

func (*Manager) CheckNamespace

func (m *Manager) CheckNamespace(namespace string) bool

func (*Manager) FindServiceFromLogin

func (m *Manager) FindServiceFromLogin(login string) *WellKnownOIDC

func (*Manager) GetService

func (m *Manager) GetService(namespace string) *WellKnownOIDC

type SsoConfig

type SsoConfig struct {
	Addr      utils.JsonUrl   `json:"addr"`      // https://login.example.com
	Namespace string          `json:"namespace"` // example.com
	Client    SsoConfigClient `json:"client"`
}

SsoConfig is the base URL for an OAUTH/OPENID/SSO login service The path `/.well-known/openid-configuration` should be available

func (SsoConfig) FetchConfig

func (s SsoConfig) FetchConfig() (*WellKnownOIDC, error)

type SsoConfigClient

type SsoConfigClient struct {
	ID     string   `json:"id"`
	Secret string   `json:"secret"`
	Scopes []string `json:"scopes"`
}

type WellKnownOIDC

type WellKnownOIDC struct {
	Config                 SsoConfig     `json:"-"`
	Issuer                 string        `json:"issuer"`
	AuthorizationEndpoint  string        `json:"authorization_endpoint"`
	TokenEndpoint          string        `json:"token_endpoint"`
	UserInfoEndpoint       string        `json:"userinfo_endpoint"`
	ResponseTypesSupported []string      `json:"response_types_supported"`
	ScopesSupported        []string      `json:"scopes_supported"`
	ClaimsSupported        []string      `json:"claims_supported"`
	GrantTypesSupported    []string      `json:"grant_types_supported"`
	OAuth2Config           oauth2.Config `json:"-"`
}

func (WellKnownOIDC) ValidReturnUrl

func (o WellKnownOIDC) ValidReturnUrl(u *url.URL) bool

func (WellKnownOIDC) Validate

func (o WellKnownOIDC) Validate() error

Jump to

Keyboard shortcuts

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