wt.httpgw
Class GatewayAuthenticator

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

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:
Serialized Form

Field Summary
private  String acceptLanguage
           
private  String authorization
           
private  boolean initializing
           
protected  MethodAuthenticator nestedAuthenticator
           
private  String remoteHost
           
private  String remoteUser
           
(package private) static long serialVersionUID
           
private  Object server
           
 
Fields inherited from interface wt.method.MethodAuthenticator
versionID
 
Fields inherited from interface wt.httpgw.CGIConstants
CGI_ACCEPT, CGI_ACCEPT_CHARSET, CGI_ACCEPT_LANGUAGE, CGI_AUTH_TYPE, CGI_AUTHORIZATION, CGI_CONNECTION, CGI_CONTENT_LENGTH, CGI_CONTENT_TYPE, CGI_CONTEXT_PATH, CGI_DELETE_METHOD, CGI_GATEWAY_INTERFACE, CGI_GET_METHOD, CGI_HEAD_METHOD, CGI_HOST, CGI_IF_MODIFIED_SINCE, CGI_MULTIPART_BOUNDARY, CGI_PATH_INFO, CGI_PATH_TRANSLATED, CGI_POST_METHOD, CGI_PRAGMA, CGI_PROPERTY_PREFIX, CGI_PROTOCOL, CGI_PUT_METHOD, CGI_QUERY_STRING, CGI_REFERER, CGI_REMOTE_ADDR, CGI_REMOTE_HOST, CGI_REMOTE_IDENT, CGI_REMOTE_USER, CGI_REQUEST_METHOD, CGI_SCHEME, CGI_SCRIPT_NAME, CGI_SERVER_NAME, CGI_SERVER_PORT, CGI_SERVER_PROTOCOL, CGI_SERVER_SOFTWARE, CGI_SERVLET_SESSION, CGI_TRACE_METHOD, CGI_UA_COLOR, CGI_UA_CPU, CGI_UA_OS, CGI_UA_PIXELS, CGI_URI, CGI_URL, CGI_USER_AGENT, versionID
 
Constructor Summary
GatewayAuthenticator()
          No-arg constructor required by Externalizable interface Supported API: true
GatewayAuthenticator(HTTPRequest request)
          Construct a GatewayAuthenticator from data in a HTTPRequest.
GatewayAuthenticator(javax.servlet.http.HttpServletRequest request)
          Construct a GatewayAuthenticator from data in a javax.servlet.http.HttpServletRequest.
 
Method Summary
 MethodArgs endorse(MethodArgs args)
          Endorse the current message - may replace it with a subclass if necessary Supported API: true
 boolean failure(MethodArgs args, AuthenticationException e)
          Report failure and determine if authenticator should be deinstalled.
 String getAcceptLanguage()
          Get ACCEPT_LANGUAGE value.
 String getAuthorization()
          Get AUTHORIZATION value.
 String getRemoteHost()
          Get REMOTE_HOST value.
 String getRemoteUser()
          Get REMOTE_USER value.
 RemoteMethodServer getServer()
          Get the server proxy corresponding to this authenticator Supported API: true
 boolean init()
          Initialize - return false or throw runtime exception to prevent installation Supported API: true
 MethodArgs newMethodArgs()
          Create new MethodArgs object or a subclass used by this authenticator Supported API: true
 void readExternal(ObjectInput input_stream)
          Called during unmarshaling in server Supported API: false
 void setAcceptLanguage(String accept_language)
          Set ACCEPT_LANGUAGE value.
 void setAuthorization(String authorization)
          Set AUTHORIZATION value.
 void setRemoteHost(String remote_host)
          Set REMOTE_HOST value.
 void setRemoteUser(String remote_user)
          Set REMOTE_USER value.
 void setServer(RemoteMethodServer server)
          Set the server proxy corresponding to this authenticator Supported API: true
 void writeExternal(ObjectOutput output_stream)
          Called during marshaling Supported API: false
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

static final long serialVersionUID
See Also:
Constant Field Values

remoteUser

private String remoteUser

remoteHost

private String remoteHost

acceptLanguage

private String acceptLanguage

authorization

private String authorization

nestedAuthenticator

protected MethodAuthenticator nestedAuthenticator

server

private Object server

initializing

private boolean initializing
Constructor Detail

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 Detail

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


setAcceptLanguage

public void setAcceptLanguage(String accept_language)
Set ACCEPT_LANGUAGE value. Supported API: false


getAcceptLanguage

public String getAcceptLanguage()
Get ACCEPT_LANGUAGE value. Supported API: false


setAuthorization

public void setAuthorization(String authorization)
Set AUTHORIZATION value. Supported API: false


getAuthorization

public String getAuthorization()
Get AUTHORIZATION value. Supported API: false


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

readExternal

public void readExternal(ObjectInput input_stream)
                  throws IOException,
                         ClassNotFoundException
Called during unmarshaling in server Supported API: false

Specified by:
readExternal in interface Externalizable
Throws:
IOException
ClassNotFoundException

writeExternal

public void writeExternal(ObjectOutput output_stream)
                   throws IOException
Called during marshaling Supported API: false

Specified by:
writeExternal in interface Externalizable
Throws:
IOException

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