objc2_authentication_services/generated/
ASAccountAuthenticationModificationUpgradePasswordToStrongPasswordRequest.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9extern_class!(
10    /// [Apple's documentation](https://developer.apple.com/documentation/authenticationservices/asaccountauthenticationmodificationupgradepasswordtostrongpasswordrequest?language=objc)
11    #[unsafe(super(ASAccountAuthenticationModificationRequest, NSObject))]
12    #[derive(Debug, PartialEq, Eq, Hash)]
13    #[cfg(feature = "ASAccountAuthenticationModificationRequest")]
14    pub struct ASAccountAuthenticationModificationUpgradePasswordToStrongPasswordRequest;
15);
16
17#[cfg(feature = "ASAccountAuthenticationModificationRequest")]
18extern_conformance!(
19    unsafe impl NSObjectProtocol
20        for ASAccountAuthenticationModificationUpgradePasswordToStrongPasswordRequest
21    {
22    }
23);
24
25#[cfg(feature = "ASAccountAuthenticationModificationRequest")]
26impl ASAccountAuthenticationModificationUpgradePasswordToStrongPasswordRequest {
27    extern_methods!(
28        #[cfg(feature = "ASCredentialServiceIdentifier")]
29        /// Creates a request for a strong password upgrade invoked within the extension's containing app.
30        ///
31        /// Parameter `user`: The username for the account to upgrade.
32        ///
33        /// Parameter `serviceIdentifier`: The service identifier of the credential the user wishes to upgrade.
34        ///
35        /// Parameter `userInfo`: A dictionary the app can use to pass information to the extension, most likely to help with authorizing the upgrade.
36        ///
37        /// In this flow, when the extension is invoked from within the containing app, the extension
38        /// will receive an empty password for the credential to upgrade. It should check that it is authorized to perform
39        /// the upgrade. The authorization check should ideally be done with information in userInfo, but may involve
40        /// communicating with a backend server or using a shared data container between the app and extension.
41        ///
42        /// # Safety
43        ///
44        /// `user_info` generic should be of the correct type.
45        #[unsafe(method(initWithUser:serviceIdentifier:userInfo:))]
46        #[unsafe(method_family = init)]
47        pub unsafe fn initWithUser_serviceIdentifier_userInfo(
48            this: Allocated<Self>,
49            user: &NSString,
50            service_identifier: &ASCredentialServiceIdentifier,
51            user_info: Option<&NSDictionary>,
52        ) -> Retained<Self>;
53
54        #[unsafe(method(user))]
55        #[unsafe(method_family = none)]
56        pub unsafe fn user(&self) -> Retained<NSString>;
57
58        #[cfg(feature = "ASCredentialServiceIdentifier")]
59        #[unsafe(method(serviceIdentifier))]
60        #[unsafe(method_family = none)]
61        pub unsafe fn serviceIdentifier(&self) -> Retained<ASCredentialServiceIdentifier>;
62
63        #[unsafe(method(userInfo))]
64        #[unsafe(method_family = none)]
65        pub unsafe fn userInfo(&self) -> Option<Retained<NSDictionary>>;
66    );
67}
68
69/// Methods declared on superclass `NSObject`.
70#[cfg(feature = "ASAccountAuthenticationModificationRequest")]
71impl ASAccountAuthenticationModificationUpgradePasswordToStrongPasswordRequest {
72    extern_methods!(
73        #[unsafe(method(init))]
74        #[unsafe(method_family = init)]
75        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
76
77        #[unsafe(method(new))]
78        #[unsafe(method_family = new)]
79        pub unsafe fn new() -> Retained<Self>;
80    );
81}