public void Get_With_Inline_Token_Returns_True() { string token = identityManagement.Login("t5734", "Lcii9lvy"); OpmVerificationResult res = httpClient.GetWithInlineToken("859182400100447106", token); Assert.AreEqual(true, res.Result); }
public void BasicImTest() { IdentityManagement im = new IdentityManagement("https://am-proxytest.bohemiaenergy.cz/opensso/identity/"); string token = im.Login("t5734", "Lcii9lvy"); const string badToken = "AAABB123123123DFSDFsdfsdf123123dsfsdf123SDFSDF4.*AAJTSQACMDE.*"; bool userValid = im.ValidateUser(badToken); Assert.IsFalse(userValid); IUser user = im.GetUserInfo(badToken); Assert.IsNull(user); userValid = im.ValidateUser(token); Assert.IsTrue(userValid); IUser user2 = im.GetUserInfo(token); Assert.NotNull(user2); Assert.AreEqual(user2.Id, "t5734"); }
public void BasicImTest() { IdentityManagement im = new IdentityManagement(_idmUrl); string token = im.Login("t5734", "Lcii9lvy"); const string badToken = "AAABB123123123DFSDFsdfsdf123123dsfsdf123SDFSDF4.*AAJTSQACMDE.*"; bool userValid = im.ValidateUser(badToken); Assert.IsFalse(userValid); string username = im.GetUsername(badToken); Assert.IsNull(username); userValid = im.ValidateUser(token); Assert.IsTrue(userValid); string username2 = im.GetUsername(token); Assert.NotNull(username2); Assert.AreEqual(username2, "t5734"); }