Documentation
¶
Index ¶
- Variables
- func GenerateSecret() string
- type Config
- func (c *Config) GetAccessTokenLifetime() int
- func (c *Config) GetCORSOrigins() []string
- func (c *Config) GetClientIDs() []string
- func (c *Config) GetRefreshTokenLifetime() int
- func (c *Config) IsValidClientID(id string) bool
- func (c *Config) IsValidRedirectURI(uri string) bool
- func (c *Config) LoadFromStore(getConfig func(key string) (string, error), ...)
- func (c *Config) NormalizedBasePath() string
Constants ¶
This section is empty.
Variables ¶
View Source
var Version = "dev"
Version is set at build time
Functions ¶
func GenerateSecret ¶
func GenerateSecret() string
Types ¶
type Config ¶
type Config struct {
// Server-level settings (from JSON file)
Port int `json:"port"`
KeyFile string `json:"keyFile"`
DBFile string `json:"dbFile"`
AdminKey string `json:"adminKey"`
// OIDC settings (from SQLite, with defaults)
Issuer string `json:"-"`
BasePath string `json:"-"`
RedirectURIs []string `json:"-"`
ClientIDs []string `json:"-"`
TenantID string `json:"-"`
TokenLifetime int `json:"-"` // Deprecated: use AccessTokenLifetime
AccessTokenLifetime int `json:"-"` // seconds, default 300 (5 min)
RefreshTokenLifetime int `json:"-"` // seconds, default 86400 (24 hr)
SessionSecret string `json:"-"`
GroupMapping map[string]string `json:"-"`
DisplayName string `json:"-"`
CORSOrigins []string `json:"-"`
}
func (*Config) GetAccessTokenLifetime ¶
GetAccessTokenLifetime returns the access token lifetime in seconds
func (*Config) GetCORSOrigins ¶
GetCORSOrigins returns configured CORS origins
func (*Config) GetClientIDs ¶
func (*Config) GetRefreshTokenLifetime ¶
GetRefreshTokenLifetime returns the refresh token lifetime in seconds
func (*Config) IsValidClientID ¶
func (*Config) IsValidRedirectURI ¶
func (*Config) LoadFromStore ¶
func (*Config) NormalizedBasePath ¶
Click to show internal directories.
Click to hide internal directories.