Package org.apache.activemq.shiro.subject

Examples of org.apache.activemq.shiro.subject.SubjectSecurityContext


            public org.apache.shiro.mgt.SecurityManager getSecurityManager() {
                return null; //not needed in this test.
            }
        };
        SubjectConnectionReference ref = new SubjectConnectionReference(ctx, info, environment, subject);
        SubjectSecurityContext secCtx = new SubjectSecurityContext(ref);
        ctx.setSecurityContext(secCtx);
        return ctx;
    }
View Full Code Here


        };

        ConnectionContext ctx = new ConnectionContext();
        ConnectionInfo info = new ConnectionInfo();
        SubjectConnectionReference conn = new SubjectConnectionReference(ctx, info, env, subject);
        SubjectSecurityContext ssc = new SubjectSecurityContext(conn);
        ctx.setSecurityContext(ssc);

        filter.removeConnection(ctx, info, null);

        assertTrue(invoked[0]);
View Full Code Here

     * @return a new {@link org.apache.activemq.shiro.subject.SubjectSecurityContext} instance, allowing the connection's {@code Subject} and the Shiro
     *         {@link Environment} to be available to downstream security broker filters.
     */
    @Override
    public SecurityContext createSecurityContext(SubjectConnectionReference conn) {
        return new SubjectSecurityContext(conn);
    }
View Full Code Here

        } finally {
            SecurityContext secCtx = context.getSecurityContext();

            if (secCtx instanceof SubjectSecurityContext) {

                SubjectSecurityContext subjectSecurityContext = (SubjectSecurityContext) secCtx;
                Subject subject = subjectSecurityContext.getSubject();

                if (subject != null) {
                    try {
                        subject.logout();
                    } catch (Throwable t) {
View Full Code Here

TOP

Related Classes of org.apache.activemq.shiro.subject.SubjectSecurityContext

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.