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
|
||||
are handled.
|
||||
|
||||
- `GET /by-fpr/<fingerprint>` retrieves the key with the given fingerprint.
|
||||
- `GET /by-kid/<key ID>` retrieves the key with the given long key ID.
|
||||
- `GET /by-fingerprint/<fingerprint>` retrieves the key with the given
|
||||
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
|
||||
ID. Only exact matches are accepted.
|
||||
- `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>")]
|
||||
fn by_fpr(db: rocket::State<Polymorphic>, fpr: String) -> Response {
|
||||
#[get("/by-fingerprint/<fpr>")]
|
||||
fn by_fingerprint(db: rocket::State<Polymorphic>, fpr: String) -> Response {
|
||||
use rocket::http::{ContentType, Status};
|
||||
use std::io::Cursor;
|
||||
|
||||
|
@ -197,8 +197,8 @@ fn by_email(db: rocket::State<Polymorphic>, email: String) -> Response {
|
|||
}
|
||||
}
|
||||
|
||||
#[get("/by-kid/<kid>")]
|
||||
fn by_kid(db: rocket::State<Polymorphic>, kid: String) -> Response {
|
||||
#[get("/by-keyid/<kid>")]
|
||||
fn by_keyid(db: rocket::State<Polymorphic>, kid: String) -> Response {
|
||||
use rocket::http::{ContentType, Status};
|
||||
use std::io::Cursor;
|
||||
|
||||
|
@ -504,8 +504,8 @@ pub fn serve(opt: &Opt, db: Polymorphic) -> Result<()> {
|
|||
files,
|
||||
// nginx-supported lookup
|
||||
by_email,
|
||||
by_fpr,
|
||||
by_kid,
|
||||
by_fingerprint,
|
||||
by_keyid,
|
||||
// HKP
|
||||
lookup,
|
||||
upload::multipart_upload,
|
||||
|
|
Loading…
Reference in New Issue