pub struct AppleClientSecretPayload { /* private fields */ }Expand description
https://developer.apple.com/documentation/sign_in_with_apple/generate_and_validate_tokens
In order to eliminate the security related isssue,
this library does not require plain private key.
It is your responsibility to create openssl::ec::EcKey.
Please see its document. In most case, you only need to use
openssl::ec::EcKey::private_key_from_pem and PKey::from_ec_key.
See the following code. Or just use create_pkey.
ⓘ
let pkey = openssl::pkey::PKey::from_ec_key(
openssl::ec::EcKey::private_key_from_pem(b"your private auth key").unwrap(),
).unwrap();Implementations§
Source§impl AppleClientSecretPayload
impl AppleClientSecretPayload
Sourcepub fn new(
team_id: String,
client_id: String,
issued_at: Option<u64>,
valid_while: Option<Duration>,
key_id: String,
pkey: Option<PKey<Private>>,
) -> Result<Self>
pub fn new( team_id: String, client_id: String, issued_at: Option<u64>, valid_while: Option<Duration>, key_id: String, pkey: Option<PKey<Private>>, ) -> Result<Self>
- team_id: From developers account
- client_id: Your bundle id or web client id
- issued_at: iat. Default now.
- valid_while: Max 6 months.
- key_id: From your pem generation
- pkey: From your pem
Trait Implementations§
Source§impl Clone for AppleClientSecretPayload
impl Clone for AppleClientSecretPayload
Source§fn clone(&self) -> AppleClientSecretPayload
fn clone(&self) -> AppleClientSecretPayload
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AppleClientSecretPayload
impl Debug for AppleClientSecretPayload
Source§impl<'de> Deserialize<'de> for AppleClientSecretPayload
impl<'de> Deserialize<'de> for AppleClientSecretPayload
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for AppleClientSecretPayload
impl Serialize for AppleClientSecretPayload
Auto Trait Implementations§
impl Freeze for AppleClientSecretPayload
impl RefUnwindSafe for AppleClientSecretPayload
impl Send for AppleClientSecretPayload
impl Sync for AppleClientSecretPayload
impl Unpin for AppleClientSecretPayload
impl UnwindSafe for AppleClientSecretPayload
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
Mutably borrows from an owned value. Read more