Package org.apache.shiro.realm

Examples of org.apache.shiro.realm.AuthorizingRealm


        new SimpleAccountRealm();
    }

    @Test(expected = UnsupportedTokenException.class)
    public void beforeAttemptRealmDoesntSupportToken() {
        Realm notSupportingRealm = new AuthorizingRealm() {

            public boolean supports(AuthenticationToken token) {
                return false;
            }
View Full Code Here


    JSON realmsJSON = config.getJSON("realms");

    Iterable beans = manager.resolveBeans(AuthorizingRealm.class);
    for (Object bean : beans) {
      Object instance = manager.createContext(bean);
      AuthorizingRealm realm = AuthorizingRealm.class.cast(manager.getInstance(bean, instance));
      JSON realmJSON = realmsJSON.getJSON(realm.getClass().getName());
      if (realmJSON != null) {
        if (realmJSON.get("name") != null) {
          realm.setName(realmJSON.getString("name"));
        }

        Collection<Realm> realms = ((RealmSecurityManager)currentManager).getRealms();
        if (realms == null) {
          ((RealmSecurityManager)currentManager).setRealm(realm);
View Full Code Here

TOP

Related Classes of org.apache.shiro.realm.AuthorizingRealm

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.