pub unsafe trait ASWebAuthenticationPresentationContextProviding: NSObjectProtocol + MainThreadOnly {
// Provided method
unsafe fn presentationAnchorForWebAuthenticationSession(
&self,
session: &ASWebAuthenticationSession,
) -> Retained<ASPresentationAnchor>
where Self: Sized + Message { ... }
}
Available on crate feature
ASWebAuthenticationSession
only.Expand description
Provides context to target where in an application’s UI the authorization view should be shown.
See also Apple’s documentation
Provided Methods§
Sourceunsafe fn presentationAnchorForWebAuthenticationSession(
&self,
session: &ASWebAuthenticationSession,
) -> Retained<ASPresentationAnchor>
Available on crate feature ASFoundation
and macOS only.
unsafe fn presentationAnchorForWebAuthenticationSession( &self, session: &ASWebAuthenticationSession, ) -> Retained<ASPresentationAnchor>
ASFoundation
and macOS only.Return the ASPresentationAnchor in the closest proximity to where a user interacted with your app to trigger authentication. If starting an ASWebAuthenticationSession on first launch, use the application’s main window.
Parameter session
: The session requesting a presentation anchor.
Returns: The ASPresentationAnchor most closely associated with the UI used to trigger authentication.