public class Kerb5Authenticator extends NtlmPasswordAuthentication
Configuration.isDfsConvertToFQDN() for a workaround.| Constructor and Description |
|---|
Kerb5Authenticator(CIFSContext tc,
Subject subject)
Construct a
Kerb5Authenticator object with Subject
which hold TGT retrieved from KDC. |
Kerb5Authenticator(CIFSContext tc,
Subject subject,
String domain,
String username,
String password)
Construct a
Kerb5Authenticator object with Subject and
potential NTLM fallback (if the server does not support kerberos). |
| Modifier and Type | Method and Description |
|---|---|
Kerb5Authenticator |
clone() |
static void |
cloneInternal(Kerb5Authenticator to,
Kerb5Authenticator from)
Clone the context
|
SSPContext |
createContext(CIFSContext tc,
String targetDomain,
String host,
byte[] initialToken,
boolean doSigning) |
boolean |
equals(Object other)
Compares two NtlmPasswordAuthentication objects for
equality.
|
int |
getLifeTime()
Get lifetime of this context.
|
String |
getRealm() |
String |
getService()
Get the service name.
|
Subject |
getSubject()
Get the
Subject object. |
String |
getUser()
Get the user name which authenticate against to.
|
String |
getUserDomain()
Returns the domain.
|
int |
getUserLifeTime()
Get lifetime of current user.
|
int |
hashCode()
Return the upcased username hash code.
|
boolean |
isAnonymous() |
void |
setLifeTime(int time)
Set the lifetime for this context.
|
void |
setRealm(String realm) |
void |
setService(String name)
Set the service name which is used to setup
GSSContext. |
void |
setUser(String name)
Set the user name which is used to setup
GSSContext. |
void |
setUserLifeTime(int time)
Set lifetime of current user.
|
String |
toString()
Return the domain and username in the format:
domain\\username.
|
areHashesExternal, getAnsiHash, getName, getPassword, getSigningKey, getSpecifiedUserDomain, getUnicodeHash, getUsername, getUserSessionKey, getUserSessionKey, isGuest, unwrappublic Kerb5Authenticator(CIFSContext tc, Subject subject)
Kerb5Authenticator object with Subject
which hold TGT retrieved from KDC. If multiple TGT are contained, the
first one will be used to retrieve user principal.tc - context to usesubject - represents the user who perform Kerberos authentication.
It contains tickets retrieve from KDC.public Kerb5Authenticator(CIFSContext tc, Subject subject, String domain, String username, String password)
Kerb5Authenticator object with Subject and
potential NTLM fallback (if the server does not support kerberos).tc - context to usesubject - represents the user who perform Kerberos authentication. Should at least contain a TGT for the user.domain - domain for NTLM fallbackusername - user for NTLM fallbackpassword - password for NTLM fallbackpublic SSPContext createContext(CIFSContext tc, String targetDomain, String host, byte[] initialToken, boolean doSigning) throws SmbException
createContext in interface CredentialsInternalcreateContext in class NtlmPasswordAuthenticationSmbExceptionNtlmPasswordAuthentication.createContext(jcifs.CIFSContext, java.lang.String, java.lang.String,
byte[], boolean)public Kerb5Authenticator clone()
clone in interface CredentialsInternalclone in class NtlmPasswordAuthenticationpublic static void cloneInternal(Kerb5Authenticator to, Kerb5Authenticator from)
to - from - public void setUser(String name)
GSSContext. If null
is set, the default user will be used which is retrieved from the first
TGT found in Subject .name - the user name used to setup GSSContextpublic void setRealm(String realm)
realm - the realm to setpublic String getRealm()
public Subject getSubject()
Subject object.getSubject in interface CredentialsInternalgetSubject in class NtlmPasswordAuthenticationCredentialsInternal.getSubject()public String getUser()
public void setService(String name)
GSSContext.
Program will use this name to require service ticket from KDC.name - the service name used to require service ticket from KDC.public String getService()
public int getUserLifeTime()
public void setUserLifeTime(int time)
time - the lifetime in secondspublic int getLifeTime()
public void setLifeTime(int time)
time - the lifetime in secondspublic boolean isAnonymous()
isAnonymous in interface CredentialsisAnonymous in class NtlmPasswordAuthenticationCredentials.isAnonymous()public String toString()
toString in interface PrincipaltoString in class NtlmPasswordAuthenticationObject.toString()public boolean equals(Object other)
equals in interface Principalequals in class NtlmPasswordAuthenticationNtlmPasswordAuthentication.equals(java.lang.Object)public int hashCode()
hashCode in interface PrincipalhashCode in class NtlmPasswordAuthenticationObject.hashCode()public String getUserDomain()
NtlmPasswordAuthenticationgetUserDomain in interface CredentialsgetUserDomain in class NtlmPasswordAuthenticationCopyright © 2018. All rights reserved.