| java.lang.Object net.matuschek.http.NTLMAuthorization
NTLMAuthorization | public class NTLMAuthorization implements Serializable,Cloneable(Code) | |
This is an NTLM protocol authorization module for
JOBO.
NTLM is a Microsoft proprietary network authentication protocol used in many
situations and HTTPClient is a versatile and extendible component for
implementing HTTP client applications.
This class relies on
NTLM NTLM class. It also requires a JCE
compliant library (e.g., Cryptix JCE)
that implements MD4 and DES algorithms.
To perform an authentication the following information are needed:
- the host name (with its own domain);
- the user name (with its own domain);
- the user password.
Alternatively, the user password can be replaced with its Lan Manager and
NT hashed versions. On a Windows system these can be collected in the registry
(with a bit of JNI, so), otherwise can be extracted from a SAMBA password
file.
Notice that the host and user domain could not be the same.
author: Luigi Dragone (luigi@luigidragone.com) author: oliver_schmidt See Also: NTLM Authentication Scheme for HTTP See Also: HTTPClient See Also: Hypertext Transfer Protocol -- HTTP/1.1 See Also: HTTP Authentication: Basic and Digest Access Authentication version: $Id: NTLMAuthorization.java,v 1.2 2003/05/23 17:00:00 oliver_schmidt version: Exp $ version: |
Inner Class :public class MissingJceException extends Exception | |
PROXY_AUTHENTICATE_HEADER | final public static String PROXY_AUTHENTICATE_HEADER(Code) | | |
WWW_AUTHENTICATE_HEADER | final public static String WWW_AUTHENTICATE_HEADER(Code) | | |
nonce | transient byte[] nonce(Code) | | |
serialVersionUID | final static long serialVersionUID(Code) | | |
NTLMAuthorization | public NTLMAuthorization()(Code) | | Default constructor requires setting of attributes.
|
NTLMAuthorization | public NTLMAuthorization(String host, String hostDomain, String user, String userDomain, byte[] lmPassword, byte[] ntPassword)(Code) | |
Build an NTLM authorization handler for the specified authentication credentials.
All the arguments are mandatory (null value are not allowed).
Parameters: host - the name of the host that is authenticating Parameters: hostDomain - the name of the domain to which the host belongs Parameters: user - the name of the user Parameters: userDomain - the name of the domain to which the user belongs Parameters: lmPassword - a 16-bytes array containing the Lan Manager hashed password Parameters: ntPassword - a 16-bytes array containing the NT hashed password exception: IllegalArgumentException - if a supplied argument is invalid |
NTLMAuthorization | public NTLMAuthorization(String host, String hostDomain, String user, String userDomain, String password) throws MissingJceException(Code) | |
Build an NTLM authorization handler for the specified authentication credentials.
All the arguments are mandatory (null value are not allowed).
Parameters: host - the name of the host that is authenticating Parameters: hostDomain - the name of the domain to which the host belongs Parameters: user - the name of the user Parameters: userDomain - the name of the domain to which the user belongs Parameters: password - the user's password exception: IllegalArgumentException - if a supplied argument is invalid exception: javax.crypto.NoSuchPaddingException - if there isn't any suitable padding method exception: NoSuchAlgorithmException - if there isn't any suitable cipher algorithm |
addStandardSecurityProvider | final public void addStandardSecurityProvider()(Code) | | Adds a standard security provider "cryptix.jce. provider.CryptixCrypto".
|
getLmPasswordHash | public byte[] getLmPasswordHash()(Code) | | |
getNtPasswordHash | public byte[] getNtPasswordHash()(Code) | | |
getResponse | public String getResponse() throws MissingJceException(Code) | | |
getSecurityProvider | public String getSecurityProvider()(Code) | | |
isComplete | public boolean isComplete()(Code) | | |
setHostDomain | public void setHostDomain(String hostDomain)(Code) | | |
setLmPassword | public void setLmPassword(String password) throws MissingJceException(Code) | | |
setLmPasswordHash | public void setLmPasswordHash(byte[] password)(Code) | | |
setNtPassword | public void setNtPassword(String password) throws MissingJceException(Code) | | |
setNtPasswordHash | public void setNtPasswordHash(byte[] password)(Code) | | |
setPassword | public void setPassword(String password) throws MissingJceException(Code) | | |
setUserDomain | public void setUserDomain(String userDomain)(Code) | | |
|
|