/** * If the specified URL does not support SPNEGO authentication, a fallback {@link Authenticator} will be used. * <p> * This implementation returns a {@link PseudoAuthenticator}. * * @return the fallback {@link Authenticator}. */ protected Authenticator getFallBackAuthenticator() { Authenticator auth = new PseudoAuthenticator(); if (connConfigurator != null) { auth.setConnectionConfigurator(connConfigurator); } return auth; }
/** * If the specified URL does not support SPNEGO authentication, a fallback {@link Authenticator} will be used. * <p> * This implementation returns a {@link PseudoAuthenticator}. * * @return the fallback {@link Authenticator}. */ protected Authenticator getFallBackAuthenticator() { Authenticator auth = new PseudoAuthenticator(); if (connConfigurator != null) { auth.setConnectionConfigurator(connConfigurator); } return auth; }
/** * If the specified URL does not support SPNEGO authentication, a fallback {@link Authenticator} will be used. * <p> * This implementation returns a {@link PseudoAuthenticator}. * * @return the fallback {@link Authenticator}. */ protected Authenticator getFallBackAuthenticator() { Authenticator auth = new PseudoAuthenticator(); if (connConfigurator != null) { auth.setConnectionConfigurator(connConfigurator); } return auth; }
/** * If the specified URL does not support SPNEGO authentication, a fallback {@link Authenticator} will be used. * <p> * This implementation returns a {@link PseudoAuthenticator}. * * @return the fallback {@link Authenticator}. */ protected Authenticator getFallBackAuthenticator() { Authenticator auth = new PseudoAuthenticator(); if (connConfigurator != null) { auth.setConnectionConfigurator(connConfigurator); } return auth; }
/** * If the specified URL does not support SPNEGO authentication, a fallback {@link Authenticator} will be used. * <p> * This implementation returns a {@link PseudoAuthenticator}. * * @return the fallback {@link Authenticator}. */ protected Authenticator getFallBackAuthenticator() { Authenticator auth = new PseudoAuthenticator(); if (connConfigurator != null) { auth.setConnectionConfigurator(connConfigurator); } return auth; }
@Test public void testGetUserName() throws Exception { PseudoAuthenticator authenticator = new PseudoAuthenticator(); Assert.assertEquals(System.getProperty("user.name"), authenticator.getUserName()); }
@Test public void testGetUserName() throws Exception { PseudoAuthenticator authenticator = new PseudoAuthenticator(); Assert.assertEquals(System.getProperty("user.name"), authenticator.getUserName()); }
@Test public void testGetUserName() throws Exception { PseudoAuthenticator authenticator = new PseudoAuthenticator(); Assert.assertEquals(System.getProperty("user.name"), authenticator.getUserName()); }
@Test public void testAuthenticationAnonymousDisallowed() throws Exception { AuthenticatorTestCase auth = new AuthenticatorTestCase(); AuthenticatorTestCase.setAuthenticationHandlerConfig( getAuthenticationHandlerConfiguration(false)); auth._testAuthentication(new PseudoAuthenticator(), false); }
@Test public void testAuthenticationAnonymousDisallowedWithPost() throws Exception { AuthenticatorTestCase auth = new AuthenticatorTestCase(); AuthenticatorTestCase.setAuthenticationHandlerConfig( getAuthenticationHandlerConfiguration(false)); auth._testAuthentication(new PseudoAuthenticator(), true); }
@Test public void testAuthenticationAnonymousAllowed() throws Exception { AuthenticatorTestCase auth = new AuthenticatorTestCase(); AuthenticatorTestCase.setAuthenticationHandlerConfig( getAuthenticationHandlerConfiguration(true)); auth._testAuthentication(new PseudoAuthenticator(), false); }
@Test public void testAuthenticationAnonymousDisallowed() throws Exception { AuthenticatorTestCase auth = new AuthenticatorTestCase(); AuthenticatorTestCase.setAuthenticationHandlerConfig( getAuthenticationHandlerConfiguration(false)); auth._testAuthentication(new PseudoAuthenticator(), false); }
@Test public void testAuthenticationAnonymousAllowedWithPost() throws Exception { AuthenticatorTestCase auth = new AuthenticatorTestCase(); AuthenticatorTestCase.setAuthenticationHandlerConfig( getAuthenticationHandlerConfiguration(true)); auth._testAuthentication(new PseudoAuthenticator(), true); }
@Test public void testAuthenticationAnonymousDisallowed() throws Exception { AuthenticatorTestCase auth = new AuthenticatorTestCase(); AuthenticatorTestCase.setAuthenticationHandlerConfig( getAuthenticationHandlerConfiguration(false)); auth._testAuthentication(new PseudoAuthenticator(), false); }
@Test public void testAuthenticationAnonymousDisallowedWithPost() throws Exception { AuthenticatorTestCase auth = new AuthenticatorTestCase(); AuthenticatorTestCase.setAuthenticationHandlerConfig( getAuthenticationHandlerConfiguration(false)); auth._testAuthentication(new PseudoAuthenticator(), true); }
@Test public void testAuthenticationAnonymousAllowed() throws Exception { AuthenticatorTestCase auth = new AuthenticatorTestCase(); AuthenticatorTestCase.setAuthenticationHandlerConfig( getAuthenticationHandlerConfiguration(true)); auth._testAuthentication(new PseudoAuthenticator(), false); }
@Test public void testAuthenticationAnonymousAllowedWithPost() throws Exception { AuthenticatorTestCase auth = new AuthenticatorTestCase(); AuthenticatorTestCase.setAuthenticationHandlerConfig( getAuthenticationHandlerConfiguration(true)); auth._testAuthentication(new PseudoAuthenticator(), true); }
@Test public void testAuthenticationAnonymousAllowedWithPost() throws Exception { AuthenticatorTestCase auth = new AuthenticatorTestCase(); AuthenticatorTestCase.setAuthenticationHandlerConfig( getAuthenticationHandlerConfiguration(true)); auth._testAuthentication(new PseudoAuthenticator(), true); }
@Test public void testAuthenticationAnonymousDisallowedWithPost() throws Exception { AuthenticatorTestCase auth = new AuthenticatorTestCase(); AuthenticatorTestCase.setAuthenticationHandlerConfig( getAuthenticationHandlerConfiguration(false)); auth._testAuthentication(new PseudoAuthenticator(), true); }
@Test public void testAuthenticationAnonymousAllowed() throws Exception { AuthenticatorTestCase auth = new AuthenticatorTestCase(); AuthenticatorTestCase.setAuthenticationHandlerConfig( getAuthenticationHandlerConfiguration(true)); auth._testAuthentication(new PseudoAuthenticator(), false); }