diff options
Diffstat (limited to 'services/auth/basic.go')
-rw-r--r-- | services/auth/basic.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/services/auth/basic.go b/services/auth/basic.go index d7f889cbdc..9cfbd0f644 100644 --- a/services/auth/basic.go +++ b/services/auth/basic.go @@ -23,6 +23,9 @@ var ( _ Named = &Basic{} ) +// BasicMethodName is the constant name of the basic authentication method +const BasicMethodName = "basic" + // Basic implements the Auth interface and authenticates requests (API requests // only) by looking for Basic authentication data or "x-oauth-basic" token in the "Authorization" // header. @@ -31,7 +34,7 @@ type Basic struct { // Name represents the name of auth method func (b *Basic) Name() string { - return "basic" + return BasicMethodName } // Verify extracts and validates Basic data (username and password/token) from the |