List of usage examples for org.apache.shiro.realm.text IniRealm IniRealm
public IniRealm()
From source file:waffle.shiro.dynamic.DynamicAuthenticationStrategyTest.java
License:Open Source License
public void testAfterAttempt() throws Exception { final Realm otherRealm = new IniRealm(); dynamicAuthenticationStrategy.afterAttempt(otherRealm, null, null, null, new RuntimeException()); final AuthenticationInProgressException authInProgressException = new AuthenticationInProgressException(); dynamicAuthenticationStrategy.afterAttempt(otherRealm, null, null, null, authInProgressException); try {/*from w w w.j av a2s. c om*/ dynamicAuthenticationStrategy.afterAttempt(new NegotiateAuthenticationRealm(), null, null, null, authInProgressException); fail(); } catch (AuthenticationInProgressException e) { // this is expected } }
From source file:waffle.shiro.negotiate.NegotiateAuthenticationStrategyTest.java
License:Open Source License
/** * Test after attempt./*from w ww . ja v a2 s . c om*/ * * @throws Exception * the exception */ @Test(expected = AuthenticationInProgressException.class) public void testAfterAttempt() throws Exception { final Realm otherRealm = new IniRealm(); this.authStrategy.afterAttempt(otherRealm, null, null, null, new RuntimeException()); final AuthenticationInProgressException authInProgressException = new AuthenticationInProgressException(); this.authStrategy.afterAttempt(otherRealm, null, null, null, authInProgressException); this.authStrategy.afterAttempt(new NegotiateAuthenticationRealm(), null, null, null, authInProgressException); Assert.fail(); }