Documentation
¶
Index ¶
- func LoadConfig()
- type ClientsConfig
- type Config
- func (c Config) DefaultScopes() ([]*model.Scope, error)
- func (config Config) DefaultSigningKey() *jwt.Key
- func (config Config) DefaultVerificationKey() *jwt.Key
- func (config Config) GetKeyForAlgorithm(alg jwt.Algorithm, private bool) (*jwt.Key, error)
- func (config Config) JWKS(private bool) *jwt.KeySet
- func (config *Config) SupportedAlgorithms() []jwt.Algorithm
- type DatabaseConfig
- type OAuthConfig
- type ServerConfig
- type TokenConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ClientsConfig ¶
type ClientsConfig struct {
DynamicRegistration bool
}
type Config ¶
type Config struct {
Server *ServerConfig
Database *DatabaseConfig
OAuth *OAuthConfig
Remain map[string]interface{} `mapstructure:",remain"`
}
Config holds configuration information for the program.
var ( // Current is the current configuration for the server. Current Config )
func (Config) DefaultScopes ¶
DefaultScopes returns the default user scopes of this config.
func (Config) DefaultSigningKey ¶
DefaultSigningKey returns the server's default key used for token signing.
func (Config) DefaultVerificationKey ¶
DefaultVerificationKey returns the server's default key used for token verifications.
func (Config) GetKeyForAlgorithm ¶
GetKeyForAlgorithm returns a cached key for the algorithm.
func (*Config) SupportedAlgorithms ¶
SupportedAlgorithms returns a list of all supported signing algorithms.
type DatabaseConfig ¶
type DatabaseConfig struct {
// The GraphQL endpoint
URL string
// The Dgraph gRPC endpoint
Grpc string
// The GraphQL API key
APIKey string
// Whether or not to seed the DB
SeedDB bool
// Whether to drop all data
DropAll bool
// For embedded DB
Dir string // Path to store data in (for embedded)
}
DatabaseConfig holds configuration variables for the database.
type OAuthConfig ¶
type OAuthConfig struct {
Admin struct {
ClientID string // can be assigned or randomly generated
Username string
Password string
}
Clients ClientsConfig
Tokens struct {
PrivateKeyFile string
DefaultAlgorithm jwt.Algorithm
KeySet map[jwt.Algorithm]TokenConfig
}
Scopes struct {
Default string
}
Authentication struct {
ROPC bool
}
Template struct {
Options *templateOptions
}
}
OAuthConfig holds configuration variables for FTAuth
type ServerConfig ¶
ServerConfig holds configuration variables for the server.
func (*ServerConfig) URL ¶
func (s *ServerConfig) URL() string
URL returns the main gateway URL for the server.
Click to show internal directories.
Click to hide internal directories.