1
0
mirror of https://github.com/TwiN/gatus.git synced 2026-02-08 00:34:18 +00:00

Initial implementation

This commit is contained in:
tiwood
2022-03-07 21:55:40 +01:00
parent 6932edc6d0
commit 7f2f3a603a
5 changed files with 176 additions and 0 deletions

13
security/endpoint_oidc.go Normal file
View File

@@ -0,0 +1,13 @@
package security
// EndpointOIDCConfig is the configuration for endpoint OIDC authentication
type EndpointOIDCConfig struct {
IssuerURL string `yaml:"issuer-url"` // e.g. https://dev-12345678.okta.com
ClientID string `yaml:"client-id"`
ClientSecret string `yaml:"client-secret"`
Scopes []string `yaml:"scopes"` // e.g. ["openid"]
}
func (c *EndpointOIDCConfig) IsValid() bool {
return len(c.IssuerURL) > 0 && len(c.ClientID) > 0 && len(c.ClientSecret) > 0 && len(c.Scopes) > 0
}