Package com.knowgate.jcifs.ntlmssp

Examples of com.knowgate.jcifs.ntlmssp.Type3Message


            connection.connect(); // send type 1
            response = parseResponseCode();
            if (response != HTTP_UNAUTHORIZED && response != HTTP_PROXY_AUTH) {
                return;
            }
            Type3Message type3 = (Type3Message) attemptNegotiation(response);
            if (type3 == null) return;
            connection.setRequestProperty(authProperty, method + ' ' + Base64Encoder.encode(type3.toByteArray()));
            connection.connect(); // send type 3
            response = parseResponseCode();
            if (response != HTTP_UNAUTHORIZED && response != HTTP_PROXY_AUTH) {
                return;
            }
View Full Code Here


                        password = new String(auth.getPassword());
                    }
                } catch (Exception ex) { }
            }
            Type2Message type2 = (Type2Message) message;
            message = new Type3Message(type2, password, domain, user,
                    Type3Message.getDefaultWorkstation());
        }
        return message;
    }
View Full Code Here

                Type1Message type1 = new Type1Message(src);
                Type2Message type2 = new Type2Message(type1, challenge, null);
                msg = Base64Encoder.encode(type2.toByteArray());
                resp.setHeader( "WWW-Authenticate", "NTLM " + msg );
            } else if (src[8] == 3) {
                Type3Message type3 = new Type3Message(src);
                byte[] lmResponse = type3.getLMResponse();
                if (lmResponse == null) lmResponse = new byte[0];
                byte[] ntResponse = type3.getNTResponse();
                if (ntResponse == null) ntResponse = new byte[0];
                return new NtlmPasswordAuthentication(type3.getDomain(),
                        type3.getUser(), challenge, lmResponse, ntResponse);
            }
        } else {
            resp.setHeader("WWW-Authenticate", "NTLM");
            resp.setHeader("Connection", "close");
        }
View Full Code Here

TOP

Related Classes of com.knowgate.jcifs.ntlmssp.Type3Message

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.