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
-
-
Field Summary
Fields Modifier and Type Field Description private String
authorizationInfo
private boolean
authorized
private static long
serialVersionUID
-
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.
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
authorizationInfo
private final String authorizationInfo
-
authorized
private boolean authorized
-
-
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
-
-