Auth auth = authMap.get(id); if (auth == null) { auth = authMap.putIfAbsent(new Auth(id, new RejectingSaslServer())); if (auth == null) { final SaslServer saslServer = auth.getSaslServer(); final byte[] challenge; try { } catch (IOException e1) { authMap.remove(auth); auth.dispose(); log.trace("Failed to send auth reject", e1); } catch (IOException e) { authMap.remove(auth); auth.dispose(); log.trace("Failed to send auth success", e); } catch (IOException e) { authMap.remove(auth); auth.dispose(); log.trace("Failed to send auth challenge", e);
Auth auth = authMap.get(id); if (auth == null) { auth = authMap.putIfAbsent(new Auth(id, new RejectingSaslServer())); if (auth == null) { final SaslServer saslServer = auth.getSaslServer(); final byte[] challenge; try { } catch (IOException e1) { authMap.remove(auth); auth.dispose(); log.trace("Failed to send auth reject", e1); } catch (IOException e) { authMap.remove(auth); auth.dispose(); log.trace("Failed to send auth success", e); } catch (IOException e) { authMap.remove(auth); auth.dispose(); log.trace("Failed to send auth challenge", e);
log.trace("Authentication failed at mechanism creation", e); try { Auth oldAuth = authMap.put(new Auth(id, new RejectingSaslServer())); if (oldAuth != null) oldAuth.dispose(); connectionHandler.sendAuthReject(id); } catch (IOException e1) { final Auth auth = new Auth(id, saslServer); Auth oldAuth = authMap.put(auth); if (oldAuth != null) oldAuth.dispose(); final byte[] challenge; try { } catch (IOException e1) { authMap.remove(auth); auth.dispose(); log.trace("Failed to send auth reject", e1); } catch (IOException e) { authMap.remove(auth); auth.dispose(); log.trace("Failed to send auth success", e); } catch (IOException e) { authMap.remove(auth); auth.dispose(); log.trace("Failed to send auth challenge", e);
public SecurityIdentity getLocalIdentity(final int id) { if (id == 1) { final SaslAuthenticationFactory authenticationFactory = this.authenticationFactory; return authenticationFactory == null ? null : authenticationFactory.getSecurityDomain().getAnonymousSecurityIdentity(); } else if (id == 0) { return getLocalIdentity(); } final Auth auth = authMap.get(id); return auth != null ? (SecurityIdentity) auth.getSaslServer().getNegotiatedProperty(WildFlySasl.SECURITY_IDENTITY) : null; }
protected void closeAction() throws IOException { connectionHandler.closeAsync(); connectionHandler.addCloseHandler((closed, exception) -> closeComplete()); for (Auth auth : authMap) { auth.dispose(); } final ConnectionPeerIdentityContext peerIdentityContext = this.peerIdentityContext; if (peerIdentityContext != null) peerIdentityContext.connectionClosed(); }
void receiveAuthDelete(final int id) { log.tracef("Received authentication delete for ID %08x", id); if (id == 0 || id == 1) { // ignore return; } getExecutor().execute(() -> { final Auth auth = authMap.removeKey(id); if (auth != null) auth.dispose(); log.tracef("Deleted authentication ID %08x", id); }); }
log.trace("Authentication failed at mechanism creation", e); try { Auth oldAuth = authMap.put(new Auth(id, new RejectingSaslServer())); if (oldAuth != null) oldAuth.dispose(); connectionHandler.sendAuthReject(id); } catch (IOException e1) { final Auth auth = new Auth(id, saslServer); Auth oldAuth = authMap.put(auth); if (oldAuth != null) oldAuth.dispose(); final byte[] challenge; try { } catch (IOException e1) { authMap.remove(auth); auth.dispose(); log.trace("Failed to send auth reject", e1); } catch (IOException e) { authMap.remove(auth); auth.dispose(); log.trace("Failed to send auth success", e); } catch (IOException e) { authMap.remove(auth); auth.dispose(); log.trace("Failed to send auth challenge", e);
void receiveAuthDelete(final int id) { log.tracef("Received authentication delete for ID %08x", id); if (id == 0 || id == 1) { // ignore return; } getExecutor().execute(() -> { final Auth auth = authMap.removeKey(id); if (auth != null) auth.dispose(); log.tracef("Deleted authentication ID %08x", id); }); }
protected void closeAction() throws IOException { connectionHandler.closeAsync(); connectionHandler.addCloseHandler((closed, exception) -> closeComplete()); for (Auth auth : authMap) { auth.dispose(); } final ConnectionPeerIdentityContext peerIdentityContext = this.peerIdentityContext; if (peerIdentityContext != null) peerIdentityContext.connectionClosed(); }
public SecurityIdentity getLocalIdentity(final int id) { if (id == 1) { final SaslAuthenticationFactory authenticationFactory = this.authenticationFactory; return authenticationFactory == null ? null : authenticationFactory.getSecurityDomain().getAnonymousSecurityIdentity(); } else if (id == 0) { return getLocalIdentity(); } final Auth auth = authMap.get(id); return auth != null ? (SecurityIdentity) auth.getSaslServer().getNegotiatedProperty(WildFlySasl.SECURITY_IDENTITY) : null; }