Package org.apache.shiro.authz

Examples of org.apache.shiro.authz.Permission


        DestinationInfo info = new DestinationInfo(null, DestinationInfo.REMOVE_OPERATION_TYPE, dest);

        Subject subject = new PermsSubject() {
            @Override
            public boolean isPermitted(Permission toCheck) {
                Permission assigned = createPerm("topic:myTopic:remove");
                assertEquals(assigned.toString(), toCheck.toString());
                return assigned.implies(toCheck);
            }
        };

        ConnectionContext context = createContext(subject);
View Full Code Here


        ActiveMQDestination dest = new ActiveMQTopic(name);

        Subject subject = new PermsSubject() {
            @Override
            public boolean isPermitted(Permission toCheck) {
                Permission assigned = createPerm("topic:myTopic:remove");
                assertEquals(assigned.toString(), toCheck.toString());
                return assigned.implies(toCheck);
            }
        };

        ConnectionContext context = createContext(subject);
View Full Code Here

        ActiveMQDestination dest = new ActiveMQTopic(name);

        Subject subject = new PermsSubject() {
            @Override
            public boolean isPermitted(Permission toCheck) {
                Permission assigned = createPerm("topic:myTopic:read");
                assertEquals(assigned.toString(), toCheck.toString());
                return assigned.implies(toCheck);
            }
        };

        ConnectionContext context = createContext(subject);
        ConsumerInfo info = new ConsumerInfo(null);
View Full Code Here

        ActiveMQDestination dest = new ActiveMQTopic(name);

        Subject subject = new PermsSubject() {
            @Override
            public boolean isPermitted(Permission toCheck) {
                Permission assigned = createPerm("topic:myTopic:write");
                assertEquals(assigned.toString(), toCheck.toString());
                return assigned.implies(toCheck);
            }
        };

        ConnectionContext context = createContext(subject);
        ProducerInfo info = new ProducerInfo(null);
View Full Code Here

        message.setText("Hello, world!");

        Subject subject = new PermsSubject() {
            @Override
            public boolean isPermitted(Permission toCheck) {
                Permission assigned = createPerm("topic:myTopic:write");
                assertEquals(assigned.toString(), toCheck.toString());
                return assigned.implies(toCheck);
            }
        };

        ConnectionContext context = createContext(subject);
        ProducerBrokerExchange exchange = new ProducerBrokerExchange();
View Full Code Here

                set.addAll(perms);
            }
        } else {
            set = new HashSet<Permission>(1);
            String permString = createPermissionString(dest, verb);
            Permission perm = createPermission(permString);
            set.add(perm);
        }

        return set;
    }
View Full Code Here

        failureEndpoint.assertIsSatisfied();
    }
   
    protected RouteBuilder createRouteBuilder() throws Exception {
        List<Permission> permissionsList = new ArrayList<Permission>();
        Permission permission = new WildcardPermission("zone1:readwrite:*");
        permissionsList.add(permission);
       
        final ShiroSecurityPolicy securityPolicy = new ShiroSecurityPolicy("src/test/resources/securityconfig.ini", passPhrase, true, permissionsList);
       
        return new RouteBuilder() {
View Full Code Here

TOP

Related Classes of org.apache.shiro.authz.Permission

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.