Skip to content

Commit

Permalink
client version upgrade + logs in session
Browse files Browse the repository at this point in the history
  • Loading branch information
aparnab93 committed Mar 7, 2022
1 parent d4f52f5 commit f751153
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<json.version>20211205</json.version>
<jedis.version>2.8.1</jedis.version>
<commons.version>1.5.0</commons.version>
<fdk-client.version>v0.0.16-SNAPSHOT</fdk-client.version>
<fdk-client.version>v0.0.17-SNAPSHOT</fdk-client.version>
<logging.version>3.9.0</logging.version>
<okhttp.version>3.0.0-RC1</okhttp.version>
</properties>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import com.fynd.extension.session.Session;
import com.fynd.extension.session.SessionStorage;
import com.fynd.extension.utils.ExtensionContext;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.stereotype.Component;
Expand All @@ -23,6 +24,7 @@
import static com.fynd.extension.utils.ExtensionContext.Keys.FDK_SESSION;

@Component
@Slf4j
public class SessionInterceptor implements HandlerInterceptor {

@Autowired
Expand All @@ -33,6 +35,7 @@ public boolean preHandle(HttpServletRequest request, HttpServletResponse respons
Session fdkSession = null;
String companyId = !StringUtils.isEmpty(request.getHeader(X_COMPANY_ID)) ? request.getHeader(
X_COMPANY_ID) : request.getParameter(COMPANY_ID);
log.info("Company ID : " + companyId);
if (!StringUtils.isEmpty(companyId)) {
String compCookieName = FdkConstants.SESSION_COOKIE_NAME + "_" + companyId;
Optional<Cookie> sessionCookie = Arrays.stream(request.getCookies())
Expand Down

0 comments on commit f751153

Please sign in to comment.