Package org.glassfish.security.services.config

Examples of org.glassfish.security.services.config.SecurityProvider


        // TODO - Add validation logic required for security provider attributes
        try {
            ConfigSupport.apply(new SingleConfigCode<SecurityConfiguration>() {
                @Override
                public Object run(SecurityConfiguration param) throws PropertyVetoException, TransactionFailure {
                  SecurityProvider providerConfig = param.createChild(SecurityProvider.class);
                  providerConfig.setName(name);
                  providerConfig.setType(providerType);
                  providerConfig.setProviderName(providerName);
                    param.getSecurityProviders().add(providerConfig);
                    return providerConfig;
                }
            }, securityServiceConfiguration);
        } catch (TransactionFailure transactionFailure) {
View Full Code Here


    @AccessRequired.NewChild(type=LoginModuleConfig.class)
    private SecurityProvider provider;

    @Override
    public boolean preAuthorization(AdminCommandContext context) {
        SecurityProvider provider = CLIUtil.findSecurityProvider(domain, serviceName, providerName, context.getActionReport());
        return (provider != null);
    }
View Full Code Here

      config = (org.glassfish.security.services.config.RoleMappingService) securityServiceConfiguration;
      if (config != null) {
        // Get the role mapping provider configuration
        // Consider only one provider for now and take the first provider found!
        List<SecurityProvider> providersConfig = config.getSecurityProviders();
        SecurityProvider roleProviderConfig = null;
        if (providersConfig != null) roleProviderConfig = providersConfig.get(0);
        if (roleProviderConfig != null) {
          // Get the provider
          String providerName = roleProviderConfig.getName();
          if (isDebug()) {
            logger.log(DEBUG_LEVEL, "Attempting to get Role Mapping Provider \"{0}\".", providerName );
          }
          provider = AccessController.doPrivileged(
                  new PrivilegedLookup<RoleMappingProvider>(serviceLocator, RoleMappingProvider.class, providerName) );   
View Full Code Here

        // Get the security provider config
        final SecurityConfiguration sc = findSecurityConfiguration(domain, serviceName, report);
        if (sc == null) {
            return null;
        }
        SecurityProvider provider = sc.getSecurityProviderByName(providerName);
        if (provider == null) {
            report.setMessage("Unable to locate security provider: " + providerName);
            report.setActionExitCode(ActionReport.ExitCode.FAILURE);
            return null;
        }
View Full Code Here

    @AccessRequired.NewChild(type=LoginModuleConfig.class)
    private SecurityProvider provider;

    @Override
    public boolean preAuthorization(AdminCommandContext context) {
        SecurityProvider provider = CLIUtil.findSecurityProvider(domain, serviceName, providerName, context.getActionReport());
        return (provider != null);
    }
View Full Code Here

        // TODO - Add validation logic required for security provider attributes
        try {
            ConfigSupport.apply(new SingleConfigCode<SecurityConfiguration>() {
                @Override
                public Object run(SecurityConfiguration param) throws PropertyVetoException, TransactionFailure {
                  SecurityProvider providerConfig = param.createChild(SecurityProvider.class);
                  providerConfig.setName(name);
                  providerConfig.setType(providerType);
                  providerConfig.setProviderName(providerName);
                    param.getSecurityProviders().add(providerConfig);
                    return providerConfig;
                }
            }, securityServiceConfiguration);
        } catch (TransactionFailure transactionFailure) {
View Full Code Here

        // Get the security provider config
        final SecurityConfiguration sc = findSecurityConfiguration(domain, serviceName, report);
        if (sc == null) {
            return null;
        }
        SecurityProvider provider = sc.getSecurityProviderByName(providerName);
        if (provider == null) {
            report.setMessage("Unable to locate security provider: " + providerName);
            report.setActionExitCode(ActionReport.ExitCode.FAILURE);
            return null;
        }
View Full Code Here

      config = (org.glassfish.security.services.config.RoleMappingService) securityServiceConfiguration;
      if (config != null) {
        // Get the role mapping provider configuration
        // Consider only one provider for now and take the first provider found!
        List<SecurityProvider> providersConfig = config.getSecurityProviders();
        SecurityProvider roleProviderConfig = null;
        if (providersConfig != null) roleProviderConfig = providersConfig.get(0);
        if (roleProviderConfig != null) {
          // Get the provider
          String providerName = roleProviderConfig.getName();
          if (isDebug()) {
            logger.log(DEBUG_LEVEL, "Attempting to get Role Mapping Provider \"{0}\".", providerName );
          }
          provider = AccessController.doPrivileged(
                  new PrivilededLookup<RoleMappingProvider>(serviceLocator, RoleMappingProvider.class, providerName) );   
View Full Code Here

TOP

Related Classes of org.glassfish.security.services.config.SecurityProvider

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.