简要描述:

  • 验证Token是否合法

接口版本:

版本号 制定人 制定日期 修订日期
1.0.0 朱小乾 2022-03-18

请求URL:

  • /api/Login/CheckToken

请求方式:

  • Get

请求头:

参数名 是否必须 类型 说明
Content-Type string 请求类型: application/json
Equipment string 设备类型(guide-pc :导检台pc;caller-pc :叫号端PC;guide-pad :导检台Pad;caller-pad :叫号端Pad;manage:管理后台)

请求参数:

参数名 是否必须 类型 说明
token string token

返回示例:

正确时返回:

  1. {
  2. "code": 1,
  3. "message": "验证成功",
  4. "data": [
  5. {
  6. "issuer": "http://localhost:5000",
  7. "originalIssuer": "http://localhost:5000",
  8. "properties": {},
  9. "subject": null,
  10. "type": "aud",
  11. "value": "http://localhost:5000",
  12. "valueType": "http://www.w3.org/2001/XMLSchema#string"
  13. },
  14. {
  15. "issuer": "http://localhost:5000",
  16. "originalIssuer": "http://localhost:5000",
  17. "properties": {},
  18. "subject": null,
  19. "type": "iss",
  20. "value": "http://localhost:5000",
  21. "valueType": "http://www.w3.org/2001/XMLSchema#string"
  22. },
  23. {
  24. "issuer": "http://localhost:5000",
  25. "originalIssuer": "http://localhost:5000",
  26. "properties": {},
  27. "subject": null,
  28. "type": "name",
  29. "value": "123456",
  30. "valueType": "http://www.w3.org/2001/XMLSchema#string"
  31. },
  32. {
  33. "issuer": "http://localhost:5000",
  34. "originalIssuer": "http://localhost:5000",
  35. "properties": {},
  36. "subject": null,
  37. "type": "id",
  38. "value": "1",
  39. "valueType": "http://www.w3.org/2001/XMLSchema#string"
  40. },
  41. {
  42. "issuer": "http://localhost:5000",
  43. "originalIssuer": "http://localhost:5000",
  44. "properties": {},
  45. "subject": null,
  46. "type": "role",
  47. "value": "1,2",
  48. "valueType": "http://www.w3.org/2001/XMLSchema#string"
  49. },
  50. {
  51. "issuer": "http://localhost:5000",
  52. "originalIssuer": "http://localhost:5000",
  53. "properties": {},
  54. "subject": null,
  55. "type": "sub",
  56. "value": "password",
  57. "valueType": "http://www.w3.org/2001/XMLSchema#string"
  58. },
  59. {
  60. "issuer": "http://localhost:5000",
  61. "originalIssuer": "http://localhost:5000",
  62. "properties": {},
  63. "subject": null,
  64. "type": "nbf",
  65. "value": "1647586820",
  66. "valueType": "http://www.w3.org/2001/XMLSchema#integer"
  67. },
  68. {
  69. "issuer": "http://localhost:5000",
  70. "originalIssuer": "http://localhost:5000",
  71. "properties": {},
  72. "subject": null,
  73. "type": "exp",
  74. "value": "1647594020",
  75. "valueType": "http://www.w3.org/2001/XMLSchema#integer"
  76. },
  77. {
  78. "issuer": "http://localhost:5000",
  79. "originalIssuer": "http://localhost:5000",
  80. "properties": {},
  81. "subject": null,
  82. "type": "iat",
  83. "value": "1647586820",
  84. "valueType": "http://www.w3.org/2001/XMLSchema#integer"
  85. }
  86. ]
  87. }

错误时返回:

  1. {
  2. "code": 3,
  3. "message": "用户名或密码错误",
  4. "data": null
  5. }

返回参数说明:

参数名 类型 说明

备注:

获取的accessToken作为权限验证token,调用其他接口是放在请求头中
格式为:”Authorization”:”Bearer “+ accessToken (Bearer后面有空格)

文档更新时间: 2022-03-18 15:27