Skip to content

plugin(hmac-auth): update the schema #2441

Description

@liuxiran

Part of #2082

Current schema

{
	"additionalProperties": false,
	"properties": {
		"disable": {
			"type": "boolean"
		}
	},
	"title": "work with route or service object",
	"type": "object"
}

the plugin page looks:
2020-10-16 20-39-49屏幕截图


Expected schema

according to the doc and test case

{
  "type": "object",
  "required": [
    "access_key",
    "secret_key"
  ],
  "properties": {
    "access_key": {
      "type": "string",
      "title": "Accesskey"
    },
    "secret_key": {
      "type": "string",
      "title": "Secretkey"
    },
    "algorithm": {
      "type": "string",
      "enum": [
        "hmac-sha1",
        "hmac-sha256",
        "hmac-sha512"
      ],
      "default": "hmac-sha256",
      "title": "Algorithm"
    },
    "clock_skew": {
      "type": "number",
      "title": "clockskew",
      "default": 0
    },
    "signed_headers": {
      "type": "array",
      "title": "A list of strings",
      "items": {
        "type": "string",
        "default": "bazinga"
      }
    }
  }
}

the form looks:

2020-10-16 21-06-48屏幕截图

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions