/** * Loads the persisted authentication information from {@link ClientAuthenticationCache} * if the current transport provides {@link Channel}. * @deprecated Assumes Remoting, and vulnerable to JENKINS-12543. */ @Deprecated protected Authentication loadStoredAuthentication() throws InterruptedException { try { if (channel!=null){ Authentication authLoadedFromCache = new ClientAuthenticationCache(channel).get(); if(!ACL.isAnonymous(authLoadedFromCache)){ UserDetails userDetails = new CLIUserDetails(authLoadedFromCache); SecurityListener.fireAuthenticated(userDetails); } return authLoadedFromCache; } } catch (IOException e) { stderr.println("Failed to access the stored credential"); Functions.printStackTrace(e, stderr); // recover } return Jenkins.ANONYMOUS; }
@Override protected int run() throws Exception { ClientAuthenticationCache store = new ClientAuthenticationCache(checkChannel()); Authentication auth = store.get(); store.remove(); SecurityListener.fireLoggedOut(auth.getName()); return 0; } }
/** * Loads the persisted authentication information from {@link ClientAuthenticationCache}. */ protected Authentication loadStoredAuthentication() throws InterruptedException { try { return new ClientAuthenticationCache(channel).get(); } catch (IOException e) { stderr.println("Failed to access the stored credential"); e.printStackTrace(stderr); // recover return Hudson.ANONYMOUS; } }
/** * Loads the persisted authentication information from {@link ClientAuthenticationCache}. */ protected Authentication loadStoredAuthentication() throws InterruptedException { try { return new ClientAuthenticationCache(channel).get(); } catch (IOException e) { stderr.println("Failed to access the stored credential"); e.printStackTrace(stderr); // recover return Hudson.ANONYMOUS; } }
/** * Loads the persisted authentication information from {@link ClientAuthenticationCache}. */ protected Authentication loadStoredAuthentication() throws InterruptedException { try { return new ClientAuthenticationCache(channel).get(); } catch (IOException e) { stderr.println("Failed to access the stored credential"); e.printStackTrace(stderr); // recover return Hudson.ANONYMOUS; } }
/** * Loads the persisted authentication information from * {@link ClientAuthenticationCache}. */ protected Authentication loadStoredAuthentication() throws InterruptedException { try { return new ClientAuthenticationCache(channel).get(); } catch (IOException e) { stderr.println("Failed to access the stored credential"); e.printStackTrace(stderr); // recover return Hudson.ANONYMOUS; } }
/** * Loads the persisted authentication information from {@link ClientAuthenticationCache} * if the current transport provides {@link Channel}. * @deprecated Assumes Remoting, and vulnerable to JENKINS-12543. */ @Deprecated protected Authentication loadStoredAuthentication() throws InterruptedException { try { if (channel!=null) return new ClientAuthenticationCache(channel).get(); } catch (IOException e) { stderr.println("Failed to access the stored credential"); Functions.printStackTrace(e, stderr); // recover } return Jenkins.ANONYMOUS; }