Add context options to the runtime

This commit is contained in:
Ben Toogood
2020-04-14 12:32:59 +01:00
parent 0c75a0306b
commit e17825474f
10 changed files with 112 additions and 43 deletions

View File

@@ -183,11 +183,6 @@ func AuthHandler(fn func() auth.Auth) server.HandlerWrapper {
return err
}
// Set the namespace in the context
if _, ok := metadata.Get(ctx, auth.NamespaceKey); !ok {
ctx = metadata.Set(ctx, auth.NamespaceKey, a.Options().Namespace)
}
// The user is authorised, allow the call
return h(ctx, req, rsp)
}