Package org.apache.openejb.core.security.jaas

Examples of org.apache.openejb.core.security.jaas.GroupPrincipal


        public void login(String user, String... roles) throws LoginException {
            Set<Principal> set = new HashSet<Principal>();
            set.add(new UserPrincipal(user));
            for (String role : roles) {
                set.add(new GroupPrincipal(role));
            }
            Subject subject = new Subject(true, set, Collections.EMPTY_SET, Collections.EMPTY_SET);
            UUID uuid = registerSubject(subject);
            associate(uuid);
        }
View Full Code Here


        return true;
    }

    public boolean commit() throws LoginException {
        principals.add(new UserPrincipal(user));
        principals.add(new GroupPrincipal(user));

        subject.getPrincipals().addAll(principals);

        user = null;
        return true;
View Full Code Here

        public void login(String user, String... roles) throws LoginException {
            Set<Principal> set = new HashSet<Principal>();
            set.add(new UserPrincipal(user));
            for (String role : roles) {
                set.add(new GroupPrincipal(role));
            }
            Subject subject = new Subject(true, set, Collections.EMPTY_SET, Collections.EMPTY_SET);
            UUID uuid = registerSubject(subject);
            associate(uuid);
        }
View Full Code Here

        public void login(String user, String... roles) throws LoginException {
            Set<Principal> set = new HashSet<Principal>();
            set.add(new UserPrincipal(user));
            for (String role : roles) {
                set.add(new GroupPrincipal(role));
            }
            Subject subject = new Subject(true, set, Collections.EMPTY_SET, Collections.EMPTY_SET);
            UUID uuid = registerSubject(subject);
            associate(uuid);
        }
View Full Code Here

TOP

Related Classes of org.apache.openejb.core.security.jaas.GroupPrincipal

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.