Skip to content

Commit 66938d9

Browse files
committed
remove principal oidc check
1 parent 6d691e2 commit 66938d9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

hawkbit-simple-ui/src/main/java/org/eclipse/hawkbit/ui/simple/SimpleUIApp.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ public class SimpleUIApp implements AppShellConfigurator {
5959

6060
private static final Function<OAuth2TokenManager, RequestInterceptor> AUTHORIZATION = (oAuth2TokenManager) -> requestTemplate -> {
6161
final Authentication authentication = SecurityContextHolder.getContext().getAuthentication();
62-
if (authentication.getPrincipal() instanceof OidcUser) {
63-
var token = oAuth2TokenManager.getToken((OAuth2AuthenticationToken) authentication);
62+
if (authentication instanceof OAuth2AuthenticationToken authenticationToken) {
63+
var token = oAuth2TokenManager.getToken(authenticationToken);
6464
requestTemplate.header("Authorization", "Bearer " + token);
6565
} else {
6666
requestTemplate.header(

0 commit comments

Comments
 (0)