Documentation
¶
Index ¶
- func LoadOrGeneratePrivateKey(privatePath string, logger *slog.Logger) (*rsa.PrivateKey, error)
- func NewApp() *cli.App
- type Config
- type OAuthClient
- type Provider
- func (p *Provider) ConsumeCode(code string) (*codeEntry, bool)
- func (p *Provider) Issuer() string
- func (p *Provider) JWKS() jwks
- func (p *Provider) KeyID() string
- func (p *Provider) LookupAccessToken(tok string) (*tokenEntry, bool)
- func (p *Provider) MintAccessToken(user User, scope string) (string, time.Time, error)
- func (p *Provider) MintCode(entry *codeEntry) (string, error)
- func (p *Provider) RunSweeper(stop <-chan struct{})
- func (p *Provider) SignIDToken(user User, clientID, nonce string, expires time.Time) (string, error)
- func (p *Provider) Sweep()
- type ProviderConfig
- type Server
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
Provider ProviderConfig `yaml:"provider"`
}
func LoadConfig ¶
func (*Config) FindClient ¶
func (c *Config) FindClient(clientID string) (OAuthClient, bool)
type OAuthClient ¶
type OAuthClient struct {
ClientID string `yaml:"client_id"`
ClientSecret string `yaml:"client_secret"`
Name string `yaml:"name"`
RedirectURIs []string `yaml:"redirect_uris"`
}
func (OAuthClient) AllowsRedirect ¶
func (oc OAuthClient) AllowsRedirect(uri string) bool
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
func NewProvider ¶
func (*Provider) ConsumeCode ¶
func (*Provider) LookupAccessToken ¶
func (*Provider) MintAccessToken ¶
func (*Provider) RunSweeper ¶
func (p *Provider) RunSweeper(stop <-chan struct{})
func (*Provider) SignIDToken ¶
type ProviderConfig ¶
type ProviderConfig struct {
Users []User `yaml:"users"`
OAuthClients []OAuthClient `yaml:"oauth_clients"`
}
Click to show internal directories.
Click to hide internal directories.