Ejemplo n.º 1
0
        public PinAuthData(string authType, string pin, SPCApiBridge spcApi)
        {
            AuthType = authType;
            string serverHello = spcApi.GenerateServerHello(pin);

            Pin = serverHello;
        }
Ejemplo n.º 2
0
 public void Initialize(string userId)
 {
     if (this.wrapped != null)
     {
         this.wrapped.Dispose();
     }
     this.wrapped = new SPCApiBridge(userId);
 }
Ejemplo n.º 3
0
        public AckAuthData(string authType, string pin, string data, SPCApiBridge spiApi)
        {
            var regexPattern = "[{\\\"\\w:]GeneratorClientHello[\\\\\\\":]*([\\d\\w]*)";
            var requestData  = Regex.Match(data, regexPattern).Groups[1].Value;

            var regexRequestPattern = "[{\\\"\\w:]request_id[\\\\\\\":]*([\\d\\w]*)";
            var requestId           = Regex.Match(data, regexRequestPattern).Groups[1].Value;

            AuthType = authType;

            var parsed = spiApi.ParseClientHello(pin, requestData);

            if (parsed)
            {
                RequestId = requestId;
                Ack       = spiApi.GenerateServerAck();
            }
        }
Ejemplo n.º 4
0
 public PairingSession(string id)
 {
     Id      = id;
     _spcApi = new SPCApiBridge("654321");
 }