/** * 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; } }
@Override protected int run() throws Exception { Authentication a = Jenkins.getAuthentication(); if (a== Jenkins.ANONYMOUS) throw new CmdLineException("No credentials specified."); // this causes CLI to show the command line options. ClientAuthenticationCache store = new ClientAuthenticationCache(checkChannel()); store.set(a); SecurityListener.fireLoggedIn(a.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; } }
@Override protected int run() throws Exception { ClientAuthenticationCache store = new ClientAuthenticationCache(channel); store.remove(); 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; } }
@Override protected int run() throws Exception { ClientAuthenticationCache store = new ClientAuthenticationCache(channel); store.remove(); return 0; } }
@Override protected int run() throws Exception { ClientAuthenticationCache store = new ClientAuthenticationCache(channel); store.remove(); return 0; } }
@Override protected int run() throws Exception { ClientAuthenticationCache store = new ClientAuthenticationCache(channel); store.remove(); return 0; } }
/** * 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; }
@Override protected int run() throws Exception { ClientAuthenticationCache store = new ClientAuthenticationCache(checkChannel()); store.remove(); return 0; } }
@Override protected int run() throws Exception { Authentication a = Hudson.getAuthentication(); if (a==Hudson.ANONYMOUS) throw new CmdLineException("No credentials specified."); // this causes CLI to show the command line options. ClientAuthenticationCache store = new ClientAuthenticationCache(channel); store.set(a); return 0; }
@Override protected int run() throws Exception { Authentication a = Hudson.getAuthentication(); if (a==Hudson.ANONYMOUS) throw new CmdLineException("No credentials specified."); // this causes CLI to show the command line options. ClientAuthenticationCache store = new ClientAuthenticationCache(channel); store.set(a); return 0; }
@Override protected int run() throws Exception { Authentication a = Hudson.getAuthentication(); if (a == HudsonSecurityManager.ANONYMOUS) { throw new CmdLineException("No credentials specified."); // this causes CLI to show the command line options. } ClientAuthenticationCache store = new ClientAuthenticationCache(channel); store.set(a); return 0; } }
@Override protected int run() throws Exception { Authentication a = Hudson.getAuthentication(); if (a==Hudson.ANONYMOUS) throw new CmdLineException("No credentials specified."); // this causes CLI to show the command line options. ClientAuthenticationCache store = new ClientAuthenticationCache(channel); store.set(a); return 0; }
@Override protected int run() throws Exception { Authentication a = Jenkins.getAuthentication(); if (a== Jenkins.ANONYMOUS) throw new CmdLineException("No credentials specified."); // this causes CLI to show the command line options. ClientAuthenticationCache store = new ClientAuthenticationCache(checkChannel()); store.set(a); return 0; }