org.apache.shiro.guice.web.ShiroWebModule Java Examples

The following examples show how to use org.apache.shiro.guice.web.ShiroWebModule. 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: ChopUiModule.java    From usergrid with Apache License 2.0 5 votes vote down vote up
protected void configureServlets() {
    install( new GuicyFigModule( ChopUiFig.class, Project.class, RestFig.class, ElasticSearchFig.class ) );
    install( new AmazonModule() );

    // Hook Jersey into Guice Servlet
    bind( GuiceContainer.class );

    bind( IElasticSearchClient.class ).to( ElasticSearchClient.class );

    // Hook Jackson into Jersey as the POJO <-> JSON mapper
    bind( JacksonJsonProvider.class ).asEagerSingleton();

    bind( UploadResource.class ).asEagerSingleton();
    bind( RunManagerResource.class ).asEagerSingleton();
    bind( TestGetResource.class ).asEagerSingleton();
    bind( AuthResource.class ).asEagerSingleton();
    bind( PropertiesResource.class ).asEagerSingleton();
    bind( RunnerCoordinator.class ).asEagerSingleton();

    ShiroWebModule.bindGuiceFilter( binder() );

    // This should be before "/*" otherwise the vaadin servlet will not work
    serve( "/VAADIN*" ).with( VaadinServlet.class );

    Map<String, String> params = new HashMap<String, String>();
    params.put( PACKAGES_KEY, getClass().getPackage().toString() );
    serve( "/*" ).with( GuiceContainer.class, params );
}
 
Example #2
Source File: DefaultServletModule.java    From opensoc-streaming with Apache License 2.0 4 votes vote down vote up
@Override
  protected void configureServlets() {
      
ShiroWebModule.bindGuiceFilter(binder());

bind( KafkaWebSocketCreator.class ).in(Singleton.class);

      bind( HttpServletDispatcher.class ).in(Singleton.class);
      serve( "/rest/*").with(HttpServletDispatcher.class);
      
      bind( KafkaMessageSenderServlet.class ).in(Singleton.class);
serve( "/ws/*").with(KafkaMessageSenderServlet.class );

bind( LoginServlet.class).in(Singleton.class);
serve( "/login" ).with( LoginServlet.class );
      
bind( LogoutServlet.class).in(Singleton.class);
serve( "/logout" ).with( LogoutServlet.class );

  }