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 more