#205: Work on supporting OpenID Connect for auth

This commit is contained in:
TwiN committed 2022-01-02 21:14:01 -05:00
1 parent 4ab5724fc1
commit be9087bee3
123 files changed
+27693 -49

No files matched your search

+15
View File
@@ -0,0 +1,15 @@
package security
// BasicConfig is the configuration for Basic authentication
type BasicConfig struct {
// Username is the name which will need to be used for a successful authentication
Username string `yaml:"username"`
// PasswordSha512Hash is the SHA512 hash of the password which will need to be used for a successful authentication
PasswordSha512Hash string `yaml:"password-sha512"`
}
// isValid returns whether the basic security configuration is valid or not
func (c *BasicConfig) isValid() bool {
return len(c.Username) > 0 && len(c.PasswordSha512Hash) == 128
}