Skip to content

curl examples don't work because of missing '--negotiate -u :' #309

@kparal

Description

@kparal

Looking at https://fasjson.fedoraproject.org/docs/v1/ the examples worked for me in a browser, but didn't work on the command line:

$ curl -X 'GET'   'https://fasjson.fedoraproject.org/v1/me/'   -H 'accept: application/json'
{"message": "The server could not verify that you are authorized to access the URL requested. You either supplied the wrong credentials (e.g. a bad password), or your browser doesn't understand how to supply the credentials required."}

It took me some time to figure out why. The other documentation makes it clear that those curl commands need to include --negotiate -u : :

$ curl --negotiate -u : -X 'GET'   'https://fasjson.fedoraproject.org/v1/me/'   -H 'accept: application/json'
{"result": {"dn": "uid=kparal,cn=users,cn=accounts,dc=fedoraproject,dc=org", "username": "kparal", "service": null, "uri": "https://fasjson.fedoraproject.org/v1/users/kparal/"}}

Please fix the documentation to include those args, thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions