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 String
getAuthorizationInfo()
Get the authorization name string from the client.boolean
isAuthorized()
Determine whether anonymous access was allowed by the callback handler.boolean
isOptional()
Determine if this callback is optional.boolean
needsInformation()
Determine if this callback is requesting information.void
setAuthorized(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:
true
if anonymous authentication was allowed,false
otherwise
-
setAuthorized
public void setAuthorized(boolean authorized)
Set whether anonymous access is allowed.- Parameters:
authorized
-true
if anonymous access is allowed,false
otherwise
-
isOptional
public boolean isOptional()
Description copied from interface:ExtendedCallback
Determine if this callback is optional.- Specified by:
isOptional
in interfaceExtendedCallback
- Returns:
true
if the callback is optional,false
if it is mandatory
-
needsInformation
public boolean needsInformation()
Description copied from interface:ExtendedCallback
Determine if this callback is requesting information.- Specified by:
needsInformation
in interfaceExtendedCallback
- Returns:
true
if the callback is requesting information,false
if it is only providing information
-
-