public AuthenticationMechanismOutcome runGSSAPI(final HttpServerExchange exchange, final ByteBuffer challenge, final SecurityContext securityContext) { try { Subject server = subjectFactory.getSubjectForHost(getHostName(exchange)); // The AcceptSecurityContext takes over responsibility for setting the result. return Subject.doAs(server, new AcceptSecurityContext(exchange, challenge, securityContext)); } catch (GeneralSecurityException e) { e.printStackTrace(); return AuthenticationMechanismOutcome.NOT_AUTHENTICATED; } catch (PrivilegedActionException e) { e.printStackTrace(); return AuthenticationMechanismOutcome.NOT_AUTHENTICATED; } }
public static java.security.Principal generatePrincipal(final String className, final String principalName, final ClassLoader classLoader) { try { return (java.security.Principal) AccessController.doPrivileged(new PrivilegedExceptionAction() { public Object run() throws Exception { Class clazz = classLoader.loadClass(className); Constructor constructor = clazz.getDeclaredConstructor(new Class[]{String.class}); return (java.security.Principal) constructor.newInstance(new Object[]{principalName}); } }); } catch (PrivilegedActionException e) { e.printStackTrace(); if (e.getException() != null) { e.getException().printStackTrace(); } return null; } }
}catch(PrivilegedActionException e) e.printStackTrace();
final IOException ioe = new IOException("unable to unmap the mapped buffer"); ioe.initCause(e.getCause()); e.printStackTrace(System.err);
final IOException ioe = new IOException("unable to unmap the mapped buffer"); ioe.initCause(e.getCause()); e.printStackTrace(System.err);
prive.printStackTrace(); throw (BSFException) prive.getException(); } catch (Exception ex) {
public byte[] evaluateChallenge(final byte[] saslToken) throws SaslException { if (saslToken == null) { throw new SaslException("saslToken is null."); } if (clientSubject != null) { try { final byte[] retval = Subject.doAs(clientSubject, new PrivilegedExceptionAction<byte[]>() { public byte[] run() throws SaslException { return saslClient.evaluateChallenge(saslToken); } }); return retval; } catch (PrivilegedActionException e) { e.printStackTrace(); throw new SaslException("SASL/JAAS error", e); } } else { return saslClient.evaluateChallenge(saslToken); } }
public AuthenticationMechanismOutcome runGSSAPI(final HttpServerExchange exchange, final ByteBuffer challenge, final SecurityContext securityContext) { try { Subject server = subjectFactory.getSubjectForHost(getHostName(exchange)); // The AcceptSecurityContext takes over responsibility for setting the result. return Subject.doAs(server, new AcceptSecurityContext(exchange, challenge, securityContext)); } catch (GeneralSecurityException e) { e.printStackTrace(); return AuthenticationMechanismOutcome.NOT_AUTHENTICATED; } catch (PrivilegedActionException e) { e.printStackTrace(); return AuthenticationMechanismOutcome.NOT_AUTHENTICATED; } }
public AuthenticationMechanismOutcome runGSSAPI(final HttpServerExchange exchange, final ByteBuffer challenge, final SecurityContext securityContext) { try { Subject server = subjectFactory.getSubjectForHost(getHostName(exchange)); // The AcceptSecurityContext takes over responsibility for setting the result. return Subject.doAs(server, new AcceptSecurityContext(exchange, challenge, securityContext)); } catch (GeneralSecurityException e) { e.printStackTrace(); return AuthenticationMechanismOutcome.NOT_AUTHENTICATED; } catch (PrivilegedActionException e) { e.printStackTrace(); return AuthenticationMechanismOutcome.NOT_AUTHENTICATED; } }
public AuthenticationMechanismOutcome runGSSAPI(final HttpServerExchange exchange, final ByteBuffer challenge, final SecurityContext securityContext) { try { Subject server = subjectFactory.getSubjectForHost(getHostName(exchange)); // The AcceptSecurityContext takes over responsibility for setting the result. return Subject.doAs(server, new AcceptSecurityContext(exchange, challenge, securityContext)); } catch (GeneralSecurityException e) { e.printStackTrace(); return AuthenticationMechanismOutcome.NOT_AUTHENTICATED; } catch (PrivilegedActionException e) { e.printStackTrace(); return AuthenticationMechanismOutcome.NOT_AUTHENTICATED; } }
ex.printStackTrace(); factoryName = action.getName(); Exception e = ex.getException();
} catch (PrivilegedActionException e) { e.printStackTrace();
Monitor.logTextMessage( MessageId.CONN_NETWORK_SERVER_START_EXCEPTION, e1.getMessage()); e.printStackTrace(Monitor.getStream().getPrintWriter()); return;
Monitor.logTextMessage( MessageId.CONN_NETWORK_SERVER_START_EXCEPTION, e1.getMessage()); e.printStackTrace(Monitor.getStream().getPrintWriter()); return;
Monitor.logTextMessage( MessageId.CONN_NETWORK_SERVER_START_EXCEPTION, e1.getMessage()); e.printStackTrace(Monitor.getStream().getPrintWriter()); return;