gatus/security/endpoint_oidc.go
2022-03-07 21:55:40 +01:00

14 lines
529 B
Go

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
}