org.jasig.portal.security.provider
Class BasicLocalConnectionContext
java.lang.Object
org.jasig.portal.security.LocalConnectionContext
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
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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
BasicLocalConnectionContext
public BasicLocalConnectionContext()
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 HttpURLConnectionrd
- The calling channel's ChannelRuntimeData.