Examples of SecurityProvider


Examples of org.apache.jackrabbit.oak.spi.security.SecurityProvider

    @Before
    public void before() throws Exception {

        String importBehavior = getImportBehavior();
        SecurityProvider securityProvider;
        if (importBehavior != null) {
            Map<String, String> userParams = new HashMap();
            userParams.put(ProtectedItemImporter.PARAM_IMPORT_BEHAVIOR, getImportBehavior());
            ConfigurationParameters config = new ConfigurationParameters(ImmutableMap.of(UserConfiguration.NAME, new ConfigurationParameters(userParams)));
View Full Code Here

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

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

    @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

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

      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

Examples of org.jboss.aerogear.controller.spi.SecurityProvider

        }
        return delegate.process(routeContext);
    }

    private SecurityProvider defaultSecurityProvider() {
        return new SecurityProvider() {
            @Override
            public void isRouteAllowed(Route route) throws ServletException {
            }
        };
    }
View Full Code Here

Examples of org.mule.api.security.SecurityProvider

    public void testCustom()
    {
        Iterator providers = muleContext.getSecurityManager().getProviders().iterator();
        while (providers.hasNext())
        {
            SecurityProvider provider = (SecurityProvider) providers.next();
            logger.debug(provider);
            logger.debug(provider.getName());
        }
        knownProperties(getProvider("customProvider"));
        knownProperties(getProvider("willOverwriteName"));
    }
View Full Code Here

Examples of org.mule.api.security.SecurityProvider

       
        Collection providers = securityManager.getProviders();
        assertEquals(2, providers.size());

        Iterator providersIterator = providers.iterator();
        SecurityProvider provider = (SecurityProvider) providersIterator.next();
        assertEquals(SpringProviderAdapter.class, provider.getClass());
        assertEquals(UserAndPasswordAuthenticationProvider.class, ((SpringProviderAdapter) provider).getAuthenticationProvider().getClass());

        provider = (SecurityProvider) providersIterator.next();
        assertEquals(SpringProviderAdapter.class, provider.getClass());
        assertEquals(PreAuthenticatedAuthenticationProvider.class, ((SpringProviderAdapter) provider).getAuthenticationProvider().getClass());
    }
View Full Code Here

Examples of org.mule.api.security.SecurityProvider

        Iterator<SecurityProvider> iter = providers.values().iterator();
        Class<? extends Authentication> toTest = authentication.getClass();

        while (iter.hasNext())
        {
            SecurityProvider provider = iter.next();

            if (provider.supports(toTest))
            {
                if (logger.isDebugEnabled())
                {
                    logger.debug("Authentication attempt using " + provider.getClass().getName());
                }

                Authentication result = null;
                try
                {
                    result = provider.authenticate(authentication);
                }
                catch (Exception e)
                {
                    if (!iter.hasNext())
                    {
View Full Code Here

Examples of org.mule.api.security.SecurityProvider

        Iterator<SecurityProvider> iter = providers.values().iterator();
        Class<? extends Authentication> toTest = authentication.getClass();

        while (iter.hasNext())
        {
            SecurityProvider provider = iter.next();
            if (provider.supports(toTest))
            {
                return provider.createSecurityContext(authentication);
            }
        }
        throw new UnknownAuthenticationTypeException(authentication);
    }
View Full Code Here

Examples of org.mule.api.security.SecurityProvider

        {
            SecurityManager localManager = new MuleSecurityManager();
            String[] securityProviders = StringUtils.splitAndTrim(this.securityProviders, ",");
            for (String sp : securityProviders)
            {
                SecurityProvider provider = securityManager.getProvider(sp);
                if (provider != null)
                {
                    localManager.addProvider(provider);
                }
                else
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.