mirror of
https://github.com/meilisearch/meilisearch.git
synced 2025-01-19 01:18:31 +08:00
Change apiKeyPrefix to apiKeyUid
This commit is contained in:
parent
a57b2d9538
commit
b9a79eb858
@ -155,8 +155,8 @@ pub mod policies {
|
|||||||
let token_data = decode::<Claims>(token, &dummy_key, &validation).ok()?;
|
let token_data = decode::<Claims>(token, &dummy_key, &validation).ok()?;
|
||||||
|
|
||||||
// get token fields without validating it.
|
// get token fields without validating it.
|
||||||
let Claims { uid, .. } = token_data.claims;
|
let Claims { api_key_uid, .. } = token_data.claims;
|
||||||
Some(uid)
|
Some(api_key_uid)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn is_keys_action(action: u8) -> bool {
|
fn is_keys_action(action: u8) -> bool {
|
||||||
@ -250,6 +250,6 @@ pub mod policies {
|
|||||||
struct Claims {
|
struct Claims {
|
||||||
search_rules: SearchRules,
|
search_rules: SearchRules,
|
||||||
exp: Option<i64>,
|
exp: Option<i64>,
|
||||||
uid: Uuid,
|
api_key_uid: Uuid,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user