protected void flushAuthCache(String domain) throws Exception { delegate.flushAuthCache(domain); }
protected void flushAuthCache(String domain) throws Exception { delegate.flushAuthCache(domain); }
protected void flushAuthCache(String domain) throws Exception { delegate.flushAuthCache(domain); }
protected void flushAuthCache(String domain) throws Exception { delegate.flushAuthCache(domain); }
/** Do a JAAS login with the current username, password and login config. * @throws Exception */ public void login() throws Exception { flushAuthCache("other"); String username = getUsername(); String pass = getPassword(); String config = getLoginConfig(); char[] password = null; if (pass != null) password = pass.toCharArray(); AppCallbackHandler handler = new AppCallbackHandler(username, password); getLog().debug("Creating LoginContext(" + config + ")"); lc = new LoginContext(config, handler); lc.login(); getLog().debug("Created LoginContext, subject=" + lc.getSubject()); }
/** Do a JAAS login with the current username, password and login config. * @throws Exception */ public void login() throws Exception { try { flushAuthCache("other"); } catch(Exception e) { // JBTEST-13, this should not fail this login attempt getLog().debug("Failed to flushAuthCache; "+e); } String username = getUsername(); String pass = getPassword(); String config = getLoginConfig(); char[] password = null; if (pass != null) password = pass.toCharArray(); AppCallbackHandler handler = new AppCallbackHandler(username, password); getLog().debug("Creating LoginContext(" + config + ")"); lc = new LoginContext(config, handler); lc.login(); getLog().debug("Created LoginContext, subject=" + lc.getSubject()); }