Ejemplo n.º 1
0
 /**
  * Construct a TextSecureAccountManager.
  *
  * @param url The URL for the TextSecure server.
  * @param trustStore The {@link org.whispersystems.textsecure.api.push.TrustStore} for the TextSecure server's TLS certificate.
  * @param user A TextSecure phone number.
  * @param password A TextSecure password.
  */
 public TextSecureAccountManager(String url, TrustStore trustStore,
                                 String user, String password, string userAgent)
 {
     this.pushServiceSocket = new PushServiceSocket(url, trustStore, new StaticCredentialsProvider(user, password, null), userAgent);
     this.user      = user;
     this.userAgent = userAgent;
 }
 /**
  * Construct a TextSecureAccountManager.
  *
  * @param url The URL for the TextSecure server.
  * @param trustStore The {@link org.whispersystems.textsecure.api.push.TrustStore} for the TextSecure server's TLS certificate.
  * @param user A TextSecure phone number.
  * @param password A TextSecure password.
  */
 public TextSecureAccountManager(String url, TrustStore trustStore,
                                 String user, String password, string userAgent)
 {
     this.pushServiceSocket = new PushServiceSocket(url, trustStore, new StaticCredentialsProvider(user, password, null), userAgent);
     this.user = user;
     this.userAgent = userAgent;
 }
 public PushServiceSocket(String serviceUrl, TrustStore trustStore, CredentialsProvider credentialsProvider, string userAgent)
 {
     this.serviceUrl          = serviceUrl;
     this.credentialsProvider = credentialsProvider;
     this.userAgent           = userAgent;
     //this.trustManagers = BlacklistingTrustManager.createFor(trustStore);
 }
Ejemplo n.º 4
0
 public PushServiceSocket(String serviceUrl, TrustStore trustStore, CredentialsProvider credentialsProvider, string userAgent)
 {
     this.serviceUrl = serviceUrl;
     this.credentialsProvider = credentialsProvider;
     this.userAgent = userAgent;
     //this.trustManagers = BlacklistingTrustManager.createFor(trustStore);
 }
 public WebSocketConnection(String httpUri, TrustStore trustStore, CredentialsProvider credentialsProvider, string userAgent)
 {
     this.trustStore = trustStore;
      this.credentialsProvider = credentialsProvider;
     this.wsUri = httpUri.Replace("https://", "wss://")
                                       .Replace("http://", "ws://") + $"/v1/websocket/?login={credentialsProvider.GetUser()}&password={credentialsProvider.GetPassword()}";
     this.userAgent = userAgent;
 }
 public WebSocketConnection(String httpUri, TrustStore trustStore, CredentialsProvider credentialsProvider, string userAgent)
 {
     this.trustStore          = trustStore;
     this.credentialsProvider = credentialsProvider;
     this.wsUri = httpUri.Replace("https://", "wss://")
                  .Replace("http://", "ws://") + $"/v1/websocket/?login={credentialsProvider.GetUser()}&password={credentialsProvider.GetPassword()}";
     this.userAgent = userAgent;
 }
