Documentation ¶
Index ¶
- Constants
- type Auth0Config
- type AuthConfig
- type AuthConfigs
- type AuthProvider
- type AuthSrvConfig
- type AuthSrvDNConfig
- type CognitoConfig
- type Config
- func (c *Config) AuthConfigs() []AuthProvider
- func (c *Config) AuthForWeb() *AuthConfig
- func (c *Config) Auths() (res AuthConfigs)
- func (c *Config) HostURL() *url.URL
- func (c *Config) HostWebURL() *url.URL
- func (c *Config) JWTProviders() (res []appx.JWTProvider)
- func (c *Config) Print() string
- func (c *Config) WebConfig() map[string]any
- type GCSConfig
- type GraphQLConfig
- type JSON
- type Mailer
- type MarketplaceConfig
- type OAuthClientCredentialsConfig
- type PolicyConfig
- type PublishedConfig
- type S3Config
Constants ¶
View Source
const AuthServerDefaultClientID = "reearth-authsrv-client-default"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Auth0Config ¶
type Auth0Config struct { Domain string `pp:",omitempty"` Audience string `pp:",omitempty"` ClientID string `pp:",omitempty"` ClientSecret string `pp:",omitempty"` WebClientID string `pp:",omitempty"` }
func (Auth0Config) AuthConfigForM2M ¶
func (c Auth0Config) AuthConfigForM2M() *AuthConfig
func (Auth0Config) AuthConfigForWeb ¶
func (c Auth0Config) AuthConfigForWeb() *AuthConfig
func (Auth0Config) Configs ¶
func (c Auth0Config) Configs() (res AuthConfigs)
type AuthConfig ¶
type AuthConfig struct { ISS string `pp:",omitempty"` AUD []string `pp:",omitempty"` ALG *string `pp:",omitempty"` TTL *int `pp:",omitempty"` ClientID *string `pp:",omitempty"` JWKSURI *string `pp:",omitempty"` }
func (AuthConfig) JWTProvider ¶
func (a AuthConfig) JWTProvider() appx.JWTProvider
type AuthConfigs ¶
type AuthConfigs []AuthConfig
func (*AuthConfigs) Decode ¶
func (ipd *AuthConfigs) Decode(value string) error
Decode is a custom decoder for AuthConfigs
func (AuthConfigs) JWTProviders ¶
func (a AuthConfigs) JWTProviders() []appx.JWTProvider
type AuthProvider ¶
type AuthProvider interface {
Configs() AuthConfigs
}
type AuthSrvConfig ¶
type AuthSrvConfig struct { Dev bool `pp:",omitempty"` Disabled bool `pp:",omitempty"` Issuer string `pp:",omitempty"` Domain string `pp:",omitempty"` UIDomain string `pp:",omitempty"` Key string `pp:",omitempty"` DN *AuthSrvDNConfig `pp:",omitempty"` }
func (AuthSrvConfig) AuthConfig ¶
func (c AuthSrvConfig) AuthConfig(debug bool, host string) *AuthConfig
func (AuthSrvConfig) DomainURL ¶
func (c AuthSrvConfig) DomainURL() *url.URL
func (AuthSrvConfig) UIDomainURL ¶
func (c AuthSrvConfig) UIDomainURL() *url.URL
type AuthSrvDNConfig ¶
type AuthSrvDNConfig struct { CN string `pp:",omitempty"` O []string `pp:",omitempty"` OU []string `pp:",omitempty"` C []string `pp:",omitempty"` L []string `pp:",omitempty"` ST []string `pp:",omitempty"` Street []string `pp:",omitempty"` PostalCode []string `pp:",omitempty"` }
func (*AuthSrvDNConfig) AuthServerDNConfig ¶
func (a *AuthSrvDNConfig) AuthServerDNConfig() *authserver.DNConfig
type CognitoConfig ¶
type CognitoConfig struct { UserPoolID string `pp:",omitempty"` Region string `pp:",omitempty"` ClientID string `pp:",omitempty"` }
func (CognitoConfig) Configs ¶
func (c CognitoConfig) Configs() AuthConfigs
type Config ¶
type Config struct { mailer.Config Port string `default:"8080" envconfig:"PORT"` ServerHost string `pp:",omitempty"` Host string `default:"http://localhost:8080"` Host_Web string `pp:",omitempty"` Dev bool `pp:",omitempty"` DB string `default:"mongodb://localhost"` DB_Account string `pp:",omitempty"` DB_Users []appx.NamedURI `pp:",omitempty"` GraphQL GraphQLConfig `pp:",omitempty"` Published PublishedConfig `pp:",omitempty"` GCPProject string `envconfig:"GOOGLE_CLOUD_PROJECT" pp:",omitempty"` Profiler string `pp:",omitempty"` Tracer string `pp:",omitempty"` TracerSample float64 `pp:",omitempty"` Marketplace MarketplaceConfig `pp:",omitempty"` AssetBaseURL string `default:"http://localhost:8080/assets"` Origins []string `pp:",omitempty"` Policy PolicyConfig `pp:",omitempty"` Web_Disabled bool `pp:",omitempty"` Web_App_Disabled bool `pp:",omitempty"` Web map[string]string `pp:",omitempty"` Web_Config JSON `pp:",omitempty"` Web_Title string `pp:",omitempty"` Web_FaviconURL string `pp:",omitempty"` SignupSecret string `pp:",omitempty"` SignupDisabled bool `pp:",omitempty"` HTTPSREDIRECT bool `pp:",omitempty"` // storage GCS GCSConfig `pp:",omitempty"` S3 S3Config `pp:",omitempty"` // auth Auth AuthConfigs `pp:",omitempty"` Auth0 Auth0Config `pp:",omitempty"` Cognito CognitoConfig `pp:",omitempty"` AuthSrv AuthSrvConfig `pp:",omitempty"` Auth_ISS string `pp:",omitempty"` Auth_AUD string `pp:",omitempty"` Auth_ALG *string `pp:",omitempty"` Auth_TTL *int `pp:",omitempty"` Auth_ClientID *string `pp:",omitempty"` Auth_JWKSURI *string `pp:",omitempty"` // system extensions Ext_Plugin []string `pp:",omitempty"` }
func ReadConfig ¶
func (*Config) AuthConfigs ¶
func (c *Config) AuthConfigs() []AuthProvider
func (*Config) AuthForWeb ¶
func (c *Config) AuthForWeb() *AuthConfig
func (*Config) Auths ¶
func (c *Config) Auths() (res AuthConfigs)
func (*Config) HostWebURL ¶
func (*Config) JWTProviders ¶
func (c *Config) JWTProviders() (res []appx.JWTProvider)
type GCSConfig ¶
type GCSConfig struct { BucketName string `pp:",omitempty"` PublicationCacheControl string `pp:",omitempty"` }
func (GCSConfig) IsConfigured ¶
type GraphQLConfig ¶
type GraphQLConfig struct {
ComplexityLimit int `default:"10000"`
}
type MarketplaceConfig ¶
type MarketplaceConfig struct { Endpoint string `pp:",omitempty"` Secret string `pp:",omitempty"` OAuth *OAuthClientCredentialsConfig `pp:",omitempty"` }
type OAuthClientCredentialsConfig ¶
type OAuthClientCredentialsConfig struct { ClientID string `pp:",omitempty"` ClientSecret string `pp:",omitempty"` TokenURL string `pp:",omitempty"` Scopes []string `pp:",omitempty"` Audience []string `pp:",omitempty"` }
func (*OAuthClientCredentialsConfig) Config ¶
func (c *OAuthClientCredentialsConfig) Config() *clientcredentials.Config
type PolicyConfig ¶
type PublishedConfig ¶
Click to show internal directories.
Click to hide internal directories.