org.jasig.portal.security.provider
Class BasicLocalConnectionContext

java.lang.Object
  extended by org.jasig.portal.security.LocalConnectionContext
      extended by org.jasig.portal.security.provider.BasicLocalConnectionContext

public class BasicLocalConnectionContext
extends LocalConnectionContext

BasicLocalConnectionContext implements HTTP Basic Authentication as a LocalConnectionContext. Connections are provided as Objects: they may be URL, LDAP, database connections, etc.

In order to use this class you should define two publish time parameters for your channel: remote.username and remote.password. The username and password default to "tomcat" if you don't set them.

Version:
$Revision: 1.1 $ $Date: 2005/05/01 22:07:28 $
Author:
Stephen Barrett, smb1@cornell.edu

Field Summary
protected static java.lang.String AUTHORIZATIONHDR
           
protected static java.lang.String AUTHORIZATIONTYPE
           
protected static java.lang.String CHANPARAMPASSWORD
           
protected static java.lang.String CHANPARAMUSERNAME
           
private  java.lang.String usernameandpassword
           
protected static java.lang.String USERNAMEANDPWDMASK
           
 
Fields inherited from class org.jasig.portal.security.LocalConnectionContext
log, staticData
 
Constructor Summary
BasicLocalConnectionContext()
           
 
Method Summary
 void init(ChannelStaticData sd)
          Constructs the username/password combination from the parameters set at publish time.
 void sendLocalData(java.lang.Object connection, ChannelRuntimeData rd)
          Sets the headers so that the connection will authenticate using HTTP Basic Authentication using the username and password passed set at publish time.
 
Methods inherited from class org.jasig.portal.security.LocalConnectionContext
getDescriptor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CHANPARAMUSERNAME

protected static final java.lang.String CHANPARAMUSERNAME
See Also:
Constant Field Values

CHANPARAMPASSWORD

protected static final java.lang.String CHANPARAMPASSWORD
See Also:
Constant Field Values

AUTHORIZATIONHDR

protected static final java.lang.String AUTHORIZATIONHDR
See Also:
Constant Field Values

AUTHORIZATIONTYPE

protected static final java.lang.String AUTHORIZATIONTYPE
See Also:
Constant Field Values

USERNAMEANDPWDMASK

protected static final java.lang.String USERNAMEANDPWDMASK
See Also:
Constant Field Values

usernameandpassword

private java.lang.String usernameandpassword
Constructor Detail

BasicLocalConnectionContext

public BasicLocalConnectionContext()
Method Detail

init

public void init(ChannelStaticData sd)
Constructs the username/password combination from the parameters set at publish time.

Overrides:
init in class LocalConnectionContext
Parameters:
sd - The calling channel's ChannelStaticData.

sendLocalData

public void sendLocalData(java.lang.Object connection,
                          ChannelRuntimeData rd)
Sets the headers so that the connection will authenticate using HTTP Basic Authentication using the username and password passed set at publish time.

Overrides:
sendLocalData in class LocalConnectionContext
Parameters:
connection - Must be an instance of HttpURLConnection
rd - The calling channel's ChannelRuntimeData.