mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-11-03 13:30:39 +08:00
refactor(api_keys): use a KMS encrypted API key hashing key and remove key ID prefix from plaintext API keys (#639)
Co-authored-by: Arun Raj M <jarnura47@gmail.com>
This commit is contained in:
@ -1,5 +1,4 @@
|
||||
use diesel::{AsChangeset, AsExpression, Identifiable, Insertable, Queryable};
|
||||
use masking::Secret;
|
||||
use time::PrimitiveDateTime;
|
||||
|
||||
use crate::schema::api_keys;
|
||||
@ -11,7 +10,6 @@ pub struct ApiKey {
|
||||
pub merchant_id: String,
|
||||
pub name: String,
|
||||
pub description: Option<String>,
|
||||
pub hash_key: Secret<String>,
|
||||
pub hashed_api_key: HashedApiKey,
|
||||
pub prefix: String,
|
||||
pub created_at: PrimitiveDateTime,
|
||||
@ -26,7 +24,6 @@ pub struct ApiKeyNew {
|
||||
pub merchant_id: String,
|
||||
pub name: String,
|
||||
pub description: Option<String>,
|
||||
pub hash_key: Secret<String>,
|
||||
pub hashed_api_key: HashedApiKey,
|
||||
pub prefix: String,
|
||||
pub created_at: PrimitiveDateTime,
|
||||
|
||||
Reference in New Issue
Block a user