Package org.apache.shiro.config

Examples of org.apache.shiro.config.IniSecurityManagerFactory


        assertThat(authOrAuth.isVisibleInAnyRole(cancelOrderIdentifier), is(false));
    }

    @Test
    public void vetoing() throws Exception {
        Factory<SecurityManager> factory = new IniSecurityManagerFactory("classpath:shiro.ini");
        SecurityManager securityManager = factory.getInstance();
        SecurityUtils.setSecurityManager(securityManager);

        AuthenticationRequest ar = new AuthenticationRequestPassword("darkhelmet", "ludicrousspeed");
        authOrAuth.authenticate(ar, null);
View Full Code Here


    }

   
    @Test
    public void vetoingOverridden() throws Exception {
        Factory<SecurityManager> factory = new IniSecurityManagerFactory("classpath:shiro.ini");
        SecurityManager securityManager = factory.getInstance();
        SecurityUtils.setSecurityManager(securityManager);

        AuthenticationRequest ar = new AuthenticationRequestPassword("lonestarr", "vespa");
        authOrAuth.authenticate(ar, null);
       
View Full Code Here

            this.objects.putAll(objects);
        }
    }

    private Map<String, ?> createObjects(Ini ini) {
        IniSecurityManagerFactory factory = new IniSecurityManagerFactory(ini) {

            @Override
            protected SecurityManager createDefaultInstance() {
                return new DefaultActiveMqSecurityManager();
            }

            @Override
            protected Realm createRealm(Ini ini) {
                IniRealm realm = (IniRealm)super.createRealm(ini);
                realm.setPermissionResolver(new ActiveMQPermissionResolver());
                return realm;
            }
        };
        factory.getInstance(); //trigger beans creation
        return factory.getBeans();
    }
View Full Code Here

        alwaysReauthenticate = true;
    }  
   
    public ShiroSecurityPolicy(String iniResourcePath) {
        this();
        Factory<SecurityManager> factory = new IniSecurityManagerFactory(iniResourcePath);
        securityManager = factory.getInstance();
        SecurityUtils.setSecurityManager(securityManager);
    }
View Full Code Here

        SecurityUtils.setSecurityManager(securityManager);
    }
   
    public ShiroSecurityPolicy(Ini ini) {
        this();
        Factory<SecurityManager> factory = new IniSecurityManagerFactory(ini);
        securityManager = factory.getInstance();
        SecurityUtils.setSecurityManager(securityManager);
    }
View Full Code Here

        alwaysReauthenticate = true;
    }  
   
    public ShiroSecurityPolicy(String iniResourcePath) {
        this();
        Factory<SecurityManager> factory = new IniSecurityManagerFactory(iniResourcePath);
        securityManager = (SecurityManager) factory.getInstance();
        SecurityUtils.setSecurityManager(securityManager);
    }
View Full Code Here

        SecurityUtils.setSecurityManager(securityManager);
    }
   
    public ShiroSecurityPolicy(Ini ini) {
        this();
        Factory<SecurityManager> factory = new IniSecurityManagerFactory(ini);
        securityManager = (SecurityManager) factory.getInstance();
        SecurityUtils.setSecurityManager(securityManager);
    }
View Full Code Here

TOP

Related Classes of org.apache.shiro.config.IniSecurityManagerFactory

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.