use crate::TimestampInSeconds;
use ockam_vault::SigningSecretKeyHandle;
pub struct IdentityOptions {
pub(super) signing_secret_key_handle: SigningSecretKeyHandle,
pub(super) revoke_all_purpose_keys: bool,
pub(super) created_at: TimestampInSeconds,
pub(super) expires_at: TimestampInSeconds,
}
impl IdentityOptions {
pub fn new(
signing_secret_key_handle: SigningSecretKeyHandle,
revoke_all_purpose_keys: bool,
created_at: TimestampInSeconds,
expires_at: TimestampInSeconds,
) -> Self {
Self {
signing_secret_key_handle,
revoke_all_purpose_keys,
created_at,
expires_at,
}
}
pub fn signing_secret_key_handle(&self) -> &SigningSecretKeyHandle {
&self.signing_secret_key_handle
}
pub fn revoke_all_purpose_keys(&self) -> bool {
self.revoke_all_purpose_keys
}
pub fn created_at(&self) -> TimestampInSeconds {
self.created_at
}
pub fn expires_at(&self) -> TimestampInSeconds {
self.expires_at
}
}