File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
hawkbit-simple-ui/src/main/java/org/eclipse/hawkbit/ui/simple Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -59,8 +59,8 @@ public class SimpleUIApp implements AppShellConfigurator {
59
59
60
60
private static final Function <OAuth2TokenManager , RequestInterceptor > AUTHORIZATION = (oAuth2TokenManager ) -> requestTemplate -> {
61
61
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 );
64
64
requestTemplate .header ("Authorization" , "Bearer " + token );
65
65
} else {
66
66
requestTemplate .header (
You can’t perform that action at this time.
0 commit comments