Class ExclusiveNameCallback
java.lang.Object
javax.security.auth.callback.NameCallback
org.wildfly.security.auth.callback.ExclusiveNameCallback
- All Implemented Interfaces:
Serializable,Callback,ExtendedCallback
A variation on
NameCallback which allows exclusive access to the backing identity to be requested.- Author:
- Farah Juma
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionExclusiveNameCallback(String prompt, boolean needsExclusiveAccess, boolean optional) Construct a new instance.ExclusiveNameCallback(String prompt, String defaultName, boolean needsExclusiveAccess, boolean optional) Construct a new instance. -
Method Summary
Modifier and TypeMethodDescriptionbooleanDetermine if exclusive access to the backing identity was granted.booleanDetermine if this callback is optional.booleanDetermine if exclusive access to the backing identity is required.booleanDetermine if this callback is requesting information.voidsetExclusiveAccess(boolean exclusiveAccess) Set whether exclusive access to the backing identity was granted.Methods inherited from class javax.security.auth.callback.NameCallback
getDefaultName, getName, getPrompt, setName
-
Constructor Details
-
ExclusiveNameCallback
Construct a new instance.- Parameters:
prompt- the text prompt (must not benull)needsExclusiveAccess-trueif exclusive access to the backing identity is requiredoptional-trueif the support for the callback is optional
-
ExclusiveNameCallback
public ExclusiveNameCallback(String prompt, String defaultName, boolean needsExclusiveAccess, boolean optional) Construct a new instance.- Parameters:
prompt- the text prompt (must not benull)defaultName- the name to be used as the default name displayed with the promptneedsExclusiveAccess-trueif exclusive access to the backing identity is requiredoptional-trueif the support for the callback is optional
-
-
Method Details
-
needsExclusiveAccess
public boolean needsExclusiveAccess()Determine if exclusive access to the backing identity is required.- Returns:
trueif exclusive access to the backing identity is required,falseotherwise
-
hasExclusiveAccess
public boolean hasExclusiveAccess()Determine if exclusive access to the backing identity was granted.- Returns:
trueif exclusive access to the backing identity was granted,falseotherwise
-
setExclusiveAccess
public void setExclusiveAccess(boolean exclusiveAccess) Set whether exclusive access to the backing identity was granted.- Parameters:
exclusiveAccess-trueif exclusive access to the backing identity was granted,falseotherwise
-
isOptional
public boolean isOptional()Description copied from interface:ExtendedCallbackDetermine if this callback is optional.- Specified by:
isOptionalin interfaceExtendedCallback- Returns:
trueif the callback is optional,falseif it is mandatory
-
needsInformation
public boolean needsInformation()Description copied from interface:ExtendedCallbackDetermine if this callback is requesting information.- Specified by:
needsInformationin interfaceExtendedCallback- Returns:
trueif the callback is requesting information,falseif it is only providing information
-