Package wt.httpgw

Class GatewayAuthenticator

java.lang.Object
wt.httpgw.GatewayAuthenticator
All Implemented Interfaces:
Externalizable, Serializable, CGIConstants, MethodAuthenticator

public class GatewayAuthenticator extends Object implements MethodAuthenticator, Externalizable, CGIConstants
A MethodAuthenticator that is used to transport trusted user authentication from a HTTP Gateway process to a method server.

Calls authenticated by this authenticator will only be associated with a persistent session if the init method has been called. Otherwise, calls are associated with transient sessions that only exist for the duration of the call.

Normally, method authenticators are received from a server as part of an authentication exception and the setServer method is implicitly called to set the server for subsequent init calls. If an instance is created on a client, the setServer method must be explicitly called before calling init with the server for which this authenticator is going to be used to endorse calls.

Supported API: true
Extendable: false

See Also:
  • Constructor Details

    • GatewayAuthenticator

      public GatewayAuthenticator()
      No-arg constructor required by Externalizable interface Supported API: true
    • GatewayAuthenticator

      public GatewayAuthenticator(HTTPRequest request)
      Construct a GatewayAuthenticator from data in a HTTPRequest. Supported API: true
    • GatewayAuthenticator

      public GatewayAuthenticator(javax.servlet.http.HttpServletRequest request)
      Construct a GatewayAuthenticator from data in a javax.servlet.http.HttpServletRequest. Supported API: true
  • Method Details

    • setRemoteUser

      public void setRemoteUser(String remote_user)
      Set REMOTE_USER value. Supported API: true
    • getRemoteUser

      public String getRemoteUser()
      Get REMOTE_USER value. Supported API: true
    • setRemoteHost

      public void setRemoteHost(String remote_host)
      Set REMOTE_HOST value. Supported API: true
    • getRemoteHost

      public String getRemoteHost()
      Get REMOTE_HOST value. Supported API: true
    • newMethodArgs

      public MethodArgs newMethodArgs()
      Create new MethodArgs object or a subclass used by this authenticator Supported API: true
      Specified by:
      newMethodArgs in interface MethodAuthenticator
    • init

      public boolean init()
      Initialize - return false or throw runtime exception to prevent installation Supported API: true
      Specified by:
      init in interface MethodAuthenticator
    • endorse

      public MethodArgs endorse(MethodArgs args)
      Endorse the current message - may replace it with a subclass if necessary Supported API: true
      Specified by:
      endorse in interface MethodAuthenticator
    • failure

      public boolean failure(MethodArgs args, AuthenticationException e)
      Report failure and determine if authenticator should be deinstalled. Supported API: true
      Specified by:
      failure in interface MethodAuthenticator
    • setServer

      public void setServer(RemoteMethodServer server)
      Set the server proxy corresponding to this authenticator Supported API: true
      Specified by:
      setServer in interface MethodAuthenticator
    • getServer

      public RemoteMethodServer getServer()
      Get the server proxy corresponding to this authenticator Supported API: true
      Specified by:
      getServer in interface MethodAuthenticator