パッケージ jcifs.smb

クラス NtlmPasswordAuthenticator

    • コンストラクタの詳細

      • NtlmPasswordAuthenticator

        public NtlmPasswordAuthenticator()
        Construct anonymous credentials
      • NtlmPasswordAuthenticator

        public NtlmPasswordAuthenticator​(String username,
                                         String password)
        Create username/password credentials
        パラメータ:
        username -
        password -
      • NtlmPasswordAuthenticator

        public NtlmPasswordAuthenticator​(String domain,
                                         String username,
                                         String password)
        Create username/password credentials with specified domain
        パラメータ:
        domain -
        username -
        password -
      • NtlmPasswordAuthenticator

        protected NtlmPasswordAuthenticator​(String userInfo,
                                            String defDomain,
                                            String defUser,
                                            String defPassword)
        パラメータ:
        userInfo -
    • メソッドの詳細

      • unwrap

        public <T extends Credentials> T unwrap​(Class<T> type)
        定義:
        unwrap インタフェース内 Credentials
        戻り値:
        instance for type, null if the type cannot be unwrapped
      • getUserDomain

        public String getUserDomain()
        Returns the domain.
        定義:
        getUserDomain インタフェース内 Credentials
        戻り値:
        the domain the user account is in
      • getSpecifiedUserDomain

        public String getSpecifiedUserDomain()
        戻り値:
        the original specified user domain
      • getUsername

        public String getUsername()
        Returns the username.
        戻り値:
        the username
      • getPassword

        public String getPassword()
        Returns the password in plain text or null if the raw password hashes were used to construct this NtlmPasswordAuthentication object which will be the case when NTLM HTTP Authentication is used. There is no way to retrieve a users password in plain text unless it is supplied by the user at runtime.
        戻り値:
        the password
      • getName

        public String getName()
        Return the domain and username in the format: domain\\username. This is equivalent to toString().
        定義:
        getName インタフェース内 Principal
      • equals

        public boolean equals​(Object obj)
        Compares two NtlmPasswordAuthentication objects for equality. Two NtlmPasswordAuthentication objects are equal if their caseless domain and username fields are equal
        定義:
        equals インタフェース内 Principal
        オーバーライド:
        equals クラス内 Object
        関連項目:
        Object.equals(java.lang.Object)
      • hashCode

        public int hashCode()
        Return the upcased username hash code.
        定義:
        hashCode インタフェース内 Principal
        オーバーライド:
        hashCode クラス内 Object
      • toString

        public String toString()
        Return the domain and username in the format: domain\\username. This is equivalent to getName().
        定義:
        toString インタフェース内 Principal
        オーバーライド:
        toString クラス内 Object
      • isAnonymous

        public boolean isAnonymous()
        定義:
        isAnonymous インタフェース内 Credentials
        戻り値:
        whether these are anonymous credentials
      • isGuest

        public boolean isGuest()
        定義:
        isGuest インタフェース内 Credentials
        戻り値:
        whether these are guest credentials
      • isPreferredMech

        public boolean isPreferredMech​(org.bouncycastle.asn1.ASN1ObjectIdentifier mechanism)
        パラメータ:
        mechanism -
        戻り値:
        whether the given mechanism is the preferred one for this credential
      • getUnicodeHash

        public byte[] getUnicodeHash​(CIFSContext tc,
                                     byte[] chlng)
                              throws GeneralSecurityException
        Computes the 24 byte Unicode password hash given the 8 byte server challenge.
        パラメータ:
        tc -
        chlng -
        戻り値:
        the hash for the given challenge
        例外:
        GeneralSecurityException
      • getUserSessionKey

        public byte[] getUserSessionKey​(CIFSContext tc,
                                        byte[] chlng)
        Returns the effective user session key.
        パラメータ:
        tc -
        chlng - The server challenge.
        戻り値:
        A byte[] containing the effective user session key, used in SMB MAC signing and NTLMSSP signing and sealing.
      • getUserSessionKey

        public void getUserSessionKey​(CIFSContext tc,
                                      byte[] chlng,
                                      byte[] dest,
                                      int offset)
                               throws SmbException
        Calculates the effective user session key.
        パラメータ:
        tc - context to use
        chlng - The server challenge.
        dest - The destination array in which the user session key will be placed.
        offset - The offset in the destination array at which the session key will start.
        例外:
        SmbException