Merge pull request #1403 from dmcgowan/auth-const-keys
Update auth context keys to use constant
This commit is contained in:
commit
9b395d0789
6 changed files with 18 additions and 7 deletions
|
@ -376,7 +376,7 @@ func TestAccessController(t *testing.T) {
|
|||
t.Fatalf("accessController returned unexpected error: %s", err)
|
||||
}
|
||||
|
||||
userInfo, ok := authCtx.Value("auth.user").(auth.UserInfo)
|
||||
userInfo, ok := authCtx.Value(auth.UserKey).(auth.UserInfo)
|
||||
if !ok {
|
||||
t.Fatal("token accessController did not set auth.user context")
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue