Documentation
¶
Index ¶
- type APIConfig
- type AccessDeniedResponse
- type AuthRequest
- type AuthResponse
- type Portal
- func (p *Portal) APIKeyAuth(r *authproxy.Request) error
- func (p *Portal) AddUserRegistry(userRegistry registry.UserRegistry) error
- func (p *Portal) BasicAuth(r *authproxy.Request) error
- func (p *Portal) GetIdentityStoreNames() map[string]string
- func (p *Portal) GetName() string
- func (p *Portal) ServeHTTP(ctx context.Context, w http.ResponseWriter, r *http.Request, ...) error
- type PortalConfig
- type PortalParameters
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIConfig ¶
type APIConfig struct {
Enabled bool `json:"enabled,omitempty" xml:"enabled,omitempty" yaml:"enabled,omitempty"`
}
APIConfig holds the configuration for API endpoints.
type AccessDeniedResponse ¶
type AccessDeniedResponse struct {
Error bool `json:"error,omitempty" xml:"error,omitempty" yaml:"error,omitempty"`
Message string `json:"message,omitempty" xml:"message,omitempty" yaml:"message,omitempty"`
Timestamp string `json:"timestamp,omitempty" xml:"timestamp,omitempty" yaml:"timestamp,omitempty"`
}
AccessDeniedResponse is the access denied response.
type AuthRequest ¶
type AuthRequest struct {
Username string `json:"username,omitempty" xml:"username,omitempty" yaml:"username,omitempty"`
Password string `json:"password,omitempty" xml:"password,omitempty" yaml:"password,omitempty"`
Realm string `json:"realm,omitempty" xml:"realm,omitempty" yaml:"realm,omitempty"`
}
AuthRequest is authentication request.
type AuthResponse ¶
type AuthResponse struct {
Token string `json:"token,omitempty" xml:"token,omitempty" yaml:"token,omitempty"`
TokenName string `json:"token_name,omitempty" xml:"token_name,omitempty" yaml:"token_name,omitempty"`
}
AuthResponse is the response to authentication request.
type Portal ¶
type Portal struct {
// contains filtered or unexported fields
}
Portal is an authentication portal.
func NewPortal ¶
func NewPortal(params PortalParameters) (*Portal, error)
NewPortal returns an instance of Portal.
func (*Portal) APIKeyAuth ¶
APIKeyAuth performs API key authentication.
func (*Portal) AddUserRegistry ¶
func (p *Portal) AddUserRegistry(userRegistry registry.UserRegistry) error
AddUserRegistry adds registry.UserRegistry instance to Portal.
func (*Portal) GetIdentityStoreNames ¶
GetIdentityStoreNames returns a list of existing identity stores.
type PortalConfig ¶
type PortalConfig struct {
Name string `json:"name,omitempty" xml:"name,omitempty" yaml:"name,omitempty"`
// UI holds the configuration for the user interface.
UI *ui.Parameters `json:"ui,omitempty" xml:"ui,omitempty" yaml:"ui,omitempty"`
// UserTransformerConfig holds the configuration for the user transformer.
UserTransformerConfigs []*transformer.Config `json:"user_transformer_configs,omitempty" xml:"user_transformer_configs,omitempty" yaml:"user_transformer_configs,omitempty"`
// CookieConfig holds the configuration for the cookies issues by Authenticator.
CookieConfig *cookie.Config `json:"cookie_config,omitempty" xml:"cookie_config,omitempty" yaml:"cookie_config,omitempty"`
// The names of identity stores.
IdentityStores []string `json:"identity_stores,omitempty" xml:"identity_stores,omitempty" yaml:"identity_stores,omitempty"`
// The names of identity providers.
IdentityProviders []string `json:"identity_providers,omitempty" xml:"identity_providers,omitempty" yaml:"identity_providers,omitempty"`
// The names of SSO providers.
SingleSignOnProviders []string `json:"sso_providers,omitempty" xml:"sso_providers,omitempty" yaml:"sso_providers,omitempty"`
// The names of user registries.
UserRegistries []string `json:"user_registries,omitempty" xml:"user_registries,omitempty" yaml:"user_registries,omitempty"`
// AccessListConfigs hold the configurations for the ACL of the token validator.
AccessListConfigs []*acl.RuleConfiguration `json:"access_list_configs,omitempty" xml:"access_list_configs,omitempty" yaml:"access_list_configs,omitempty"`
// TokenValidatorOptions holds the configuration for the token validator.
TokenValidatorOptions *options.TokenValidatorOptions `json:"token_validator_options,omitempty" xml:"token_validator_options,omitempty" yaml:"token_validator_options,omitempty"`
// CryptoKeyConfigs hold the configurations for the keys used to issue and validate user tokens.
CryptoKeyConfigs []*kms.CryptoKeyConfig `json:"crypto_key_configs,omitempty" xml:"crypto_key_configs,omitempty" yaml:"crypto_key_configs,omitempty"`
// CryptoKeyStoreConfig hold the default configuration for the keys, e.g. token name and lifetime.
CryptoKeyStoreConfig map[string]interface{} `json:"crypto_key_store_config,omitempty" xml:"crypto_key_store_config,omitempty" yaml:"crypto_key_store_config,omitempty"`
// TokenGrantorOptions holds the configuration for the tokens issues by Authenticator.
TokenGrantorOptions *options.TokenGrantorOptions `json:"token_grantor_options,omitempty" xml:"token_grantor_options,omitempty" yaml:"token_grantor_options,omitempty"`
// API holds the configuration for API endpoints.
API *APIConfig `json:"api,omitempty" xml:"api,omitempty" yaml:"api,omitempty"`
// contains filtered or unexported fields
}
PortalConfig represents Portal configuration.
func (*PortalConfig) AddRawCryptoConfigs ¶
func (cfg *PortalConfig) AddRawCryptoConfigs(s string)
AddRawCryptoConfigs adds raw crypto configs.
func (*PortalConfig) Validate ¶
func (cfg *PortalConfig) Validate() error
Validate validates PortalConfig.
type PortalParameters ¶
type PortalParameters struct {
Config *PortalConfig `json:"config,omitempty" xml:"config,omitempty" yaml:"config,omitempty"`
Logger *zap.Logger `json:"logger,omitempty" xml:"logger,omitempty" yaml:"logger,omitempty"`
IdentityStores []ids.IdentityStore `json:"identity_stores,omitempty" xml:"identity_stores,omitempty" yaml:"identity_stores,omitempty"`
IdentityProviders []idp.IdentityProvider `json:"identity_providers,omitempty" xml:"identity_providers,omitempty" yaml:"identity_providers,omitempty"`
SingleSignOnProviders []sso.SingleSignOnProvider `json:"sso_providers,omitempty" xml:"sso_providers,omitempty" yaml:"sso_providers,omitempty"`
}
PortalParameters are input parameters for NewPortal.
Source Files
¶
- api_config.go
- apikey_form_validator.go
- authproxy_basic_auth.go
- config.go
- handle_api_list_users.go
- handle_api_metadata.go
- handle_basic_login.go
- handle_external_http_logout.go
- handle_external_login.go
- handle_http_apps_mobile_access.go
- handle_http_apps_sso.go
- handle_http_login.go
- handle_http_logout.go
- handle_http_portal.go
- handle_http_recover.go
- handle_http_sandbox.go
- handle_http_settings.go
- handle_http_settings_apikeys.go
- handle_http_settings_general.go
- handle_http_settings_gpgkeys.go
- handle_http_settings_mfa.go
- handle_http_settings_password.go
- handle_http_settings_sshkeys.go
- handle_http_static.go
- handle_http_whoami.go
- handle_json_beacon.go
- handle_json_login.go
- handle_json_whoami.go
- handle_register.go
- idp_apikey_auth.go
- mfa_form_validator.go
- password_form_validator.go
- portal.go
- pubkey_form_validator.go
- respond_api.go
- respond_http.go
- respond_json.go
- respond_qrcode.go
- serve_http.go
Click to show internal directories.
Click to hide internal directories.