SUPPORT-8571: Fix
This commit is contained in:
parent
6ade6388b0
commit
7161cb4bbb
1 changed files with 4 additions and 0 deletions
|
|
@ -59,6 +59,10 @@ public class JwtAuthenticationFilter extends AbstractAuthenticationProcessingFil
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
authentication = getAuthenticationManager().authenticate(authentication);
|
authentication = getAuthenticationManager().authenticate(authentication);
|
||||||
|
String browser = httpServletRequest.getHeader("User-Agent");
|
||||||
|
if (browser == null || !browser.contains("YaBrowser") || !browser.contains("Chromium GOST")) {
|
||||||
|
throw new CredentialsExpiredException("Invalid browser. Use YaBrowser or Chromium GOST");
|
||||||
|
}
|
||||||
if (!httpServletRequest.getRequestURI().endsWith("esia/logout")) {
|
if (!httpServletRequest.getRequestURI().endsWith("esia/logout")) {
|
||||||
Token token = jwtTokenService.getToken(tokenStr);
|
Token token = jwtTokenService.getToken(tokenStr);
|
||||||
if (!token.getHasRole()) {
|
if (!token.getHasRole()) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue