diff options
Diffstat (limited to 'doc/api-authentication.markdown')
-rw-r--r-- | doc/api-authentication.markdown | 36 |
1 files changed, 24 insertions, 12 deletions
diff --git a/doc/api-authentication.markdown b/doc/api-authentication.markdown index 3ba1e8f5..c44a6ef9 100644 --- a/doc/api-authentication.markdown +++ b/doc/api-authentication.markdown @@ -1,4 +1,4 @@ -API Authentication +API de autentificación ================== API endpoint @@ -7,33 +7,39 @@ API endpoint URL: `https://YOUR_SERVER/jsonrpc.php` -Default method (HTTP Basic) +Metedo por default (HTTP Basico) --------------------------- -### Application credentials +### Aplicación de credenciales - Username: `jsonrpc` -- Password: API token on the settings page +- Password: API token para la configuración de pagina -### User credentials +### Credencial de usuario -- Use the real username and password +- Usar el usuario real y su password -The API use the [HTTP Basic Authentication Scheme described in the RFC2617](http://www.ietf.org/rfc/rfc2617.txt). +La API usa la [Autentificación Basica del esquema HTTP descrita en el RFC2617](http://www.ietf.org/rfc/rfc2617.txt). -Custom HTTP header ------------------- +Modificar el header HTTP +------------------------ -You can use an alternative HTTP header for the authentication if your server have a very specific configuration. +Se puede usar un hedear HTTP alternativo para la autentificación si tu servidor es muy especifico +You can use an alternative HTTP header for the authentication if your server have a very specific +configuración. +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: +Configuración: +1. Definir tu cabecera modificada en tu `config.php`: `define('API_AUTHENTICATION_HEADER', 'X-API-Auth');` 1. Define your custom header in your `config.php`: `define('API_AUTHENTICATION_HEADER', 'X-API-Auth');` +2. Codificar las credenciales en Base64, ejemplo con PHP 2. Encode the credentials in Base64, example with PHP `base64_encode('jsonrpc:19ffd9709d03ce50675c3a43d1c49c1ac207f4bc45f06c5b2701fbdf8929');` +3. Verificar con curl 3. Test with curl: ```bash @@ -43,13 +49,19 @@ curl \ http://localhost/kanboard/jsonrpc.php ``` +Error de autentificación +------------------------- Authentication error -------------------- +Si las credenciales son , recibiras un `401 Not Authorized` y el correspondiente respuesta del JSON. If the credentials are wrong, you will receive a `401 Not Authorized` and the corresponding JSON response. + - +Error de Autorización +---------------------- Authorization error ------------------- +Si el usuario no , recibira un `403 Forbidden`. If the connected user is not allowed to access to the resource, you will receive a `403 Forbidden`. |