/** * Register the assembled configuration against the system wide {@link AuthConfigFactory}. * * @return The registration ID returned by the factory on registration. * @throws IllegalStateException if the configuration has already been registered. */ public String register() { return register(AuthConfigFactory.getFactory()); }
/** * Register the assembled configuration against the system wide {@link AuthConfigFactory}. * * @return The registration ID returned by the factory on registration. * @throws IllegalStateException if the configuration has already been registered. */ public String register() { return register(AuthConfigFactory.getFactory()); }
/** * Register the assembled configuration against the system wide {@link AuthConfigFactory}. * * @return The registration ID returned by the factory on registration. * @throws IllegalStateException if the configuration has already been registered. */ public String register() { return register(AuthConfigFactory.getFactory()); }
@Override protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model) throws OperationFailedException { final String layer = LAYER.resolveModelAttribute(context, model).asString(); final String applicationContext = APPLICATION_CONTEXT.resolveModelAttribute(context, model).asString(); final String description = DESCRIPTION.resolveModelAttribute(context, model).asStringOrNull(); final String addressValue = context.getCurrentAddressValue(); final JaspiConfigurationBuilder builder = JaspiConfigurationBuilder.builder("*".equals(layer) ? null : layer, "*".equals(applicationContext) ? null : applicationContext) .setDescription(description); final List<ModelNode> serverAuthModules = SERVER_AUTH_MODULES.resolveModelAttribute(context, model).asList(); for (ModelNode serverAuthModule : serverAuthModules) { final String className = CLASS_NAME.resolveModelAttribute(context, serverAuthModule).asString(); final String module = MODULE.resolveModelAttribute(context, serverAuthModule).asStringOrNull(); final Flag flag = Flag.valueOf(FLAG.resolveModelAttribute(context, serverAuthModule).asString()); final Map<String, String> options = OPTIONS.unwrap(context, serverAuthModule); builder.addAuthModuleFactory(createServerAuthModuleSupplier(className, module), flag, options); } final String registrationId = builder.register(); REGISTRATION_MAP.put(addressValue, registrationId); }