parent
bc6860d1e9
commit
0bb1961f43
|
@ -43,8 +43,9 @@ Hagrid has it's own URL scheme to fetch keys, verify user IDs and delete keys.
|
||||||
It's meant to be machine readable, but it's not a REST API. The following URLs
|
It's meant to be machine readable, but it's not a REST API. The following URLs
|
||||||
are handled.
|
are handled.
|
||||||
|
|
||||||
- `GET /by-fpr/<fingerprint>` retrieves the key with the given fingerprint.
|
- `GET /by-fingerprint/<fingerprint>` retrieves the key with the given
|
||||||
- `GET /by-kid/<key ID>` retrieves the key with the given long key ID.
|
fingerprint.
|
||||||
|
- `GET /by-keyid/<key ID>` retrieves the key with the given long key ID.
|
||||||
- `GET /by-email/<URL-encoded user ID>` retrieves the key with the given user
|
- `GET /by-email/<URL-encoded user ID>` retrieves the key with the given user
|
||||||
ID. Only exact matches are accepted.
|
ID. Only exact matches are accepted.
|
||||||
- `GET /vks/verify/<token>` verifies a user ID using a token string send by
|
- `GET /vks/verify/<token>` verifies a user ID using a token string send by
|
||||||
|
|
|
@ -153,8 +153,8 @@ fn key_to_response<'a, 'b>(bytes: &'a [u8]) -> Response<'b> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[get("/by-fpr/<fpr>")]
|
#[get("/by-fingerprint/<fpr>")]
|
||||||
fn by_fpr(db: rocket::State<Polymorphic>, fpr: String) -> Response {
|
fn by_fingerprint(db: rocket::State<Polymorphic>, fpr: String) -> Response {
|
||||||
use rocket::http::{ContentType, Status};
|
use rocket::http::{ContentType, Status};
|
||||||
use std::io::Cursor;
|
use std::io::Cursor;
|
||||||
|
|
||||||
|
@ -197,8 +197,8 @@ fn by_email(db: rocket::State<Polymorphic>, email: String) -> Response {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[get("/by-kid/<kid>")]
|
#[get("/by-keyid/<kid>")]
|
||||||
fn by_kid(db: rocket::State<Polymorphic>, kid: String) -> Response {
|
fn by_keyid(db: rocket::State<Polymorphic>, kid: String) -> Response {
|
||||||
use rocket::http::{ContentType, Status};
|
use rocket::http::{ContentType, Status};
|
||||||
use std::io::Cursor;
|
use std::io::Cursor;
|
||||||
|
|
||||||
|
@ -504,8 +504,8 @@ pub fn serve(opt: &Opt, db: Polymorphic) -> Result<()> {
|
||||||
files,
|
files,
|
||||||
// nginx-supported lookup
|
// nginx-supported lookup
|
||||||
by_email,
|
by_email,
|
||||||
by_fpr,
|
by_fingerprint,
|
||||||
by_kid,
|
by_keyid,
|
||||||
// HKP
|
// HKP
|
||||||
lookup,
|
lookup,
|
||||||
upload::multipart_upload,
|
upload::multipart_upload,
|
||||||
|
|
Loading…
Reference in New Issue