Tabnine Logo
ShiroModule.bindSecurityManager
Code IndexAdd Tabnine to your IDE (free)

How to use
bindSecurityManager
method
in
org.apache.shiro.guice.ShiroModule

Best Java code snippets using org.apache.shiro.guice.ShiroModule.bindSecurityManager (Showing top 5 results out of 315)

origin: killbill/killbill

@Override
protected void bindSecurityManager(final AnnotatedBindingBuilder<? super SecurityManager> bind) {
  super.bindSecurityManager(bind);
  final RedisCacheConfig redisCacheConfig = new ConfigurationObjectFactory(new ConfigSource() {
    @Override
    public String getString(final String propertyName) {
      return configSource.getString(propertyName);
    }
  }).build(RedisCacheConfig.class);
  // Magic provider to configure the cache manager
  if (redisCacheConfig.isRedisCachingEnabled()) {
    bind(CacheManager.class).toProvider(RedisShiroManagerProvider.class).asEagerSingleton();
  } else {
    bind(CacheManager.class).toProvider(EhcacheShiroManagerProvider.class).asEagerSingleton();
  }
}
origin: apache/shiro

public void configure() {
  // setup security manager
  bindSecurityManager(bind(SecurityManager.class));
  bindSessionManager(bind(SessionManager.class));
  bindEnvironment(bind(Environment.class));
  bindListener(BeanTypeListener.MATCHER, new BeanTypeListener());
  bindEventBus(bind(EventBus.class));
  bindListener(Matchers.any(), new SubscribedEventTypeListener());
  bindListener(Matchers.any(), new EventBusAwareTypeListener());
  final DestroyableInjectionListener.DestroyableRegistry registry = new DestroyableInjectionListener.DestroyableRegistry() {
    public void add(Destroyable destroyable) {
      ShiroModule.this.add(destroyable);
    }
    @PreDestroy
    public void destroy() {
      ShiroModule.this.destroy();
    }
  };
  bindListener(LifecycleTypeListener.MATCHER, new LifecycleTypeListener(registry));
  expose(SecurityManager.class);
  expose(EventBus.class);
  configureShiro();
  bind(realmCollectionKey())
      .to(realmSetKey());
  bind(DestroyableInjectionListener.DestroyableRegistry.class).toInstance(registry);
  BeanTypeListener.ensureBeanTypeMapExists(binder());
}
origin: com.ning.billing/killbill-util

@Override
protected void bindSecurityManager(final AnnotatedBindingBuilder<? super SecurityManager> bind) {
  super.bindSecurityManager(bind);
  // Magic provider to configure the cache manager
  bind(CacheManager.class).toProvider(EhCacheManagerProvider.class).asEagerSingleton();
}
origin: org.kill-bill.billing/killbill-util

@Override
protected void bindSecurityManager(final AnnotatedBindingBuilder<? super SecurityManager> bind) {
  super.bindSecurityManager(bind);
  final RedisCacheConfig redisCacheConfig = new ConfigurationObjectFactory(new ConfigSource() {
    @Override
    public String getString(final String propertyName) {
      return configSource.getString(propertyName);
    }
  }).build(RedisCacheConfig.class);
  // Magic provider to configure the cache manager
  if (redisCacheConfig.isRedisCachingEnabled()) {
    bind(CacheManager.class).toProvider(RedisShiroManagerProvider.class).asEagerSingleton();
  } else {
    bind(CacheManager.class).toProvider(EhcacheShiroManagerProvider.class).asEagerSingleton();
  }
}
origin: org.apache.shiro/shiro-guice

public void configure() {
  // setup security manager
  bindSecurityManager(bind(SecurityManager.class));
  bindSessionManager(bind(SessionManager.class));
  bindEnvironment(bind(Environment.class));
  bindListener(BeanTypeListener.MATCHER, new BeanTypeListener());
  bindEventBus(bind(EventBus.class));
  bindListener(Matchers.any(), new SubscribedEventTypeListener());
  bindListener(Matchers.any(), new EventBusAwareTypeListener());
  final DestroyableInjectionListener.DestroyableRegistry registry = new DestroyableInjectionListener.DestroyableRegistry() {
    public void add(Destroyable destroyable) {
      ShiroModule.this.add(destroyable);
    }
    @PreDestroy
    public void destroy() {
      ShiroModule.this.destroy();
    }
  };
  bindListener(LifecycleTypeListener.MATCHER, new LifecycleTypeListener(registry));
  expose(SecurityManager.class);
  expose(EventBus.class);
  configureShiro();
  bind(realmCollectionKey())
      .to(realmSetKey());
  bind(DestroyableInjectionListener.DestroyableRegistry.class).toInstance(registry);
  BeanTypeListener.ensureBeanTypeMapExists(binder());
}
org.apache.shiro.guiceShiroModulebindSecurityManager

Javadoc

Binds the security manager. Override this method in order to provide your own security manager binding.

By default, a org.apache.shiro.mgt.DefaultSecurityManager is bound as an eager singleton.

Popular methods of ShiroModule

  • destroy
    Destroys all beans created within this module that implement org.apache.shiro.util.Destroyable. Shou
  • add
  • bind
  • bindEnvironment
    Binds the environment. Override this method in order to provide your own environment binding. By def
  • bindEventBus
    Binds the EventBus. Override this method in order to provide your own EventBus binding.
  • bindListener
  • bindSessionManager
    Binds the session manager. Override this method in order to provide your own session manager binding
  • binder
  • configureShiro
    Implement this method in order to configure your realms and any other Shiro customization you may ne
  • expose
  • realmCollectionKey
  • realmSetKey
  • realmCollectionKey,
  • realmSetKey

Popular in Java

  • Running tasks concurrently on multiple threads
  • getExternalFilesDir (Context)
  • getApplicationContext (Context)
  • findViewById (Activity)
  • ResultSet (java.sql)
    An interface for an object which represents a database table entry, returned as the result of the qu
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
  • Top 12 Jupyter Notebook Extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now