API Authentication

Test Cases

1. Basic Credentials

{
  "login": "admin",
  "password": "admin"
}

2. Empty Credentials

{
  "login": "",
  "password": ""
}

3. Null Values

{
  "login": null,
  "password": null
}

4. Credentials as Numbers

{
  "login": 123,
  "password": 456
}

6. Credentials as Booleans

7. Credentials as Arrays

8. Credentials as Objects

9. Special Characters in Credentials

10. SQL Injection

11. HTML Tags in Credentials

12. Unicode in Credentials

13. Credentials with Escape Characters

14. Credentials with White Space

15. Overlong Values

16. Malformed JSON (Missing Brace)

17. Malformed JSON (Extra Comma)

18. Missing Login Key

19. Missing Password Key

20. Swapped Key Values

21. Extra Keys

22. Missing Colon

23. Invalid Boolean as Credentials

25. All Keys, No Values

26. Nested Objects

27. Case Sensitivity Testing

28. Login as a Number, Password as a String

29. Login as a String, Password as a Number

30. Repeated Keys

31. Single Quotes Instead of Double

33. Login and Password with Only Special Characters

34. Unicode Escape Sequence

35. Value as Object Instead of String

37. Nonexistent Variables as Values

38. Extra Nested Objects

39. Hexadecimal Values

40. Extra Symbols After Valid JSON

41. Only Keys, Without Values

42. Insertion of Control Characters

43. Long Unicode Strings

44. Newline Characters in Strings

45. Tab Characters in Strings

46. Test with HTML Content in Strings

47. JSON Injection in Strings

48. Test with XML Content in Strings

49. Combination of Number, Strings, and Special Characters

50. Use of Environment Variables

51. Backslashes in Strings

52. Long Strings of Special Characters

53. Empty Key in JSON

55. JSON Injection in Key

56. Quotation Marks in Strings

57. Credentials as Nested Arrays

58. Credentials as Nested Objects

59. Keys as Numbers

60. Testing with Greater Than and Less Than Signs

85. Negative Numbers as Strings

86. Values as URLs

87. Strings with Email Format

88. Strings with IP Address Format

89. Strings with Date Format

90. JSON with Exponential Values

91. JSON with Negative Exponential Values

92. Using Zero Width Space (U+200B) in Strings

93. Using Zero Width Joiner (U+200D) in Strings

94. JSON with Extremely Large Numbers

95. Strings with Backspace Characters

96. Test with Emoji in Strings

97. JSON with Comments (Note: Comments are not officially supported in JSON)

98. JSON with Base64 Encoded Values

99. Including Null Byte Character (May cause truncation)

100. JSON with Credentials in Scientific Notation

102. Strings with Octal Values

103. Writeup Test Case

104. Writeup Test Case (Alternate Format)


Last updated