jdk/src/share/classes/com/sun/security/ntlm/Server.java
changeset 14340 e150cbaf584e
parent 10348 7d1a82029332
child 14342 8435a30053c1
equal deleted inserted replaced
14339:3b561cef789b 14340:e150cbaf584e
   104     /**
   104     /**
   105      * Verifies the Type3 message received from client and returns
   105      * Verifies the Type3 message received from client and returns
   106      * various negotiated information.
   106      * various negotiated information.
   107      * @param type3 the incoming Type3 message from client, must not be null
   107      * @param type3 the incoming Type3 message from client, must not be null
   108      * @param nonce the same nonce provided in {@link #type2}, must not be null
   108      * @param nonce the same nonce provided in {@link #type2}, must not be null
   109      * @return username and hostname of the client in a byte array
   109      * @return client username, client hostname, and the request target
   110      * @throws NTLMException if the incoming message is invalid, or
   110      * @throws NTLMException if the incoming message is invalid, or
   111      * {@code nonce} is null.
   111      * {@code nonce} is null.
   112      */
   112      */
   113     public String[] verify(byte[] type3, byte[] nonce)
   113     public String[] verify(byte[] type3, byte[] nonce)
   114             throws NTLMException {
   114             throws NTLMException {
   192         }
   192         }
   193         if (!verified) {
   193         if (!verified) {
   194             throw new NTLMException(NTLMException.AUTH_FAILED,
   194             throw new NTLMException(NTLMException.AUTH_FAILED,
   195                     "None of LM and NTLM verified");
   195                     "None of LM and NTLM verified");
   196         }
   196         }
   197         return new String[] {username, hostname};
   197         return new String[] {username, hostname, incomingDomain};
   198     }
   198     }
   199 
   199 
   200     /**
   200     /**
   201      * Retrieves the password for a given user. This method should be
   201      * Retrieves the password for a given user. This method should be
   202      * overridden in a concrete class.
   202      * overridden in a concrete class.