Platforms to show: All Mac Windows Linux Cross-Platform
ASAuthorizationControllerMBS class New in 25.3
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
class | AuthenticationServices | MBS MacFrameworks Plugin | 25.3 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
Create authorization requests for the credential types your app supports, such as ASAuthorizationAppleIDRequest for Sign in with Apple, or ASAuthorizationPasswordRequest for password credentials. Create an authorization controller using Constructor, supplying the authorization requests you create. Implement the authorization controller’s events to receive responses when requests succeed or fail, and set its presentationContextProvider so that the authorization controller can present UI.
Call performAutoFillAssistedRequests to present inline UI to request credentials, or performRequests to request credentials using modal UI. ASAuthorizationController calls your delegate’s methods when the request completes.
Set the content type of text fields in your app’s login UI so that ASAuthorizationController can detect when to offer AutoFill suggestions. Use UITextContentTypeUsername as the content type for user name text fields, and UITextContentTypePassword for password fields.
- 3 events
- event didCompleteWithAuthorization(authorization as ASAuthorizationMBS)
- event didCompleteWithError(error as NSErrorMBS)
- event presentationAnchorRequested
- 3 properties
- property Description as String
- property Handle as Integer
- property presentationContext as Variant
- 7 methods
- method authorizationRequests as ASAuthorizationRequestMBS()
- method cancel
- method Constructor(requests() as ASAuthorizationRequestMBS)
- method Destructor
- method performAutoFillAssistedRequests
- method performRequests
- method performRequests(options as Integer)
- 2 shared methods
- shared method ASAuthorizationErrorDomain as String
- shared method HasEntitlement(Name as String) as Boolean
- 10 constants
Constants
Constant | Value | Description |
---|---|---|
AuthorizationControllerRequestOptionPreferImmediatelyAvailableCredentials | 1 |
One of the option constants for performRequests.
Tells the authorization controller to prefer credentials that are immediately available on the local device. |
Errors
Constant | Value | Description |
---|---|---|
ErrorCanceled | 1001 |
The user canceled the authorization attempt. |
ErrorCredentialExport | 1008 |
The credential export request failed. |
ErrorCredentialImport | 1007 |
The credential import request failed. |
ErrorFailed | 1004 |
The authorization attempt failed. |
ErrorInvalidResponse | 1002 |
The authorization request received an invalid response. |
ErrorMatchedExcludedCredential | 1006 |
This error should only be returned when specifying @c excludedCredentials on a public key credential registration request. |
ErrorNotHandled | 1003 |
The authorization request wasn’t handled. |
ErrorNotInteractive | 1005 |
Not interactive. |
ErrorUnknown | 1000 |
The authorization attempt failed for an unknown reason. |
This class has no sub classes.
Blog Entries
Release notes
- Version 25.3
- Added ASAuthorizationMBS and ASAuthorizationControllerMBS classes.
Some related classes:
- class ASAuthorizationAppleIDProviderMBS
- class ASAuthorizationAppleIDRequestMBS
- class ASAuthorizationMBS
- class ASAuthorizationRequestMBS
- class NSErrorMBS
The items on this page are in the following plugins: MBS MacFrameworks Plugin.
ASAuthorizationAppleIDRequestMBS - ASAuthorizationCredentialMBS
