gssCreds.dispose();
@Override public void logout() throws Exception { if (loginContext != null) { loginContext.logout(); } if (gssCredential != null) { gssCredential.dispose(); } }
@Override public void logout() throws Exception { if (loginContext != null) { loginContext.logout(); } if (gssCredential != null) { gssCredential.dispose(); } }
/** * Logout. Since server uses LoginContext to login/pre-authenticate, we must * also logout when we are done using this object. * * <p> * Generally, instantiators of this class should be the only to call * dispose() as it indicates that this class will no longer be used. * </p> */ public void dispose() { if (null != this.serverCredentials) { try { this.serverCredentials.dispose(); } catch (GSSException e) { LOGGER.log(Level.WARNING, e, () -> "Dispose failed."); } } if (null != this.loginContext) { try { this.loginContext.logout(); } catch (LoginException lex) { LOGGER.log(Level.WARNING, lex, () -> "Logout failed."); } } }
@Override public void close() throws NamingException { GSSCredential credential = null; try { credential = (GSSCredential) getEnvironment().get(Sasl.CREDENTIALS); } finally { super.close(); } if (credential != null) { try { credential.dispose(); } catch (GSSException e) { // ignore } } }
this.credential.dispose(); } catch (final GSSException gsse) { LOGGER.log(Level.WARNING, gsse, () -> "call to dispose credential failed.");
/** * Dispose of the context and the server's credentials, and do a logout of the Kerberos login module. */ public void logout() { if (context != null) { try { context.dispose(); context = null; } catch (final GSSException e) { log.error("GSS-API context disposal failed", e); } } if (serverCreds != null) { try { serverCreds.dispose(); serverCreds = null; } catch (final GSSException e) { log.error("GSS-API credentials disposal failed", e); } } if (krbLoginModule != null) { try { krbLoginModule.logout(); krbLoginModule = null; } catch (final LoginException e) { log.error("Server credentials logout failed", e); } } }
gssCreds.dispose();
gssCreds.dispose();
gssCreds.dispose();
gssCreds.dispose();
gssCreds.dispose();
gssCreds.dispose();