Class AnonymousAuthorizationCallback
- java.lang.Object
-
- org.wildfly.security.auth.callback.AnonymousAuthorizationCallback
-
- All Implemented Interfaces:
Serializable,Callback,ExtendedCallback
public final class AnonymousAuthorizationCallback extends Object implements ExtendedCallback, Serializable
A callback to authorize anonymous authentication.- Author:
- David M. Lloyd
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AnonymousAuthorizationCallback(String authorizationInfo)Construct a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetAuthorizationInfo()Get the authorization name string from the client.booleanisAuthorized()Determine whether anonymous access was allowed by the callback handler.booleanisOptional()Determine if this callback is optional.booleanneedsInformation()Determine if this callback is requesting information.voidsetAuthorized(boolean authorized)Set whether anonymous access is allowed.
-
-
-
Constructor Detail
-
AnonymousAuthorizationCallback
public AnonymousAuthorizationCallback(String authorizationInfo)
Construct a new instance.- Parameters:
authorizationInfo- the authorization information string from the client
-
-
Method Detail
-
getAuthorizationInfo
public String getAuthorizationInfo()
Get the authorization name string from the client. This name is only informative and must not be used for authentication purposes.- Returns:
- the authorization name string from the client
-
isAuthorized
public boolean isAuthorized()
Determine whether anonymous access was allowed by the callback handler.- Returns:
trueif anonymous authentication was allowed,falseotherwise
-
setAuthorized
public void setAuthorized(boolean authorized)
Set whether anonymous access is allowed.- Parameters:
authorized-trueif anonymous access is allowed,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
-
-