Skip to content

Commit

Permalink
Fire OIDC event when server not available
Browse files Browse the repository at this point in the history
  • Loading branch information
michalvavrik committed Dec 16, 2023
1 parent 1c5af65 commit 8811efc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/src/main/asciidoc/security-customization.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -669,7 +669,7 @@ public class SecurityEventObserver {
void observeAuthorizationSuccess(@ObservesAsync AuthorizationSuccessEvent event) {
String principalName = getPrincipalName(event);
if (principalName != null) {
LOG.debugf("User '%s' has been authorized successfully", event.getSecurityIdentity().getPrincipal().getName());
LOG.debugf("User '%s' has been authorized successfully", principalName);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -495,12 +495,11 @@ public OidcConfigurationMetadata apply(JsonObject json) {

@Override
public Uni<OidcProviderClient> apply(OidcConfigurationMetadata metadata, Throwable t) {
String tenantId = oidcConfig.tenantId.orElse(DEFAULT_TENANT_ID);
if (t != null) {
client.close();
return Uni.createFrom().failure(
toOidcException(t, authServerUriString, oidcConfig.tenantId.orElse(DEFAULT_TENANT_ID)));
return Uni.createFrom().failure(toOidcException(t, authServerUriString, tenantId));
}
String tenantId = oidcConfig.tenantId.orElse(DEFAULT_TENANT_ID);
if (shouldFireOidcServerAvailableEvent(tenantId)) {
fireOidcServerAvailableEvent(authServerUriString, tenantId);
}
Expand Down

0 comments on commit 8811efc

Please sign in to comment.