Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement access credentials request for URL XRefs #2

Open
liutec opened this issue Jul 15, 2015 · 0 comments
Open

Implement access credentials request for URL XRefs #2

liutec opened this issue Jul 15, 2015 · 0 comments

Comments

@liutec
Copy link
Collaborator

liutec commented Jul 15, 2015

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.

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

No branches or pull requests

1 participant