This works for my custom shiro filter: // cast to lower case because ActiveDirectoryRealm cannot match upper case realm names String principal = context.getSrcName().toString().toLowerCase(); PrincipalCollection principals = new SimplePrincipalCollection(principal, getRealmName()); WebSubject.Builder builder = new WebSubject.Builder(request, response); builder.principals(principals).authenticated(true); WebSubject webSubject = builder.buildWebSubject(); ThreadContext.bind(webSubject);
-- View this message in context: http://shiro-user.582556.n2.nabble.com/How-to-bind-the-Subject-created-manually-into-ThreadContext-in-WebEnvironment-tp7579455p7579466.html Sent from the Shiro User mailing list archive at Nabble.com.
