示例#1
0
        public void CurrentTimeIsWithinTimeBounds()
        {
            Stellar.Transaction tx    = this.GenerateSignedChallenge(_fixture.UserKeypair, _fixture.DevKeypair);
            Library.Auth.Token  token = new Library.Auth.Token(_fixture.DevKeypair.SecretSeed, tx.ToEnvelopeXdrBase64(), _fixture.UserKeypair.AccountId);

            Assert.True(token.Validate());
        }
示例#2
0
        public void ThrowsErrorIfCurrentTimeIsOutsideTimeBounds()
        {
            Stellar.Transaction tx    = this.GenerateSignedChallenge(_fixture.UserKeypair, _fixture.DevKeypair);
            Library.Auth.Token  token = new Library.Auth.Token(_fixture.DevKeypair.SecretSeed, tx.ToEnvelopeXdrBase64(), _fixture.UserKeypair.AccountId);

            System.Threading.Thread.Sleep(11000);

            Assert.ThrowsAny <Exception>(() => token.Validate());
        }