Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BasicConfig ¶
type BasicConfig struct { // Username is the name which will need to be used for a successful authentication Username string `yaml:"username"` // PasswordBcryptHashBase64Encoded is the base64 encoded string of the Bcrypt hash of the password to use to // authenticate using basic auth. PasswordBcryptHashBase64Encoded string `yaml:"password-bcrypt-base64"` }
BasicConfig is the configuration for Basic authentication
type Config ¶
type Config struct { Basic *BasicConfig `yaml:"basic,omitempty"` OIDC *OIDCConfig `yaml:"oidc,omitempty"` // contains filtered or unexported fields }
Config is the security configuration for Gatus
func (*Config) ApplySecurityMiddleware ¶
ApplySecurityMiddleware applies an authentication middleware to the router passed. The router passed should be a sub-router in charge of handlers that require authentication.
func (*Config) IsAuthenticated ¶
IsAuthenticated checks whether the user is authenticated If the Config does not warrant authentication, it will always return true.
func (*Config) RegisterHandlers ¶
RegisterHandlers registers all handlers required based on the security configuration
type OIDCConfig ¶
type OIDCConfig struct { IssuerURL string `yaml:"issuer-url"` // e.g. https://dev-12345678.okta.com RedirectURL string `yaml:"redirect-url"` // e.g. http://localhost:8080/authorization-code/callback ClientID string `yaml:"client-id"` ClientSecret string `yaml:"client-secret"` Scopes []string `yaml:"scopes"` // e.g. ["openid"] AllowedSubjects []string `yaml:"allowed-subjects"` // e.g. ["user1@example.com"]. If empty, all subjects are allowed // contains filtered or unexported fields }
OIDCConfig is the configuration for OIDC authentication
Click to show internal directories.
Click to hide internal directories.