From d70d063797911c86cf9183bbae800a4ee0ab2d2a Mon Sep 17 00:00:00 2001 From: Tobie Morgan Hitchcock Date: Fri, 2 Mar 2018 11:03:19 +0000 Subject: [PATCH] Make JWT token values available to scope CONNECT query --- web/auth.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/web/auth.go b/web/auth.go index 475047b2..db9c2f54 100644 --- a/web/auth.go +++ b/web/auth.go @@ -354,7 +354,9 @@ func checkBearer(c *fibre.Context, info string, callback func() error) (err erro c.Set(varKeyAuth, &cnf.Auth{Kind: cnf.AuthDB}) - qvars := map[string]interface{}{"id": auth.Data} + qvars := map[string]interface{}{ + "id": auth.Data, "token": vars, + } query := &sql.Query{Statements: []sql.Statement{exp.Expr}}