/** * Creates a {@code Realm} from the Ini instance containing account data. * * @param ini the Ini instance from which to acquire the account data. * @return a new Realm instance reflecting the account data discovered in the {@code Ini}. */ protected Realm createRealm(Ini ini) { //IniRealm realm = new IniRealm(ini); changed to support SHIRO-322 IniRealm realm = new IniRealm(); realm.setName(INI_REALM_NAME); realm.setIni(ini); //added for SHIRO-322 return realm; }
/** * Creates a {@code Realm} from the Ini instance containing account data. * * @param ini the Ini instance from which to acquire the account data. * @return a new Realm instance reflecting the account data discovered in the {@code Ini}. */ protected Realm createRealm(Ini ini) { //IniRealm realm = new IniRealm(ini); changed to support SHIRO-322 IniRealm realm = new IniRealm(); realm.setName(INI_REALM_NAME); realm.setIni(ini); //added for SHIRO-322 return realm; }
/** * Creates a {@code Realm} from the Ini instance containing account data. * * @param ini the Ini instance from which to acquire the account data. * @return a new Realm instance reflecting the account data discovered in the {@code Ini}. */ protected Realm createRealm(Ini ini) { IniRealm realm = new IniRealm(ini); realm.setName(INI_REALM_NAME); return realm; } }
@Override public Realm createRealm(Injector injector) { Ini ini = new Ini(); if (users != null && !users.isEmpty()) { ini.addSection("users").putAll(users); } if (roles != null && !roles.isEmpty()) { ini.addSection("roles").putAll(roles); } IniRealm realm = new IniRealm(ini); realm.setIni(ini); if (name != null) { realm.setName(name); } return realm; } }