パッケージ 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.- 関連項目:
- 直列化された形式
-
-
ネストされたクラスの概要
-
クラスから継承されたネストされたクラス/インタフェース jcifs.smb.NtlmPasswordAuthenticator
NtlmPasswordAuthenticator.AuthenticationType
-
-
コンストラクタの概要
コンストラクタ コンストラクタ 説明 Kerb5Authenticator(Subject subject)Construct aKerb5Authenticatorobject withSubjectwhich hold TGT retrieved from KDC.Kerb5Authenticator(Subject subject, String domain, String username, String password)Construct aKerb5Authenticatorobject withSubjectand potential NTLM fallback (if the server does not support kerberos).
-
メソッドの概要
すべてのメソッド staticメソッド インスタンス・メソッド concreteメソッド 修飾子とタイプ メソッド 説明 Kerb5Authenticatorclone()static voidcloneInternal(Kerb5Authenticator to, Kerb5Authenticator from)Clone the contextSSPContextcreateContext(CIFSContext tc, String targetDomain, String host, byte[] initialToken, boolean doSigning)booleanequals(Object other)Compares two NtlmPasswordAuthentication objects for equality.intgetLifeTime()Get lifetime of this context.StringgetRealm()StringgetService()Get the service name.SubjectgetSubject()Get theSubjectobject.StringgetUser()Get the user name which authenticate against to.StringgetUserDomain()Returns the domain.intgetUserLifeTime()Get lifetime of current user.inthashCode()Return the upcased username hash code.booleanisAnonymous()booleanisPreferredMech(org.bouncycastle.asn1.ASN1ObjectIdentifier mechanism)voidrefresh()voidsetForceFallback(boolean forceFallback)Testing only: force fallback to NTLMvoidsetLifeTime(int time)Set the lifetime for this context.voidsetRealm(String realm)voidsetService(String name)Set the service name which is used to setupGSSContext.protected voidsetSubject(Subject subject)voidsetUser(String name)Set the user name which is used to setupGSSContext.voidsetUserLifeTime(int time)Set lifetime of current user.StringtoString()Return the domain and username in the format: domain\\username.-
クラスから継承されたメソッド jcifs.smb.NtlmPasswordAuthenticator
cloneInternal, getAnsiHash, getName, getNTHash, getPassword, getSigningKey, getSpecifiedUserDomain, getUnicodeHash, getUsername, getUserSessionKey, getUserSessionKey, guessAuthenticationType, isGuest, unwrap
-
-
-
-
コンストラクタの詳細
-
Kerb5Authenticator
public Kerb5Authenticator(Subject subject)
Construct aKerb5Authenticatorobject withSubjectwhich 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 aKerb5Authenticatorobject withSubjectand 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 theSubjectobject.- 定義:
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()
クラスからコピーされた説明:NtlmPasswordAuthenticatorReturns the domain.- 定義:
getUserDomainインタフェース内Credentials- オーバーライド:
getUserDomainクラス内NtlmPasswordAuthenticator- 戻り値:
- the domain the user account is in
-
-