Skip to content

Commit

Permalink
Fix references to the old /authenticate endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
imobachgs committed Mar 11, 2024
1 parent ba43b24 commit bf867cf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions rust/WEB-SERVER.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"}⏎
Expand Down
2 changes: 1 addition & 1 deletion rust/agama-cli/src/auth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down

0 comments on commit bf867cf

Please sign in to comment.