Compare commits
2 commits
18461d3567
...
004eb94e14
Author | SHA1 | Date | |
---|---|---|---|
004eb94e14 | |||
46f620119b |
1 changed files with 5 additions and 5 deletions
|
@ -10,19 +10,19 @@ mod v2 {
|
|||
|
||||
#[derive(PartialEq, Eq, Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct AdminApiToken {
|
||||
/// An admin API key is a bearer token of the following form:
|
||||
/// An admin API token is a bearer token of the following form:
|
||||
/// `<prefix>.<suffix>`
|
||||
/// Only the prefix is saved here, it is used as a key identifier.
|
||||
/// The entire API key is hashed and saved in `token_hash` in `state`.
|
||||
/// Only the prefix is saved here, it is used as an identifier.
|
||||
/// The entire API token is hashed and saved in `token_hash` in `state`.
|
||||
pub prefix: String,
|
||||
|
||||
/// If the key is not deleted, its parameters
|
||||
/// If the token is not deleted, its parameters
|
||||
pub state: crdt::Deletable<AdminApiTokenParams>,
|
||||
}
|
||||
|
||||
#[derive(PartialEq, Eq, Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct AdminApiTokenParams {
|
||||
/// The entire API key hashed as a password
|
||||
/// The entire API token hashed as a password
|
||||
pub token_hash: String,
|
||||
|
||||
/// User-defined name
|
||||
|
|
Loading…
Add table
Reference in a new issue