/** * A utility to handle a callback which is unsupported. Optional callbacks will be ignored, otherwise the * exception will be thrown. In the case of optional callbacks, this method <em>will</em> return. * * @param callback the callback which is not supported * @throws UnsupportedCallbackException if the callback is not optional */ public static void unsupported(Callback callback) throws UnsupportedCallbackException { if (! isOptional(callback)) { throw new FastUnsupportedCallbackException(callback); } } }
try { lc = new LoginContext("KDC", subject, (c) -> { throw new FastUnsupportedCallbackException(c[0]); }, configuration); } finally {
} catch (InvalidKeySpecException | NoSuchAlgorithmException e) { log.trace("Unable to get key spec", e); throw new FastUnsupportedCallbackException(callback); throw new FastUnsupportedCallbackException(callback); throw new FastUnsupportedCallbackException(callback); if ( ! providedRealm.equals(requestedRealm)) { log.tracef("Handling CredentialCallback: credential for realm \"%s\" is not available (\"%s\" provided)", requestedRealm, providedRealm); throw new FastUnsupportedCallbackException(callback); } else { log.tracef("Handling CredentialCallback: obtained credential for correct realm \"%s\"", providedRealm); throw new FastUnsupportedCallbackException(callback); } else if (callback instanceof ServerCredentialCallback) { final ServerCredentialCallback serverCredentialCallback = (ServerCredentialCallback) callback;
/** * A utility to handle a callback which is unsupported. Optional callbacks will be ignored, otherwise the * exception will be thrown. In the case of optional callbacks, this method <em>will</em> return. * * @param callback the callback which is not supported * @throws UnsupportedCallbackException if the callback is not optional */ public static void unsupported(Callback callback) throws UnsupportedCallbackException { if (! isOptional(callback)) { throw new FastUnsupportedCallbackException(callback); } } }
/** * A utility to handle a callback which is unsupported. Optional callbacks will be ignored, otherwise the * exception will be thrown. In the case of optional callbacks, this method <em>will</em> return. * * @param callback the callback which is not supported * @throws UnsupportedCallbackException if the callback is not optional */ public static void unsupported(Callback callback) throws UnsupportedCallbackException { if (! isOptional(callback)) { throw new FastUnsupportedCallbackException(callback); } } }
/** * A utility to handle a callback which is unsupported. Optional callbacks will be ignored, otherwise the * exception will be thrown. In the case of optional callbacks, this method <em>will</em> return. * * @param callback the callback which is not supported * @throws UnsupportedCallbackException if the callback is not optional */ public static void unsupported(Callback callback) throws UnsupportedCallbackException { if (! isOptional(callback)) { throw new FastUnsupportedCallbackException(callback); } } }
try { lc = new LoginContext("KDC", subject, (c) -> { throw new FastUnsupportedCallbackException(c[0]); }, configuration); } finally {
try { lc = new LoginContext("KDC", subject, (c) -> { throw new FastUnsupportedCallbackException(c[0]); }, configuration); } finally {
try { lc = new LoginContext("KDC", subject, (c) -> { throw new FastUnsupportedCallbackException(c[0]); }, configuration); } finally {
try { lc = new LoginContext("KDC", subject, (c) -> { throw new FastUnsupportedCallbackException(c[0]); }, configuration); } finally {
} catch (InvalidKeySpecException | NoSuchAlgorithmException e) { log.trace("Unable to get key spec", e); throw new FastUnsupportedCallbackException(callback); throw new FastUnsupportedCallbackException(callback); throw new FastUnsupportedCallbackException(callback); if ( ! providedRealm.equals(requestedRealm)) { log.tracef("Handling CredentialCallback: credential for realm \"%s\" is not available (\"%s\" provided)", requestedRealm, providedRealm); throw new FastUnsupportedCallbackException(callback); } else { log.tracef("Handling CredentialCallback: obtained credential for correct realm \"%s\"", providedRealm); throw new FastUnsupportedCallbackException(callback); } else if (callback instanceof ServerCredentialCallback) { final ServerCredentialCallback serverCredentialCallback = (ServerCredentialCallback) callback;
} catch (InvalidKeySpecException | NoSuchAlgorithmException e) { log.trace("Unable to get key spec", e); throw new FastUnsupportedCallbackException(callback); throw new FastUnsupportedCallbackException(callback); throw new FastUnsupportedCallbackException(callback); if ( ! providedRealm.equals(requestedRealm)) { log.tracef("Handling CredentialCallback: credential for realm \"%s\" is not available (\"%s\" provided)", requestedRealm, providedRealm); throw new FastUnsupportedCallbackException(callback); } else { log.tracef("Handling CredentialCallback: obtained credential for correct realm \"%s\"", providedRealm); throw new FastUnsupportedCallbackException(callback); } else if (callback instanceof ServerCredentialCallback) { final ServerCredentialCallback serverCredentialCallback = (ServerCredentialCallback) callback;
} catch (InvalidKeySpecException | NoSuchAlgorithmException e) { log.trace("Unable to get key spec", e); throw new FastUnsupportedCallbackException(callback); throw new FastUnsupportedCallbackException(callback); throw new FastUnsupportedCallbackException(callback); if ( ! providedRealm.equals(requestedRealm)) { log.tracef("Handling CredentialCallback: credential for realm \"%s\" is not available (\"%s\" provided)", requestedRealm, providedRealm); throw new FastUnsupportedCallbackException(callback); } else { log.tracef("Handling CredentialCallback: obtained credential for correct realm \"%s\"", providedRealm); throw new FastUnsupportedCallbackException(callback); } else if (callback instanceof ServerCredentialCallback) { final ServerCredentialCallback serverCredentialCallback = (ServerCredentialCallback) callback;