Ejemplo n.º 7
0
 /**
  * Construct a TextSecureMessageReceiver.
  *
  * @param url The URL of the TextSecure server.
  * @param trustStore The {@link org.whispersystems.textsecure.api.push.TrustStore} containing
  *                   the server's TLS signing certificate.
  * @param credentials The TextSecure user's credentials.
  */
 public TextSecureMessageReceiver(String url, TrustStore trustStore, CredentialsProvider credentials, string userAgent)
 {
     this.url                 = url;
     this.trustStore          = trustStore;
     this.credentialsProvider = credentials;
     this.socket              = new PushServiceSocket(url, trustStore, credentials, userAgent);
     this.userAgent           = userAgent;
 }
 /**
  * Construct a TextSecureMessageReceiver.
  *
  * @param url The URL of the TextSecure server.
  * @param trustStore The {@link org.whispersystems.textsecure.api.push.TrustStore} containing
  *                   the server's TLS signing certificate.
  * @param credentials The TextSecure user's credentials.
  */
 public TextSecureMessageReceiver(String url, TrustStore trustStore, CredentialsProvider credentials, string userAgent)
 {
     this.url = url;
     this.trustStore = trustStore;
     this.credentialsProvider = credentials;
     this.socket = new PushServiceSocket(url, trustStore, credentials, userAgent);
     this.userAgent = userAgent;
 }
 /**
  * Construct a TextSecureMessageSender.
  *
  * @param url The URL of the TextSecure server.
  * @param trustStore The trust store containing the TextSecure server's signing TLS certificate.
  * @param user The TextSecure username (eg phone number).
  * @param password The TextSecure user's password.
  * @param store The AxolotlStore.
  * @param eventListener An optional event listener, which fires whenever sessions are
  *                      setup or torn down for a recipient.
  */
 public TextSecureMessageSender(String url, TrustStore trustStore,
                                String user, String password,
                                AxolotlStore store,
                                May<EventListener> eventListener, String userAgent)
 {
     this.socket = new PushServiceSocket(url, trustStore, new StaticCredentialsProvider(user, password, null), userAgent);
     this.store = store;
     this.localAddress = new TextSecureAddress(user);
     this.eventListener = eventListener;
 }
 /**
  * Construct a TextSecureMessageSender.
  *
  * @param url The URL of the TextSecure server.
  * @param trustStore The trust store containing the TextSecure server's signing TLS certificate.
  * @param user The TextSecure username (eg phone number).
  * @param password The TextSecure user's password.
  * @param store The AxolotlStore.
  * @param eventListener An optional event listener, which fires whenever sessions are
  *                      setup or torn down for a recipient.
  */
 public TextSecureMessageSender(String url, TrustStore trustStore,
                                String user, String password,
                                AxolotlStore store,
                                May <EventListener> eventListener, String userAgent)
 {
     this.socket        = new PushServiceSocket(url, trustStore, new StaticCredentialsProvider(user, password, null), userAgent);
     this.store         = store;
     this.localAddress  = new TextSecureAddress(user);
     this.eventListener = eventListener;
 }
Ejemplo n.º 11
0
 public SignalServiceUrl(string url, string hostHeader, TrustStore trustStore)
 {
     this.url        = url;
     this.hostHeader = hostHeader == null ? May.NoValue : new May <string>(hostHeader);
     this.trustStore = trustStore;
 }
Ejemplo n.º 12
0
 public SignalServiceUrl(string url, TrustStore trustStore)
     : this(url, null, trustStore)
 {
 }
Ejemplo n.º 13
0
 /**
  * Construct a TextSecureMessageReceiver.
  *
  * @param url The URL of the TextSecure server.
  * @param trustStore The {@link org.whispersystems.textsecure.api.push.TrustStore} containing
  *                   the server's TLS signing certificate.
  * @param user The TextSecure user's username (eg. phone number).
  * @param password The TextSecure user's password.
  * @param signalingKey The 52 byte signaling key assigned to this user at registration.
  */
 public TextSecureMessageReceiver(String url, TrustStore trustStore,
                                  String user, String password, String signalingKey, string userAgent)
     : this(url, trustStore, new StaticCredentialsProvider(user, password, signalingKey), userAgent)
 {
 }
        /**
         * Construct a TextSecureMessageReceiver.
         *
         * @param url The URL of the TextSecure server.
         * @param trustStore The {@link org.whispersystems.textsecure.api.push.TrustStore} containing
         *                   the server's TLS signing certificate.
         * @param user The TextSecure user's username (eg. phone number).
         * @param password The TextSecure user's password.
         * @param signalingKey The 52 byte signaling key assigned to this user at registration.
         */
        public TextSecureMessageReceiver(String url, TrustStore trustStore,
                                         String user, String password, String signalingKey, string userAgent)
            : this(url, trustStore, new StaticCredentialsProvider(user, password, signalingKey), userAgent)
        {

        }