pub struct Apple { /* private fields */ }Implementations§
Source§impl Apple
impl Apple
Sourcepub fn from_config(cfg: &Config) -> Result<Option<Arc<Apple>>>
pub fn from_config(cfg: &Config) -> Result<Option<Arc<Apple>>>
From the config, when it names a key.
Sourcepub fn services_id(&self) -> Option<&str>
pub fn services_id(&self) -> Option<&str>
The website’s Services ID, when the website signs in with Apple.
Where to send a browser to sign in with Apple (the website’s flow:
Apple posts the answer back to redirect).
Sourcepub async fn verify(&self, token: &str, nonce: &str) -> Result<AppleId>
pub async fn verify(&self, token: &str, nonce: &str) -> Result<AppleId>
Check an identity token from the app and the nonce it sent Apple (raw here; Apple holds its SHA-256, hex).
Sourcepub async fn notification(&self, payload: &str) -> Result<Notice>
pub async fn notification(&self, payload: &str) -> Result<Notice>
A server-to-server notification’s event (Apple posts
{"payload": "<JWT>"}), once checked: Apple signed it, for one of
our ids.
Sourcepub async fn redeem(
&self,
code: &str,
id: &AppleId,
redirect: Option<&str>,
) -> Result<Option<String>>
pub async fn redeem( &self, code: &str, id: &AppleId, redirect: Option<&str>, ) -> Result<Option<String>>
Trade the app’s authorization code for a refresh token, checking it
was issued to the same person. Ok(None): Apple gave no refresh
token (it doesn’t always).
redirect: the website’s return URL, which a code from the website’s
flow is traded with.
Auto Trait Implementations§
impl !Freeze for Apple
impl !RefUnwindSafe for Apple
impl !UnwindSafe for Apple
impl Send for Apple
impl Sync for Apple
impl Unpin for Apple
impl UnsafeUnpin for Apple
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more