You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

21 lines
433 B

package handlers
import "github.com/seaweedfs/seaweedfs/weed/admin/dash"
type AuthConfig struct {
AdminUser string
AdminPassword string
OIDCAuth *dash.OIDCAuthService
}
func (c AuthConfig) LocalAuthEnabled() bool {
return c.AdminPassword != ""
}
func (c AuthConfig) OIDCAuthEnabled() bool {
return c.OIDCAuth != nil
}
func (c AuthConfig) AuthRequired() bool {
return c.LocalAuthEnabled() || c.OIDCAuthEnabled()
}