diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/context/api.go | 2 | ||||
-rw-r--r-- | modules/context/context.go | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/modules/context/api.go b/modules/context/api.go index c978835af8..07ceeeea15 100644 --- a/modules/context/api.go +++ b/modules/context/api.go @@ -245,7 +245,7 @@ func APIAuth(authMethod auth.Method) func(*APIContext) { // Get user from session if logged in. ctx.User = authMethod.Verify(ctx.Req, ctx.Resp, ctx, ctx.Session) if ctx.User != nil { - ctx.IsBasicAuth = ctx.Data["AuthedMethod"].(string) == new(auth.Basic).Name() + ctx.IsBasicAuth = ctx.Data["AuthedMethod"].(string) == auth.BasicMethodName ctx.IsSigned = true ctx.Data["IsSigned"] = ctx.IsSigned ctx.Data["SignedUser"] = ctx.User diff --git a/modules/context/context.go b/modules/context/context.go index 8adf1f306b..1ea53c7d3b 100644 --- a/modules/context/context.go +++ b/modules/context/context.go @@ -614,7 +614,7 @@ func Auth(authMethod auth.Method) func(*Context) { return func(ctx *Context) { ctx.User = authMethod.Verify(ctx.Req, ctx.Resp, ctx, ctx.Session) if ctx.User != nil { - ctx.IsBasicAuth = ctx.Data["AuthedMethod"].(string) == new(auth.Basic).Name() + ctx.IsBasicAuth = ctx.Data["AuthedMethod"].(string) == auth.BasicMethodName ctx.IsSigned = true ctx.Data["IsSigned"] = ctx.IsSigned ctx.Data["SignedUser"] = ctx.User |