Package org.apache.shiro.subject

Examples of org.apache.shiro.subject.PrincipalCollection


    protected Subject getSubject(ConnectionContext ctx) {
        return new ConnectionSubjectResolver(ctx).getSubject();
    }

    protected String toString(Subject subject) {
        PrincipalCollection pc = subject.getPrincipals();
        if (pc != null && !pc.isEmpty()) {
            return "[" + pc.toString() + "] ";
        }
        return "";
    }
View Full Code Here


        return true;
    }

    protected boolean isAnonymousAccount(Subject subject) {
        PrincipalCollection pc = subject.getPrincipals();
        return pc != null && matches(pc, anonymousAccountUsername, anonymousAccountRealmName);
    }
View Full Code Here

        PrincipalCollection pc = subject.getPrincipals();
        return pc != null && matches(pc, anonymousAccountUsername, anonymousAccountRealmName);
    }

    protected boolean isSystemAccount(Subject subject) {
        PrincipalCollection pc = subject.getPrincipals();
        return pc != null && matches(pc, systemAccountUsername, systemAccountRealmName);
    }
View Full Code Here

            return;
        }

        //The connection cannot be authenticated, potentially implying a system or anonymous connection.  Check if so:
        if (isAssumeIdentity(conn)) {
            PrincipalCollection assumedIdentity = createAssumedIdentity(conn);
            subjectBuilder.principals(assumedIdentity);
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.shiro.subject.PrincipalCollection

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.