Store IP address in JWT token

This commit is contained in:
Tobie Morgan Hitchcock 2018-03-02 11:02:47 +00:00
parent 069baf71b7
commit aebc001229
2 changed files with 4 additions and 0 deletions

View file

@ -170,6 +170,7 @@ func signinInternal(c *fibre.Context, vars map[string]interface{}) (str string,
"DB": d,
"SC": s,
"TK": "default",
"IP": c.IP().String(),
"iss": "Surreal",
"iat": time.Now().Unix(),
"nbf": time.Now().Unix(),
@ -227,6 +228,7 @@ func signinInternal(c *fibre.Context, vars map[string]interface{}) (str string,
"NS": n,
"DB": d,
"TK": "default",
"IP": c.IP().String(),
"iss": "Surreal",
"iat": time.Now().Unix(),
"nbf": time.Now().Unix(),
@ -279,6 +281,7 @@ func signinInternal(c *fibre.Context, vars map[string]interface{}) (str string,
"US": u,
"NS": n,
"TK": "default",
"IP": c.IP().String(),
"iss": "Surreal",
"iat": time.Now().Unix(),
"nbf": time.Now().Unix(),

View file

@ -169,6 +169,7 @@ func signupInternal(c *fibre.Context, vars map[string]interface{}) (str string,
"DB": d,
"SC": s,
"TK": "default",
"IP": c.IP().String(),
"iss": "Surreal",
"iat": time.Now().Unix(),
"nbf": time.Now().Unix(),