Skip to content

Implement access credentials request for URL XRefs #2

Description

@liutec

If content-type is application/json and HTTP Code 401 received when fetching the content of an URL XRef, assume that the content is JSON and has the following structure:

{
  "cli": {
    "message": "Enter your credentials", (optional, default "Authentication required")
    "request": {
      "<variable_name>": {
        "prompt": "Enter <variable_name>", (optional, default "Enter variable_name")
        "type": "string/password", (optional, default string)
        "default": "value" (optional, default empty)
      }
    },
    "order": [
      "<variable_name>"
    ]
  }
}

Ask the user to enter each requested variable in the specified order.
After the user has entered all requested variables, post them back as JSON encoded to the XRef's URL. (eg. {"<variable_name>": "value"}
If the "request" key is empty, assume fetching has failed.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions