public void LoginTestMethod1() { Configuration.Configure(); AccountBussiness accountBussines = new AccountBussiness(); SignInMessage msg = new SignInMessage(); msg.UserName = "******"; RSAEncryptionCreator encryption = new RSAEncryptionCreator(); msg.Password = encryption.PublicEncryption("123"); msg.ClientId = "1"; var result = accountBussines.Authenticate(msg); Assert.AreNotEqual(result.HasError, true); Assert.AreNotEqual(result.IdentityToken.Signature, string.Empty); TokenValidator validator = new TokenValidator(); var tokenValidation = validator.ValiateIdentityToken(result.IdentityToken); var strToken = result.IdentityToken.ToString(); IdentityToken cToken = new IdentityToken(strToken); var strCtoken = cToken.ToString(); Assert.AreEqual(strToken, strCtoken); Assert.AreEqual(tokenValidation.IsError, true); }
public Common.Message.AuthenticationResult Authenticate(Common.Message.SignInMessage message) { AccountBussiness accountBussines = new AccountBussiness(); return(accountBussines.Authenticate(message)); }