Package org.jboss.security.config

Examples of org.jboss.security.config.ApplicationPolicyRegistration


    @Override
    public void start(StartContext context) throws StartException {
        if (log.isDebugEnabled())
            log.debug("Starting SecurityDomainService(" + name + ")");
        if (applicationPolicy != null) {
            final ApplicationPolicyRegistration applicationPolicyRegistration = (ApplicationPolicyRegistration) configurationValue
                    .getValue();
            applicationPolicyRegistration.addApplicationPolicy(applicationPolicy.getName(), applicationPolicy);
        }
        final JNDIBasedSecurityManagement securityManagement = (JNDIBasedSecurityManagement) securityManagementValue.getValue();
        Object cacheFactory = null;
        if ("infinispan".equals(cacheType)) {
            cacheFactory = cacheManagerValue.getValue();
View Full Code Here


    @Override
    public void stop(StopContext context) {
        final JNDIBasedSecurityManagement securityManagement = (JNDIBasedSecurityManagement) securityManagementValue.getValue();
        securityManagement.removeSecurityDomain(name);
        // TODO clear auth cache?
        final ApplicationPolicyRegistration applicationPolicyRegistration = (ApplicationPolicyRegistration) configurationValue
                .getValue();
        applicationPolicyRegistration.removeApplicationPolicy(name);
    }
View Full Code Here

        if (context.getRuntimeContext() != null) {
            context.getRuntimeContext().setRuntimeTask(new RuntimeTask() {
                @Override
                public void execute(RuntimeTaskContext context) throws OperationFailedException {
                    // add parsed security domain to the Configuration
                    final ApplicationPolicyRegistration loginConfig = getConfiguration(context.getServiceRegistry());
                    loginConfig.addApplicationPolicy(applicationPolicy.getName(), applicationPolicy);
                    resultHandler.handleResultComplete();
                }
            });
        } else {
            resultHandler.handleResultComplete();
View Full Code Here

                public void execute(RuntimeTaskContext context) throws OperationFailedException {
                    // remove security domain
                    final ServiceController<?> jaasConfigurationService = context.getServiceRegistry().getService(
                            JaasConfigurationService.SERVICE_NAME);
                    if (jaasConfigurationService != null) {
                        ApplicationPolicyRegistration config = (ApplicationPolicyRegistration) jaasConfigurationService.getValue();
                        config.removeApplicationPolicy(securityDomain);
                    }
                    resultHandler.handleResultComplete();
                }
            });
        } else {
View Full Code Here

    /** {@inheritDoc} */
    @Override
    public void start(StartContext context) throws StartException {
        log.debugf("Starting SecurityDomainService(" + name + ")");
        if (applicationPolicy != null) {
            final ApplicationPolicyRegistration applicationPolicyRegistration = (ApplicationPolicyRegistration) configurationValue
                    .getValue();
            applicationPolicyRegistration.addApplicationPolicy(applicationPolicy.getName(), applicationPolicy);
        }
        final JNDIBasedSecurityManagement securityManagement = (JNDIBasedSecurityManagement) securityManagementValue.getValue();
        AuthenticationCacheFactory cacheFactory = null;
        if ("infinispan".equals(cacheType)) {
            cacheFactory = new InfinispanAuthenticationCacheFactory(cacheManagerValue.getValue(), name);
View Full Code Here

    public void stop(StopContext context) {
        log.debug("Stopping security domain service " + name);
        final JNDIBasedSecurityManagement securityManagement = (JNDIBasedSecurityManagement) securityManagementValue.getValue();
        securityManagement.removeSecurityDomain(name);
        // TODO clear auth cache?
        final ApplicationPolicyRegistration applicationPolicyRegistration = (ApplicationPolicyRegistration) configurationValue
                .getValue();
        applicationPolicyRegistration.removeApplicationPolicy(name);
    }
View Full Code Here

    /** {@inheritDoc} */
    @Override
    public void start(StartContext context) throws StartException {
        log.debugf("Starting SecurityDomainService(" + name + ")");
        if (applicationPolicy != null) {
            final ApplicationPolicyRegistration applicationPolicyRegistration = (ApplicationPolicyRegistration) configurationValue
                    .getValue();
            applicationPolicyRegistration.addApplicationPolicy(applicationPolicy.getName(), applicationPolicy);
        }
        final JNDIBasedSecurityManagement securityManagement = (JNDIBasedSecurityManagement) securityManagementValue.getValue();
        Object cacheFactory = null;
        if ("infinispan".equals(cacheType)) {
            cacheFactory = cacheManagerValue.getValue();
View Full Code Here

    public void stop(StopContext context) {
        log.debug("Stopping security domain service " + name);
        final JNDIBasedSecurityManagement securityManagement = (JNDIBasedSecurityManagement) securityManagementValue.getValue();
        securityManagement.removeSecurityDomain(name);
        // TODO clear auth cache?
        final ApplicationPolicyRegistration applicationPolicyRegistration = (ApplicationPolicyRegistration) configurationValue
                .getValue();
        applicationPolicyRegistration.removeApplicationPolicy(name);
    }
View Full Code Here

   {
      // create the application policy using the information from the beans and push it to the security layer.
      ApplicationPolicy policy = this.getApplicationPolicy();
      logger.trace("ApplicationPolicy " + this.name + " created " + policy);

      ApplicationPolicyRegistration policyRegistration = XMLLoginConfigImpl.getInstance();
      policyRegistration.addApplicationPolicy(this.name, policy);

      logger.trace("ApplicationPolicy " + this.name + " registered");
   }
View Full Code Here

    @Override
    public void start(StartContext context) throws StartException {
        if (log.isDebugEnabled())
            log.debug("Starting SecurityDomainService(" + name + ")");
        if (applicationPolicy != null) {
            final ApplicationPolicyRegistration applicationPolicyRegistration = (ApplicationPolicyRegistration) configurationValue
                    .getValue();
            applicationPolicyRegistration.addApplicationPolicy(applicationPolicy.getName(), applicationPolicy);
        }
        final JNDIBasedSecurityManagement securityManagement = (JNDIBasedSecurityManagement) securityManagementValue.getValue();
        Object cacheFactory = null;
        if ("infinispan".equals(cacheType)) {
            cacheFactory = cacheManagerValue.getValue();
View Full Code Here

TOP

Related Classes of org.jboss.security.config.ApplicationPolicyRegistration

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.