@Override
    public void filter(ContainerRequestContext requestContext) throws IOException {
        if (!Boolean.TRUE.equals(requestContext.getProperty(SHIRO_WEB_JAXRS_DISABLE_PRINCIPAL_PARAM))) {
            requestContext.setSecurityContext(new ShiroSecurityContext(requestContext));
        }
    }
A {@link ContainerRequestFilter} that replaces the {@link javax.ws.rs.core.SecurityContext}
with a {@link ShiroSecurityContext}.

@since 1.4
support/jaxrs/src/main/java/org/apache/shiro/web/jaxrs/SubjectPrincipalRequestFilter.java