diff options
author | Frederic Guillot <fred@kanboard.net> | 2017-01-29 11:07:42 -0500 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2017-01-29 11:07:42 -0500 |
commit | 0371acff89b14b9bdcb03e72fd9637e26e6b517c (patch) | |
tree | f5878c9c07705379d137843cb8f92e3cdf7c20a8 /doc/api-authentication.markdown | |
parent | 3bf4789be255650b64f42231f41383cb13b65572 (diff) |
Move English documentation to folder en_US
Diffstat (limited to 'doc/api-authentication.markdown')
-rw-r--r-- | doc/api-authentication.markdown | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/doc/api-authentication.markdown b/doc/api-authentication.markdown deleted file mode 100644 index be536be3..00000000 --- a/doc/api-authentication.markdown +++ /dev/null @@ -1,56 +0,0 @@ -API Authentication -================== - -API endpoint ------------- - -URL: `https://YOUR_SERVER/jsonrpc.php` - - -Default method (HTTP Basic) ---------------------------- - -### Application credentials - -- Username: `jsonrpc` -- Password: API token on the settings page - -### User credentials - -- Username: username -- Password: user password or personal access token - -The API use the [HTTP Basic Authentication Scheme described in the RFC2617](http://www.ietf.org/rfc/rfc2617.txt). - - -Custom HTTP header ------------------- - -You can use an alternative HTTP header for the authentication if your server have a very specific configuration. - -- The header name can be anything you want, by example `X-API-Auth`. -- The header value is the `username:password` encoded in Base64. - -Configuration: - -1. Define your custom header in your `config.php`: `define('API_AUTHENTICATION_HEADER', 'X-API-Auth');` -2. Encode the credentials in Base64, example with PHP `base64_encode('jsonrpc:19ffd9709d03ce50675c3a43d1c49c1ac207f4bc45f06c5b2701fbdf8929');` -3. Test with curl: - -```bash -curl \ --H 'X-API-Auth: anNvbnJwYzoxOWZmZDk3MDlkMDNjZTUwNjc1YzNhNDNkMWM0OWMxYWMyMDdmNGJjNDVmMDZjNWIyNzAxZmJkZjg5Mjk=' \ --d '{"jsonrpc": "2.0", "method": "getAllProjects", "id": 1}' \ -http://localhost/kanboard/jsonrpc.php -``` - -Authentication error --------------------- - -If the credentials are wrong, you will receive a `401 Not Authorized` and the corresponding JSON response. - - -Authorization error -------------------- - -If the connected user is not allowed to access to the resource, you will receive a `403 Forbidden`. |