Skip to content

Commit

Permalink
Rather catch all Exceptions
Browse files Browse the repository at this point in the history
(e.g. we missed InvalidTokenException)
  • Loading branch information
Brutus5000 committed Feb 19, 2021
1 parent 655ad8e commit 1996555
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package com.faforever.api.security;

import com.faforever.api.config.FafApiProperties;
import org.springframework.security.access.AccessDeniedException;
import org.springframework.security.jwt.Jwt;
import org.springframework.security.jwt.JwtHelper;
import org.springframework.security.oauth2.common.OAuth2AccessToken;
Expand Down Expand Up @@ -69,7 +68,7 @@ public void storeAccessToken(OAuth2AccessToken token, OAuth2Authentication authe
public OAuth2AccessToken readAccessToken(String tokenValue) {
try {
return classicTokenStore.readAccessToken(tokenValue);
} catch (AccessDeniedException e) {
} catch (Exception e) {
return hydraTokenStore.readAccessToken(tokenValue);
}
}
Expand Down

0 comments on commit 1996555

Please sign in to comment.