Add auth.user.name to logging context

This commit is contained in:
Richard 2015-04-14 16:07:23 -07:00
parent e5eddbc762
commit 9898552656
2 changed files with 4 additions and 2 deletions

View file

@ -66,7 +66,7 @@ func (ac *accessController) Authorized(ctx context.Context, accessRecords ...aut
return nil, &challenge
}
return context.WithValue(ctx, "auth.user", auth.UserInfo{Name: "silly"}), nil
return auth.WithUser(ctx, auth.UserInfo{Name: "silly"}), nil
}
type challenge struct {