This commit is contained in:
2019-01-18 00:43:12 +00:00
parent 5e4ea4f410
commit 107b4ff4a0

View File

@@ -38,21 +38,20 @@ namespace raven_integration
public async void JWTExpiredTokenShouldFail()
{
//Valid auth token but expired:
var ValidButExpiredToken="Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOiIxNTQ0NTU5NzAwIiwiZXhwIjoiMTU0NzE1MTcwMCIsImlzcyI6ImF5YW5vdmEuY29tIiwiaWQiOiIxIiwiYXlhbm92YS9yb2xlcyI6IjMyNzY3In0.fMq_8Dvia63rzN_U2zjczPvUNM40OEAeI4VOeV6ulGw";
//Expect status code 401 and result:
//Expect status code 401 and result:
// {{
// "error": {
// "code": "2003",
// "message": "Authentication failed"
// }
// }}
ApiResponse a = await Util.GetAsync("Locale/picklist", ValidButExpiredToken);//lowest level test user because there are no limits on this route except to be authenticated
ApiResponse a = await Util.GetAsync("Locale/picklist", await Util.GetTokenAsync("INTEGRATION_TEST","EXPIRED"));//lowest level test user because there are no limits on this route except to be authenticated
Util.ValidateHTTPStatusCode(a, 401);
}
/*
if (creds.Password == "INTEGRATION_TEST")
switch (creds.Login)
case "EXPIRED":
exp = new DateTimeOffset(DateTime.Now.AddDays(-30).ToUniversalTime(), TimeSpan.Zero);
break;