Skip to content

Commit

Permalink
NPE
Browse files Browse the repository at this point in the history
  • Loading branch information
dukbong committed Apr 27, 2024
1 parent 19f0aa2 commit 6571d94
Showing 1 changed file with 1 addition and 3 deletions.
Expand Up @@ -95,9 +95,7 @@ public Mono<Void> removeAuthorizedClient(String clientRegistrationId, Authentica
}

private Map<String, OAuth2AuthorizedClient> getAuthorizedClients(WebSession session) {
if (session == null) {
return new HashMap<>();
}
Assert.notNull(session, "WebSession cannot be null. Ensure the session is properly initialized before accessing authorized clients.");
Map<String, OAuth2AuthorizedClient> authorizedClients = session.getAttribute(this.sessionAttributeName);
return authorizedClients != null ? authorizedClients : new HashMap<>();
}
Expand Down

0 comments on commit 6571d94

Please sign in to comment.