Skip to content

Commit

Permalink
enhancement/cookie-based-security-enhanced
Browse files Browse the repository at this point in the history
  • Loading branch information
rohit-zip committed Jun 1, 2024
1 parent 0ad2d61 commit 857172e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</parent>
<groupId>com.bloggios.authentication-config</groupId>
<artifactId>authentication-configuration-jar</artifactId>
<version>1.8</version>
<version>1.9</version>
<name>authentication-configuration-jar</name>
<description>authentication-configuration-jar</description>
<properties>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,11 @@ protected void doFilterInternal(HttpServletRequest request, HttpServletResponse
Optional<Cookie> cookieOptional = getCookie(request, securityConfigProperties.getCookie().getCookieName());
String cookieToken = "";
if (cookieOptional.isPresent()) {
System.err.println("Cookie Token");
cookieToken = cookieOptional.get().getValue();
} else {
Optional<Cookie> refreshCookieOptional = getCookie(request, securityConfigProperties.getCookie().getRefreshCookieName());
System.err.println("Refresh Token");
if (refreshCookieOptional.isEmpty()) {
response.setStatus(HttpStatus.UNAUTHORIZED.value());
response.setContentType("application/json");
Expand Down

0 comments on commit 857172e

Please sign in to comment.