File tree 1 file changed +5
-4
lines changed
1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -24,13 +24,13 @@ func Auth(authMethod Method) func(*context.Context) {
24
24
ctx .Error (http .StatusUnauthorized , "Verify" )
25
25
return
26
26
}
27
+ ctx .Doer = ar .Doer
28
+ ctx .IsSigned = ar .Doer != nil
29
+ ctx .IsBasicAuth = ar .IsBasicAuth
27
30
if ctx .Doer == nil {
28
31
// ensure the session uid is deleted
29
32
_ = ctx .Session .Delete ("uid" )
30
33
}
31
- ctx .Doer = ar .Doer
32
- ctx .IsSigned = ar .Doer != nil
33
- ctx .IsBasicAuth = ar .IsBasicAuth
34
34
}
35
35
}
36
36
@@ -41,6 +41,7 @@ func APIAuth(authMethod Method) func(*context.APIContext) {
41
41
if err != nil {
42
42
ctx .Error (http .StatusUnauthorized , "APIAuth" , err )
43
43
}
44
+ ctx .Doer = ar .Doer
44
45
ctx .IsSigned = ar .Doer != nil
45
46
ctx .IsBasicAuth = ar .IsBasicAuth
46
47
}
@@ -80,7 +81,7 @@ type VerifyOptions struct {
80
81
DisableCSRF bool
81
82
}
82
83
83
- // Checks authentication according to options
84
+ // VerifyAuthWithOptions checks authentication according to options
84
85
func VerifyAuthWithOptions (options * VerifyOptions ) func (ctx * context.Context ) {
85
86
return func (ctx * context.Context ) {
86
87
// Check prohibit login users.
You can’t perform that action at this time.
0 commit comments