/** * @see javax.security.auth.message.config.AuthConfigFactory#getRegistrationIDs(javax.security.auth.message.config.AuthConfigProvider) */ @Override public String[] getRegistrationIDs(AuthConfigProvider provider) { List<String> registrationIDs = new ArrayList<>(); synchronized (layerContextRegistration) { if (provider != null) { for (Registration current : layerContextRegistration.values()) { if (provider.equals(current.authConfigProvider)) { registrationIDs.add(current.registrationId); } } } else { for (Registration current : layerContextRegistration.values()) { if (current.activeRegistration()) { // The registration may exist just to hold listeners. registrationIDs.add(current.registrationId); } } } } return registrationIDs.toArray(new String[registrationIDs.size()]); }
boolean matchesRegistration(final String layer, final String appContext) { synchronized (layerContextRegistration) { // Step 1 - Exact Match Registration registration = layerContextRegistration.get(new LayerContextKey(layer, appContext)); if (registration != null && registration.activeRegistration()) { return true; } // Step 2 - appContext only registration = layerContextRegistration.get(new LayerContextKey(null, appContext)); if (registration != null && registration.activeRegistration()) { return true; } // Step 3 - layer only registration = layerContextRegistration.get(new LayerContextKey(layer, null)); if (registration != null && registration.activeRegistration()) { return true; } // Step 4 - No appContext or layer registration = layerContextRegistration.get(new LayerContextKey(null, null)); if (registration != null && registration.activeRegistration()) { return true; } } return false; }
registration.addListener(listener); if (registration.activeRegistration()) { return registration.authConfigProvider; if (registration != null && registration.activeRegistration()) { return registration.authConfigProvider; if (registration != null && registration.activeRegistration()) { return registration.authConfigProvider; if (registration != null && registration.activeRegistration()) { return registration.authConfigProvider;
registration.addListener(listener); if (registration.activeRegistration()) { return registration.authConfigProvider; if (registration != null && registration.activeRegistration()) { return registration.authConfigProvider; if (registration != null && registration.activeRegistration()) { return registration.authConfigProvider; if (registration != null && registration.activeRegistration()) { return registration.authConfigProvider;
registration.addListener(listener); if (registration.activeRegistration()) { return registration.authConfigProvider; if (registration != null && registration.activeRegistration()) { return registration.authConfigProvider; if (registration != null && registration.activeRegistration()) { return registration.authConfigProvider; if (registration != null && registration.activeRegistration()) { return registration.authConfigProvider;
boolean matchesRegistration(final String layer, final String appContext) { synchronized (layerContextRegistration) { // Step 1 - Exact Match Registration registration = layerContextRegistration.get(new LayerContextKey(layer, appContext)); if (registration != null && registration.activeRegistration()) { return true; } // Step 2 - appContext only registration = layerContextRegistration.get(new LayerContextKey(null, appContext)); if (registration != null && registration.activeRegistration()) { return true; } // Step 3 - layer only registration = layerContextRegistration.get(new LayerContextKey(layer, null)); if (registration != null && registration.activeRegistration()) { return true; } // Step 4 - No appContext or layer registration = layerContextRegistration.get(new LayerContextKey(null, null)); if (registration != null && registration.activeRegistration()) { return true; } } return false; }
/** * @see javax.security.auth.message.config.AuthConfigFactory#getRegistrationIDs(javax.security.auth.message.config.AuthConfigProvider) */ @Override public String[] getRegistrationIDs(AuthConfigProvider provider) { List<String> registrationIDs = new ArrayList<>(); synchronized (layerContextRegistration) { if (provider != null) { for (Registration current : layerContextRegistration.values()) { if (provider.equals(current.authConfigProvider)) { registrationIDs.add(current.registrationId); } } } else { for (Registration current : layerContextRegistration.values()) { if (current.activeRegistration()) { // The registration may exist just to hold listeners. registrationIDs.add(current.registrationId); } } } } return registrationIDs.toArray(new String[registrationIDs.size()]); }
/** * @see javax.security.auth.message.config.AuthConfigFactory#getRegistrationIDs(javax.security.auth.message.config.AuthConfigProvider) */ @Override public String[] getRegistrationIDs(AuthConfigProvider provider) { List<String> registrationIDs = new ArrayList<>(); synchronized (layerContextRegistration) { if (provider != null) { for (Registration current : layerContextRegistration.values()) { if (provider.equals(current.authConfigProvider)) { registrationIDs.add(current.registrationId); } } } else { for (Registration current : layerContextRegistration.values()) { if (current.activeRegistration()) { // The registration may exist just to hold listeners. registrationIDs.add(current.registrationId); } } } } return registrationIDs.toArray(new String[registrationIDs.size()]); }
boolean matchesRegistration(final String layer, final String appContext) { synchronized (layerContextRegistration) { // Step 1 - Exact Match Registration registration = layerContextRegistration.get(new LayerContextKey(layer, appContext)); if (registration != null && registration.activeRegistration()) { return true; } // Step 2 - appContext only registration = layerContextRegistration.get(new LayerContextKey(null, appContext)); if (registration != null && registration.activeRegistration()) { return true; } // Step 3 - layer only registration = layerContextRegistration.get(new LayerContextKey(layer, null)); if (registration != null && registration.activeRegistration()) { return true; } // Step 4 - No appContext or layer registration = layerContextRegistration.get(new LayerContextKey(null, null)); if (registration != null && registration.activeRegistration()) { return true; } } return false; }
RegistrationContext toRegistrationContext() { // We return a new instance to avoid state changes being detected by stale references. return activeRegistration() ? new ElytronRegistrationContext(messageLayer, appContext, description, persistent) : null; }
RegistrationContext toRegistrationContext() { // We return a new instance to avoid state changes being detected by stale references. return activeRegistration() ? new ElytronRegistrationContext(messageLayer, appContext, description, persistent) : null; }
RegistrationContext toRegistrationContext() { // We return a new instance to avoid state changes being detected by stale references. return activeRegistration() ? new ElytronRegistrationContext(messageLayer, appContext, description, persistent) : null; }