Exemplo n.º 1
0
        public async Task <object> PostValidateKeyAsync([FromBody] KeyAuth key)
        {
            Keycode _keycode = await db.Keycodes.FindAsync(key.keyCode);

            if (_keycode == null || _keycode.TokenId != key.tokenId)
            {
                return(null);
            }

            //Key can be registered.
            //For debugging, simply return the keycode for now
            return(_keycode);
        }
Exemplo n.º 2
0
 public TestDevice(string genId, KeyAuth auth)
 {
     this.GenId = genId;
     this.Auth  = auth;
 }