パッケージ jcifs.smb
クラス Kerb5Authenticator
- java.lang.Object
-
- jcifs.smb.NtlmPasswordAuthenticator
-
- jcifs.smb.Kerb5Authenticator
-
- すべての実装されたインタフェース:
Serializable
,Cloneable
,Principal
,Credentials
,CredentialsInternal
- 直系の既知のサブクラス:
JAASAuthenticator
public class Kerb5Authenticator extends NtlmPasswordAuthenticator
Base kerberos authenticator Uses a subject that contains kerberos credentials for use in GSSAPI context establishment. Be advised that short/NetBIOS name usage is not supported with this authenticator. Always specify full FQDNs. This can be a problem if using DFS in it's default configuration as they still return referrals in short form. See KB-244380 for compatible server configuration. SeeConfiguration.isDfsConvertToFQDN()
for a workaround.- 関連項目:
- 直列化された形式
-
-
コンストラクタの概要
コンストラクタ コンストラクタ 説明 Kerb5Authenticator(Subject subject)
Construct aKerb5Authenticator
object withSubject
which hold TGT retrieved from KDC.Kerb5Authenticator(Subject subject, String domain, String username, String password)
Construct aKerb5Authenticator
object withSubject
and potential NTLM fallback (if the server does not support kerberos).
-
メソッドの概要
すべてのメソッド staticメソッド インスタンス・メソッド concreteメソッド 修飾子とタイプ メソッド 説明 Kerb5Authenticator
clone()
static void
cloneInternal(Kerb5Authenticator to, Kerb5Authenticator from)
Clone the contextSSPContext
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 theSubject
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()
boolean
isPreferredMech(org.bouncycastle.asn1.ASN1ObjectIdentifier mechanism)
void
refresh()
void
setForceFallback(boolean forceFallback)
Testing only: force fallback to NTLMvoid
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 setupGSSContext
.protected void
setSubject(Subject subject)
void
setUser(String name)
Set the user name which is used to setupGSSContext
.void
setUserLifeTime(int time)
Set lifetime of current user.String
toString()
Return the domain and username in the format: domain\\username.-
クラスから継承されたメソッド jcifs.smb.NtlmPasswordAuthenticator
cloneInternal, getAnsiHash, getName, getPassword, getSigningKey, getSpecifiedUserDomain, getUnicodeHash, getUsername, getUserSessionKey, getUserSessionKey, isGuest, unwrap
-
-
-
-
コンストラクタの詳細
-
Kerb5Authenticator
public Kerb5Authenticator(Subject subject)
Construct aKerb5Authenticator
object withSubject
which hold TGT retrieved from KDC. If multiple TGT are contained, the first one will be used to retrieve user principal.- パラメータ:
subject
- represents the user who perform Kerberos authentication. It contains tickets retrieve from KDC.
-
Kerb5Authenticator
public Kerb5Authenticator(Subject subject, String domain, String username, String password)
Construct aKerb5Authenticator
object withSubject
and potential NTLM fallback (if the server does not support kerberos).- パラメータ:
subject
- 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 fallback
-
-
メソッドの詳細
-
setForceFallback
public void setForceFallback(boolean forceFallback)
Testing only: force fallback to NTLM- パラメータ:
forceFallback
- the forceFallback to set
-
createContext
public SSPContext createContext(CIFSContext tc, String targetDomain, String host, byte[] initialToken, boolean doSigning) throws SmbException
- 定義:
createContext
インタフェース内CredentialsInternal
- オーバーライド:
createContext
クラス内NtlmPasswordAuthenticator
- 戻り値:
- a new context
- 例外:
SmbException
- 関連項目:
NtlmPasswordAuthenticator.createContext(jcifs.CIFSContext, java.lang.String, java.lang.String, byte[], boolean)
-
setSubject
protected void setSubject(Subject subject)
- パラメータ:
subject
- the subject to set
-
refresh
public void refresh() throws CIFSException
- 定義:
refresh
インタフェース内CredentialsInternal
- オーバーライド:
refresh
クラス内NtlmPasswordAuthenticator
- 例外:
CIFSException
-
clone
public Kerb5Authenticator clone()
- 定義:
clone
インタフェース内CredentialsInternal
- オーバーライド:
clone
クラス内NtlmPasswordAuthenticator
- 戻り値:
- a copy of the credentials
-
cloneInternal
public static void cloneInternal(Kerb5Authenticator to, Kerb5Authenticator from)
Clone the context- パラメータ:
to
-from
-
-
setUser
public void setUser(String name)
Set the user name which is used to setupGSSContext
. If null is set, the default user will be used which is retrieved from the first TGT found inSubject
.- パラメータ:
name
- the user name used to setupGSSContext
-
setRealm
public void setRealm(String realm)
- パラメータ:
realm
- the realm to set
-
getRealm
public String getRealm()
- 戻り値:
- the kerberos realm
-
getSubject
public Subject getSubject()
Get theSubject
object.- 定義:
getSubject
インタフェース内CredentialsInternal
- オーバーライド:
getSubject
クラス内NtlmPasswordAuthenticator
- 戻り値:
- Subject represents the user who perform Kerberos authentication. It contains the tickets retrieve from KDC.
-
getUser
public String getUser()
Get the user name which authenticate against to. If the default user is used, Null will be returned.- 戻り値:
- user name
-
setService
public void setService(String name)
Set the service name which is used to setupGSSContext
. Program will use this name to require service ticket from KDC.- パラメータ:
name
- the service name used to require service ticket from KDC.
-
getService
public String getService()
Get the service name.- 戻り値:
- the service name used to require service ticket from KDC
-
getUserLifeTime
public int getUserLifeTime()
Get lifetime of current user.- 戻り値:
- the remaining lifetime in seconds. If the default lifetime is used, this value have no meaning.
-
setUserLifeTime
public void setUserLifeTime(int time)
Set lifetime of current user.- パラメータ:
time
- the lifetime in seconds
-
getLifeTime
public int getLifeTime()
Get lifetime of this context.- 戻り値:
- the remaining lifetime in seconds. If the default lifetime is used, this value have no meaning.
-
setLifeTime
public void setLifeTime(int time)
Set the lifetime for this context.- パラメータ:
time
- the lifetime in seconds
-
isAnonymous
public boolean isAnonymous()
- 定義:
isAnonymous
インタフェース内Credentials
- オーバーライド:
isAnonymous
クラス内NtlmPasswordAuthenticator
- 戻り値:
- whether these are anonymous credentials
- 関連項目:
Credentials.isAnonymous()
-
isPreferredMech
public boolean isPreferredMech(org.bouncycastle.asn1.ASN1ObjectIdentifier mechanism)
- オーバーライド:
isPreferredMech
クラス内NtlmPasswordAuthenticator
- 戻り値:
- whether the given mechanism is the preferred one for this credential
- 関連項目:
NtlmPasswordAuthenticator.isPreferredMech(org.bouncycastle.asn1.ASN1ObjectIdentifier)
-
toString
public String toString()
Return the domain and username in the format: domain\\username. This is equivalent to getName().- 定義:
toString
インタフェース内Principal
- オーバーライド:
toString
クラス内NtlmPasswordAuthenticator
- 関連項目:
Object.toString()
-
equals
public boolean equals(Object other)
Compares two NtlmPasswordAuthentication objects for equality. Two NtlmPasswordAuthentication objects are equal if their caseless domain and username fields are equal- 定義:
equals
インタフェース内Principal
- オーバーライド:
equals
クラス内NtlmPasswordAuthenticator
- 関連項目:
NtlmPasswordAuthenticator.equals(java.lang.Object)
-
hashCode
public int hashCode()
Return the upcased username hash code.- 定義:
hashCode
インタフェース内Principal
- オーバーライド:
hashCode
クラス内NtlmPasswordAuthenticator
- 関連項目:
Object.hashCode()
-
getUserDomain
public String getUserDomain()
クラスからコピーされた説明:NtlmPasswordAuthenticator
Returns the domain.- 定義:
getUserDomain
インタフェース内Credentials
- オーバーライド:
getUserDomain
クラス内NtlmPasswordAuthenticator
- 戻り値:
- the domain the user account is in
-
-