Store IP address in JWT token
This commit is contained in:
parent
069baf71b7
commit
aebc001229
2 changed files with 4 additions and 0 deletions
|
@ -170,6 +170,7 @@ func signinInternal(c *fibre.Context, vars map[string]interface{}) (str string,
|
||||||
"DB": d,
|
"DB": d,
|
||||||
"SC": s,
|
"SC": s,
|
||||||
"TK": "default",
|
"TK": "default",
|
||||||
|
"IP": c.IP().String(),
|
||||||
"iss": "Surreal",
|
"iss": "Surreal",
|
||||||
"iat": time.Now().Unix(),
|
"iat": time.Now().Unix(),
|
||||||
"nbf": time.Now().Unix(),
|
"nbf": time.Now().Unix(),
|
||||||
|
@ -227,6 +228,7 @@ func signinInternal(c *fibre.Context, vars map[string]interface{}) (str string,
|
||||||
"NS": n,
|
"NS": n,
|
||||||
"DB": d,
|
"DB": d,
|
||||||
"TK": "default",
|
"TK": "default",
|
||||||
|
"IP": c.IP().String(),
|
||||||
"iss": "Surreal",
|
"iss": "Surreal",
|
||||||
"iat": time.Now().Unix(),
|
"iat": time.Now().Unix(),
|
||||||
"nbf": time.Now().Unix(),
|
"nbf": time.Now().Unix(),
|
||||||
|
@ -279,6 +281,7 @@ func signinInternal(c *fibre.Context, vars map[string]interface{}) (str string,
|
||||||
"US": u,
|
"US": u,
|
||||||
"NS": n,
|
"NS": n,
|
||||||
"TK": "default",
|
"TK": "default",
|
||||||
|
"IP": c.IP().String(),
|
||||||
"iss": "Surreal",
|
"iss": "Surreal",
|
||||||
"iat": time.Now().Unix(),
|
"iat": time.Now().Unix(),
|
||||||
"nbf": time.Now().Unix(),
|
"nbf": time.Now().Unix(),
|
||||||
|
|
|
@ -169,6 +169,7 @@ func signupInternal(c *fibre.Context, vars map[string]interface{}) (str string,
|
||||||
"DB": d,
|
"DB": d,
|
||||||
"SC": s,
|
"SC": s,
|
||||||
"TK": "default",
|
"TK": "default",
|
||||||
|
"IP": c.IP().String(),
|
||||||
"iss": "Surreal",
|
"iss": "Surreal",
|
||||||
"iat": time.Now().Unix(),
|
"iat": time.Now().Unix(),
|
||||||
"nbf": time.Now().Unix(),
|
"nbf": time.Now().Unix(),
|
||||||
|
|
Loading…
Reference in a new issue