org.apache.shiro.web.mgt.DefaultWebSubjectFactory Java Examples

The following examples show how to use org.apache.shiro.web.mgt.DefaultWebSubjectFactory. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: SecurityModule.java    From tapestry-security with Apache License 2.0 6 votes vote down vote up
public static void bind(final ServiceBinder binder) {
		binder.bind(WebSecurityManager.class, TapestryRealmSecurityManager.class);
		// TYNAMO-155 It's not enough to identify ModularRealmAuthenticator by it's Authenticator interface only
		// because Shiro tests if the object is an instanceof LogoutAware to call logout handlers
		binder.bind(ModularRealmAuthenticator.class);
		binder.bind(SubjectFactory.class, DefaultWebSubjectFactory.class);
		binder.bind(HttpServletRequestFilter.class, SecurityConfiguration.class).withId("SecurityConfiguration").withMarker(Security.class);
		binder.bind(ClassInterceptorsCache.class, ClassInterceptorsCacheImpl.class);
		binder.bind(SecurityService.class, SecurityServiceImpl.class);
		binder.bind(SecurityFilterChainFactory.class, SecurityFilterChainFactoryImpl.class);
		binder.bind(ComponentRequestFilter.class, SecurityComponentRequestFilter.class);
		binder.bind(SecurityFilterChainHub.class, SecurityFilterChainHubImpl.class);
//		binder.bind(ShiroExceptionHandler.class);
		binder.bind(LoginContextService.class, LoginContextServiceImpl.class);
		binder.bind(Serializer.class, SimplePrincipalSerializer.class);
	}
 
Example #2
Source File: ShiroConfig.java    From wetech-admin with MIT License 2 votes vote down vote up
/**
 * Subject工厂
 *
 * @return
 */
@Bean
public DefaultWebSubjectFactory subjectFactory() {
    return new JwtSubjectFactory();
}