Package jcifs.ntlmssp

Examples of jcifs.ntlmssp.Type3Message


            String domain = credentials.substring(0, credentials.indexOf("\\"));
            String user = credentials.substring(domain.length()+1, credentials.indexOf(":"));
            String password = credentials.substring(domain.length()+user.length()+2);
            Type2Message type2 = (Type2Message) message;
            flags ^= NtlmFlags.NTLMSSP_NEGOTIATE_OEM;
            message = new Type3Message(type2, password, domain, user, null, flags);
        }
        return authMethod + " " + Base64.encode(message.toByteArray());
    }
View Full Code Here


          // confidentiality, session security and 128-bit encryption while creating TYpe3Message.
          // As the immediate lines of code below to the constructor set all these required flags, passing 0 as a parameter/falg to create
          // Type3Message object is valid. Please refer the below URL for more details.
          // http://code.google.com/p/google-enterprise-connector-sharepoint/issues/detail?id=63

      Type3Message t3m = new Type3Message(t2m, password, domain, username, host, 0);

          t3m.setFlag(NtlmSsp.NTLMSSP_NEGOTIATE_SIGN,true);
          t3m.setFlag(NtlmSsp.NTLMSSP_NEGOTIATE_SEAL,true);
          t3m.setFlag(NtlmSsp.NTLMSSP_NEGOTIATE_NTLM2,true);
          t3m.setFlag(NtlmSsp.NTLMSSP_NEGOTIATE_128,true);

          return EncodingUtil.getAsciiString(Base64.encodeBase64(t3m.toByteArray()));
          }catch(IOException e)
          {
            throw new AuthenticationException(e.getMessage());
          }
        }
View Full Code Here

      // confidentiality, session security and 128-bit encryption while creating TYpe3Message
      // object.as the immediate lines of code below to this constructor set all these required flags, passing 0 as a parameter/falg to create
      // Type3Message object is valid. Please refer the below URL for more details.
      // http://code.google.com/p/google-enterprise-connector-sharepoint/issues/detail?id=63

      Type3Message t3m = new Type3Message(t2m, password, domain, username, host, 0);

      t3m.setFlag(NtlmSsp.NTLMSSP_NEGOTIATE_SIGN,true);
      t3m.setFlag(NtlmSsp.NTLMSSP_NEGOTIATE_SEAL,true);
      t3m.setFlag(NtlmSsp.NTLMSSP_NEGOTIATE_NTLM2,true);
      t3m.setFlag(NtlmSsp.NTLMSSP_NEGOTIATE_128,true);
     
      return EncodingUtil.getAsciiString(Base64.encodeBase64(t3m.toByteArray()));
      }catch(IOException e)
      {
        throw new AuthenticationException(e.getMessage());
      }
    }
View Full Code Here

TOP

Related Classes of 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.