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:
  • Constructor Details

    • AnonymousAuthorizationCallback

      public AnonymousAuthorizationCallback(String authorizationInfo)
      Construct a new instance.
      Parameters:
      authorizationInfo - the authorization information string from the client
  • Method Details

    • 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 interface ExtendedCallback
      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 interface ExtendedCallback
      Returns:
      true if the callback is requesting information, false if it is only providing information