pub struct UnifiedApiKey { /* private fields */ }
Expand description
Represents all metadata for an App Store Connect API Key.
This is a convenience type to aid in the generic representation of all the components of an App Store Connect API Key. The type supports serialization so we save as a single file or payload to enhance usability (so people don’t need to provide all 3 pieces of the API Key for all operations).
Implementations§
Source§impl UnifiedApiKey
impl UnifiedApiKey
Sourcepub fn from_ecdsa_pem_path(
issuer_id: impl ToString,
key_id: impl ToString,
path: impl AsRef<Path>,
) -> Result<Self>
pub fn from_ecdsa_pem_path( issuer_id: impl ToString, key_id: impl ToString, path: impl AsRef<Path>, ) -> Result<Self>
Construct an instance from constitute parts and a PEM encoded ECDSA private key.
This is what you want to use if importing a private key from the file downloaded from the App Store Connect web interface.
Sourcepub fn from_json(data: impl AsRef<[u8]>) -> Result<Self>
pub fn from_json(data: impl AsRef<[u8]>) -> Result<Self>
Construct an instance from serialized JSON.
Sourcepub fn from_json_path(path: impl AsRef<Path>) -> Result<Self>
pub fn from_json_path(path: impl AsRef<Path>) -> Result<Self>
Construct an instance from a JSON file.
Sourcepub fn to_json_string(&self) -> Result<String>
pub fn to_json_string(&self) -> Result<String>
Serialize this instance to a JSON object.
Sourcepub fn write_json_file(&self, path: impl AsRef<Path>) -> Result<()>
pub fn write_json_file(&self, path: impl AsRef<Path>) -> Result<()>
Write this instance to a JSON file.
Since the file contains sensitive data, it will have limited read permissions on platforms where this is implemented. Parent directories will be created if missing using default permissions for created directories.
Permissions on the resulting file may not be as restrictive as desired. It is up to callers to additionally harden as desired.
Trait Implementations§
Source§impl Clone for UnifiedApiKey
impl Clone for UnifiedApiKey
Source§fn clone(&self) -> UnifiedApiKey
fn clone(&self) -> UnifiedApiKey
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for UnifiedApiKey
impl Debug for UnifiedApiKey
Source§impl<'de> Deserialize<'de> for UnifiedApiKey
impl<'de> Deserialize<'de> for UnifiedApiKey
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Serialize for UnifiedApiKey
impl Serialize for UnifiedApiKey
Source§impl TryFrom<UnifiedApiKey> for ConnectTokenEncoder
impl TryFrom<UnifiedApiKey> for ConnectTokenEncoder
Auto Trait Implementations§
impl Freeze for UnifiedApiKey
impl RefUnwindSafe for UnifiedApiKey
impl Send for UnifiedApiKey
impl Sync for UnifiedApiKey
impl Unpin for UnifiedApiKey
impl UnwindSafe for UnifiedApiKey
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)