From 45e9a5265d9ff66f7915cb364dbe540fbf349e51 Mon Sep 17 00:00:00 2001 From: Simon Esposito Date: Fri, 20 Oct 2023 14:15:36 +0100 Subject: [PATCH] Review changes --- go.sum | 8 -------- server/api_session.go | 3 ++- vendor/modules.txt | 8 -------- 3 files changed, 2 insertions(+), 17 deletions(-) diff --git a/go.sum b/go.sum index edea2d1396..2f39fca570 100644 --- a/go.sum +++ b/go.sum @@ -296,16 +296,8 @@ github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= -<<<<<<< HEAD -<<<<<<< HEAD github.com/heroiclabs/nakama-common v1.28.2-0.20231020105308-855feebe94cb h1:8/oTLaFxc+SpwZdcP0QuSXKPI/OgIvON+ATFc8vzzuk= github.com/heroiclabs/nakama-common v1.28.2-0.20231020105308-855feebe94cb/go.mod h1:Os8XeXGvHAap/p6M/8fQ3gle4eEXDGRQmoRNcPQTjXs= -======= ->>>>>>> 6a51b6bb (Add refresh token rotation support.) -======= -github.com/heroiclabs/nakama-common v1.28.1 h1:GOH8r27NBSdiBf7xjy2R/Ov7CSr9zp4DVJt9Y2LIbqg= -github.com/heroiclabs/nakama-common v1.28.1/go.mod h1:Os8XeXGvHAap/p6M/8fQ3gle4eEXDGRQmoRNcPQTjXs= ->>>>>>> e68468fe (Revert runtime token api changes) github.com/huandu/xstrings v1.3.1/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= github.com/huandu/xstrings v1.3.2/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= diff --git a/server/api_session.go b/server/api_session.go index eb9bfa6c3d..ff275a4b5f 100644 --- a/server/api_session.go +++ b/server/api_session.go @@ -73,7 +73,8 @@ func (s *ApiServer) SessionRefresh(ctx context.Context, in *api.SessionRefreshRe //session := &api.Session{Created: false, Token: token, RefreshToken: refreshToken} token, tokenExp := generateToken(s.config, tokenId, userIDStr, username, useVars) - refreshToken, _ := generateRefreshToken(s.config, tokenId, userIDStr, username, useVars) + refreshToken, refreshTokenExp := generateRefreshToken(s.config, tokenId, userIDStr, username, useVars) + s.sessionCache.Add(userID, tokenExp, tokenId, refreshTokenExp, tokenId) session := &api.Session{Created: false, Token: token, RefreshToken: refreshToken} // After hook. diff --git a/vendor/modules.txt b/vendor/modules.txt index 13780a8ea5..dedd3ed152 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -156,15 +156,7 @@ github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/internal/genopena github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options github.com/grpc-ecosystem/grpc-gateway/v2/runtime github.com/grpc-ecosystem/grpc-gateway/v2/utilities -<<<<<<< HEAD -<<<<<<< HEAD # github.com/heroiclabs/nakama-common v1.28.2-0.20231020105308-855feebe94cb -======= -# github.com/heroiclabs/nakama-common v1.28.1 => ../nakama-common ->>>>>>> 6a51b6bb (Add refresh token rotation support.) -======= -# github.com/heroiclabs/nakama-common v1.28.1 ->>>>>>> e68468fe (Revert runtime token api changes) ## explicit; go 1.19 github.com/heroiclabs/nakama-common/api github.com/heroiclabs/nakama-common/rtapi