public class NTLMScheme extends Object implements AuthScheme
| 构造器和说明 |
|---|
NTLMScheme()
Default constructor for the NTLM authentication scheme.
|
NTLMScheme(String challenge)
Constructor for the NTLM authentication scheme.
|
| 限定符和类型 | 方法和说明 |
|---|---|
String |
authenticate(Credentials credentials,
HttpMethod method)
Produces NTLM authorization string for the given set of
Credentials. |
String |
authenticate(Credentials credentials,
String method,
String uri)
|
static String |
authenticate(NTCredentials credentials,
String challenge)
已过时。
Use non-static
authenticate(Credentials, HttpMethod) |
static String |
authenticate(NTCredentials credentials,
String challenge,
String charset)
已过时。
Use non-static
authenticate(Credentials, HttpMethod) |
String |
getID()
已过时。
no longer used
|
String |
getParameter(String name)
Returns the authentication parameter with the given name, if available.
|
String |
getRealm()
The concept of an authentication realm is not supported by the NTLM
authentication scheme.
|
String |
getSchemeName()
Returns textual designation of the NTLM authentication scheme.
|
boolean |
isComplete()
Tests if the NTLM authentication process has been completed.
|
boolean |
isConnectionBased()
Returns true.
|
void |
processChallenge(String challenge)
Processes the NTLM challenge.
|
public NTLMScheme()
public NTLMScheme(String challenge) throws MalformedChallengeException
challenge - The authentication challengeMalformedChallengeException - is thrown if the authentication challenge
is malformedpublic void processChallenge(String challenge) throws MalformedChallengeException
processChallenge 在接口中 AuthSchemechallenge - the challenge stringMalformedChallengeException - is thrown if the authentication challenge
is malformedpublic boolean isComplete()
isComplete 在接口中 AuthSchemepublic String getSchemeName()
getSchemeName 在接口中 AuthSchementlmpublic String getRealm()
null.getRealm 在接口中 AuthSchemenullpublic String getID()
Additionally, the ID should take into account any changes to the authentication challenge and return a different value when appropriate. For example when the realm changes in basic authentication it should be considered a different authentication attempt and a different value should be returned.
getID 在接口中 AuthSchemepublic String getParameter(String name)
There are no valid parameters for NTLM authentication so this method always returns null.
getParameter 在接口中 AuthSchemename - The name of the parameter to be returnedpublic boolean isConnectionBased()
isConnectionBased 在接口中 AuthSchemepublic static String authenticate(NTCredentials credentials, String challenge) throws AuthenticationException
authenticate(Credentials, HttpMethod)challenge - The challenge.credentials - NTCredentialsAuthenticationException - is thrown if authentication failspublic static String authenticate(NTCredentials credentials, String challenge, String charset) throws AuthenticationException
authenticate(Credentials, HttpMethod)challenge - The challenge.credentials - NTCredentialscharset - The charset to use for encoding the credentialsAuthenticationException - is thrown if authentication failspublic String authenticate(Credentials credentials, String method, String uri) throws AuthenticationException
Credentials.authenticate 在接口中 AuthSchemecredentials - The set of credentials to be used for athenticationmethod - Method name is ignored by the NTLM authentication schemeuri - URI is ignored by the NTLM authentication schemeInvalidCredentialsException - if authentication credentials
are not valid or not applicable for this authentication schemeAuthenticationException - if authorization string cannot
be generated due to an authentication failureHttpMethod.getName(),
HttpMethod.getPath()public String authenticate(Credentials credentials, HttpMethod method) throws AuthenticationException
Credentials.authenticate 在接口中 AuthSchemecredentials - The set of credentials to be used for athenticationmethod - The method being authenticatedInvalidCredentialsException - if authentication credentials
are not valid or not applicable for this authentication schemeAuthenticationException - if authorization string cannot
be generated due to an authentication failureCopyright © 2017. All rights reserved.