@Test public void testIniFile() { IniRealm realm = new IniRealm(); realm.setResourcePath("classpath:org/apache/shiro/realm/text/IniRealmTest.simple.ini"); realm.init(); assertTrue(realm.roleExists("admin")); UsernamePasswordToken token = new UsernamePasswordToken("user1", "user1"); AuthenticationInfo info = realm.getAuthenticationInfo(token); assertNotNull(info); assertTrue(realm.hasRole(info.getPrincipals(), "admin")); }
public void setResourcePath(String resourcePath) { this.resourcePath = resourcePath; }
IniRealm extends TextConfigurationRealm { public void setResourcePath(String resourcePath) { this.resourcePath = resourcePath; } }
IniRealm extends TextConfigurationRealm { public void setResourcePath(String resourcePath) { this.resourcePath = resourcePath; } IniRealm();  IniRealm(Ini ini);  IniRealm(String resourcePath); }
IniRealm extends TextConfigurationRealm { public void setResourcePath(String resourcePath) { this.resourcePath = resourcePath; } IniRealm();  IniRealm(Ini ini);  IniRealm(String resourcePath); String getResourcePath(); void setResourcePath(String resourcePath); Ini getIni(); void setIni(Ini ini); }
IniRealm extends TextConfigurationRealm { public void setResourcePath(String resourcePath) { this.resourcePath = resourcePath; } IniRealm();  IniRealm(Ini ini);  IniRealm(String resourcePath); String getResourcePath(); void setResourcePath(String resourcePath); Ini getIni(); void setIni(Ini ini); static final String USERS_SECTION_NAME; static final String ROLES_SECTION_NAME; }