Tabnine Logo
RealmModel$ClientRemovedEvent
Code IndexAdd Tabnine to your IDE (free)

How to use
RealmModel$ClientRemovedEvent
in
org.keycloak.models

Best Java code snippets using org.keycloak.models.RealmModel$ClientRemovedEvent (Showing top 2 results out of 315)

origin: org.keycloak/keycloak-authz-policy-common

factory.register(event -> {
  if (event instanceof ClientRemovedEvent) {
    KeycloakSession keycloakSession = ((ClientRemovedEvent) event).getKeycloakSession();
    AuthorizationProvider provider = keycloakSession.getProvider(AuthorizationProvider.class);
    StoreFactory storeFactory = provider.getStoreFactory();
    PolicyStore policyStore = storeFactory.getPolicyStore();
    ClientModel removedClient = ((ClientRemovedEvent) event).getClient();
    ResourceServerStore resourceServerStore = storeFactory.getResourceServerStore();
    ResourceServer resourceServer = resourceServerStore.findById(removedClient.getId());
origin: org.keycloak/keycloak-model-infinispan

private SessionAndKeyHolder getCacheKeyToInvalidate(ProviderEvent event) {
  if (event instanceof RealmModel.ClientUpdatedEvent) {
    RealmModel.ClientUpdatedEvent eventt = (RealmModel.ClientUpdatedEvent) event;
    String cacheKey = PublicKeyStorageUtils.getClientModelCacheKey(eventt.getUpdatedClient().getRealm().getId(), eventt.getUpdatedClient().getId());
    return new SessionAndKeyHolder(eventt.getKeycloakSession(), cacheKey);
  } else if (event instanceof RealmModel.ClientRemovedEvent) {
    RealmModel.ClientRemovedEvent eventt = (RealmModel.ClientRemovedEvent) event;
    String cacheKey = PublicKeyStorageUtils.getClientModelCacheKey(eventt.getClient().getRealm().getId(), eventt.getClient().getId());
    return new SessionAndKeyHolder(eventt.getKeycloakSession(), cacheKey);
  } else if (event instanceof RealmModel.IdentityProviderUpdatedEvent) {
    RealmModel.IdentityProviderUpdatedEvent eventt = (RealmModel.IdentityProviderUpdatedEvent) event;
    String cacheKey = PublicKeyStorageUtils.getIdpModelCacheKey(eventt.getRealm().getId(), eventt.getUpdatedIdentityProvider().getInternalId());
    return new SessionAndKeyHolder(eventt.getKeycloakSession(), cacheKey);
  } else if (event instanceof RealmModel.IdentityProviderRemovedEvent) {
    RealmModel.IdentityProviderRemovedEvent eventt = (RealmModel.IdentityProviderRemovedEvent) event;
    String cacheKey = PublicKeyStorageUtils.getIdpModelCacheKey(eventt.getRealm().getId(), eventt.getRemovedIdentityProvider().getInternalId());
    return new SessionAndKeyHolder(eventt.getKeycloakSession(), cacheKey);
  } else {
    return null;
  }
}
org.keycloak.modelsRealmModel$ClientRemovedEvent

Most used methods

  • getClient
  • getKeycloakSession

Popular in Java

  • Making http requests using okhttp
  • requestLocationUpdates (LocationManager)
  • compareTo (BigDecimal)
  • setContentView (Activity)
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • Path (java.nio.file)
  • Permission (java.security)
    Legacy security code; do not use.
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • Pattern (java.util.regex)
    Patterns are compiled regular expressions. In many cases, convenience methods such as String#matches
  • JTable (javax.swing)
  • From CI to AI: The AI layer in your organization
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now