From bf867cf39e486e2dff92a08cedf73bb30d62c137 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Imobach=20Gonz=C3=A1lez=20Sosa?= Date: Mon, 11 Mar 2024 12:20:56 +0000 Subject: [PATCH] Fix references to the old /authenticate endpoint --- rust/WEB-SERVER.md | 4 ++-- rust/agama-cli/src/auth.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/rust/WEB-SERVER.md b/rust/WEB-SERVER.md index 75534d03ee..4d462e0085 100644 --- a/rust/WEB-SERVER.md +++ b/rust/WEB-SERVER.md @@ -68,10 +68,10 @@ $ curl http://localhost:3000/ping ### Authentication The web server uses a bearer token for HTTP authentication. You can get the token by providing your -password to the `/authenticate` endpoint. +password to the `/auth` endpoint. ``` -$ curl http://localhost:3000/authenticate \ +$ curl http://localhost:3000/auth \ -H "Content-Type: application/json" \ -d '{"password": "your-password"}' {"token":"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE3MDg1MTA5MzB9.3HmKAC5u4H_FigMqEa9e74OFAq40UldjlaExrOGqE0U"}⏎ diff --git a/rust/agama-cli/src/auth.rs b/rust/agama-cli/src/auth.rs index 0e1c34bf13..2d7321fd89 100644 --- a/rust/agama-cli/src/auth.rs +++ b/rust/agama-cli/src/auth.rs @@ -9,7 +9,7 @@ use std::os::unix::fs::PermissionsExt; use std::path::{Path, PathBuf}; const DEFAULT_JWT_FILE: &str = ".agama/agama-jwt"; -const DEFAULT_AUTH_URL: &str = "http://localhost:3000/api/authenticate"; +const DEFAULT_AUTH_URL: &str = "http://localhost:3000/api/auth"; const DEFAULT_FILE_MODE: u32 = 0o600; #[derive(Subcommand, Debug)]