Class CallbackUtil
- java.lang.Object
-
- org.wildfly.security.auth.callback.CallbackUtil
-
public final class CallbackUtil extends Object
Helper utility methods for callback handlers.- Author:
- David M. Lloyd
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
isOptional(Callback callback)
Determine whether a callback is optional.static void
unsupported(Callback callback)
A utility to handle a callback which is unsupported.
-
-
-
Method Detail
-
isOptional
public static boolean isOptional(Callback callback)
Determine whether a callback is optional.- Parameters:
callback
- the callback- Returns:
true
if it is optional,false
if it is not optional or optionality could not be determined
-
unsupported
public static void unsupported(Callback callback) throws UnsupportedCallbackException
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 will return.- Parameters:
callback
- the callback which is not supported- Throws:
UnsupportedCallbackException
- if the callback is not optional
-
-