aboutsummaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
Diffstat (limited to 'pkg')
-rw-r--r--pkg/atlas/config.go4
-rw-r--r--pkg/atlas/server.go8
2 files changed, 12 insertions, 0 deletions
diff --git a/pkg/atlas/config.go b/pkg/atlas/config.go
index 05bd2a6..a7cc8c2 100644
--- a/pkg/atlas/config.go
+++ b/pkg/atlas/config.go
@@ -164,6 +164,10 @@ type Config struct {
// is used if OriginEmail is provided, otherwise, "none" is used.
// - none (don't get usernames)
// - origin (get the username from the Origin API)
+ // - origin-eax (get the username from the Origin API, but fall back to EAX on failure)
+ // - origin-eax-debug (get the username from the Origin API, but also check EAX and warn if it's different)
+ // - eax (get the username from EAX)
+ // - eax-origin (get the username from EAX, but fall back to the Origin API on failure)
UsernameSource string `env:"ATLAS_USERNAMESOURCE"`
// The email address to use for Origin login. If not provided, the Origin
diff --git a/pkg/atlas/server.go b/pkg/atlas/server.go
index 8b32978..7475536 100644
--- a/pkg/atlas/server.go
+++ b/pkg/atlas/server.go
@@ -649,6 +649,14 @@ func configureUsernameSource(c *Config) (api0.UsernameSource, error) {
return api0.UsernameSourceNone, nil
case "origin":
return api0.UsernameSourceOrigin, nil
+ case "origin-eax":
+ return api0.UsernameSourceOriginEAX, nil
+ case "origin-eax-debug":
+ return api0.UsernameSourceOriginEAXDebug, nil
+ case "eax":
+ return api0.UsernameSourceEAX, nil
+ case "eax-origin":
+ return api0.UsernameSourceEAXOrigin, nil
case "":
// backwards compat
if c.OriginEmail != "" {