aboutsummaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
authorNiall Sheridan <nsheridan@gmail.com>2017-04-10 14:38:14 +0100
committerNiall Sheridan <nsheridan@gmail.com>2017-04-10 14:38:14 +0100
commitfae8497fcc0977bd368cce13407a1e79abb3f1c8 (patch)
tree64ec89f61ce0d50d201686cc3c0f12723101b05d /server
parent044fae60a04c06b622554b9f2e9c5f61233355cc (diff)
obtain the username before revoking the token
Diffstat (limited to 'server')
-rw-r--r--server/rpc.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/server/rpc.go b/server/rpc.go
index ce95e96..45f84f0 100644
--- a/server/rpc.go
+++ b/server/rpc.go
@@ -53,8 +53,8 @@ func authInterceptor(ctx context.Context, req interface{}, info *grpc.UnaryServe
if !authprovider.Valid(token) {
return nil, grpc.Errorf(codes.PermissionDenied, "access denied")
}
- authprovider.Revoke(token)
ctx = context.WithValue(ctx, usernameKey, authprovider.Username(token))
+ authprovider.Revoke(token)
default:
return nil, grpc.Errorf(codes.InvalidArgument, "unknown argument")
}