diff --git a/src/authenticationservices.cs b/src/authenticationservices.cs index 1d2b936e91a..d3568634d70 100644 --- a/src/authenticationservices.cs +++ b/src/authenticationservices.cs @@ -78,7 +78,7 @@ public enum ASCredentialServiceIdentifierType : long { Url, } - [NoTV] + [TV (16,0)] [Watch (6,2)] [Mac (10,15)] [iOS (12,0)] @@ -245,7 +245,7 @@ interface ASPasswordCredential : NSCopying, NSSecureCoding, ASAuthorizationCrede delegate void ASWebAuthenticationSessionCompletionHandler ([NullAllowed] NSUrl callbackUrl, [NullAllowed] NSError error); - [NoTV] + [TV (16,0)] [Watch (6,2)] [Mac (10, 15)] [iOS (12,0)] @@ -258,10 +258,11 @@ interface ASWebAuthenticationSession { [Export ("start")] bool Start (); + [NoTV] [Export ("cancel")] void Cancel (); - [iOS (13,0), NoWatch] + [iOS (13,0), NoWatch, NoTV] [NullAllowed, Export ("presentationContextProvider", ArgumentSemantic.Weak)] IASWebAuthenticationPresentationContextProviding PresentationContextProvider { get; set; } @@ -359,7 +360,7 @@ interface ASAuthorizationAppleIdProvider : ASAuthorizationProvider { [Export ("getCredentialStateForUserID:completion:")] [Async] - void GetCredentialState (string userID, Action completion); + void GetCredentialState (string userId, Action completion); [Notification] [Field ("ASAuthorizationAppleIDProviderCredentialRevokedNotification")] @@ -437,6 +438,18 @@ interface ASAuthorizationController { [TV (15,0), NoWatch, NoMac, NoiOS, NoMacCatalyst] [Export ("customAuthorizationMethods", ArgumentSemantic.Copy)] NSString[] CustomAuthorizationMethods { get; set; } + + [NoWatch, NoTV, NoMacCatalyst, NoMac, iOS (16,0)] + [Export ("performAutoFillAssistedRequests")] + void PerformAutoFillAssistedRequests (); + + [NoWatch, NoTV, Mac (13,0), iOS (16,0), MacCatalyst (16,0)] + [Export ("performRequestsWithOptions:")] + void PerformRequests (ASAuthorizationControllerRequestOptions options); + + [NoWatch, NoTV, Mac (13,0), iOS (16,0), MacCatalyst (16,0)] + [Export ("cancel")] + void Cancel (); } interface IASAuthorizationCredential { } @@ -614,6 +627,10 @@ interface ASAuthorizationProviderExtensionAuthorizationRequest { [Mac (12,3), iOS (15,4), MacCatalyst (15,4)] [Export ("userInterfaceEnabled")] bool UserInterfaceEnabled { [Bind ("isUserInterfaceEnabled")] get; } + + [NoWatch, NoTV, NoiOS, NoMacCatalyst, Mac (13, 0)] + [NullAllowed, Export ("loginManager", ArgumentSemantic.Strong)] + ASAuthorizationProviderExtensionLoginManager LoginManager { get; } } [Watch (6,0), TV (13,0), Mac (10,15), iOS (13,0)] @@ -994,7 +1011,7 @@ interface ASAuthorizationPublicKeyCredentialAttestationKind NSString Enterprise { get; } } - [iOS (15,0), Mac (12,0), MacCatalyst (15,0), NoWatch, NoTV] + [iOS (15,0), Mac (12,0), MacCatalyst (15,0), NoWatch, TV (16,0)] [Static] interface ASAuthorizationPublicKeyCredentialUserVerificationPreference { @@ -1043,7 +1060,7 @@ enum ASCoseAlgorithmIdentifier : long { interface IASAuthorizationPublicKeyCredentialAssertion { } - [NoWatch, Mac (12,0), iOS (15,0), MacCatalyst (15,0), NoTV] + [NoWatch, Mac (12,0), iOS (15,0), MacCatalyst (15,0), TV (16,0)] [Protocol] interface ASAuthorizationPublicKeyCredentialAssertion : ASPublicKeyCredential { @@ -1060,7 +1077,7 @@ interface ASAuthorizationPublicKeyCredentialAssertion : ASPublicKeyCredential NSData Signature { get; } } - [NoWatch, Mac (12,0), iOS (15,0), MacCatalyst (15,0), NoTV] + [NoWatch, Mac (12,0), iOS (15,0), MacCatalyst (15,0), TV (16,0)] [BaseType (typeof (ASAuthorizationRequest))] [DisableDefaultCtor] interface ASAuthorizationPlatformPublicKeyCredentialAssertionRequest : ASAuthorizationPublicKeyCredentialAssertionRequest @@ -1084,7 +1101,7 @@ interface ASAuthorizationSecurityKeyPublicKeyCredentialAssertionRequest : ASAuth interface IASAuthorizationPublicKeyCredentialAssertionRequest { } - [NoWatch, Mac (12,0), iOS (15,0), MacCatalyst (15,0), NoTV] + [NoWatch, Mac (12,0), iOS (15,0), MacCatalyst (15,0), TV (16,0)] [Protocol] interface ASAuthorizationPublicKeyCredentialAssertionRequest : NSSecureCoding, NSCopying { @@ -1107,7 +1124,7 @@ interface ASAuthorizationPublicKeyCredentialAssertionRequest : NSSecureCoding, N interface IASAuthorizationPublicKeyCredentialDescriptor { } - [NoWatch, Mac (12,0), iOS (15,0), MacCatalyst (15,0), NoTV] + [NoWatch, Mac (12,0), iOS (15,0), MacCatalyst (15,0), TV (16,0)] [Protocol] interface ASAuthorizationPublicKeyCredentialDescriptor : NSSecureCoding, NSCopying { @@ -1116,7 +1133,7 @@ interface ASAuthorizationPublicKeyCredentialDescriptor : NSSecureCoding, NSCopyi NSData CredentialId { get; set; } } - [NoWatch, Mac (12,0), iOS (15,0), MacCatalyst (15,0), NoTV] + [NoWatch, Mac (12,0), iOS (15,0), MacCatalyst (15,0), TV (16,0)] [Protocol] interface ASAuthorizationPublicKeyCredentialRegistration : ASPublicKeyCredential { @@ -1125,7 +1142,7 @@ interface ASAuthorizationPublicKeyCredentialRegistration : ASPublicKeyCredential NSData RawAttestationObject { get; } } - [NoWatch, Mac (12,0), iOS (15,0), MacCatalyst (15,0), NoTV] + [NoWatch, Mac (12,0), iOS (15,0), MacCatalyst (15,0), TV (16,0)] [Protocol] interface ASAuthorizationPublicKeyCredentialRegistrationRequest : NSSecureCoding, NSCopying { @@ -1153,12 +1170,13 @@ interface ASAuthorizationPublicKeyCredentialRegistrationRequest : NSSecureCoding [Export ("userVerificationPreference")] NSString UserVerificationPreference { get; set; } + [NoTV] [Abstract] [Export ("attestationPreference")] NSString AttestationPreference { get; set; } } - [NoWatch, Mac (12,0), iOS (15,0), MacCatalyst (15,0), NoTV] + [NoWatch, Mac (12,0), iOS (15,0), MacCatalyst (15,0), TV (16,0)] [Protocol] interface ASPublicKeyCredential : ASAuthorizationCredential { @@ -1171,7 +1189,7 @@ interface ASPublicKeyCredential : ASAuthorizationCredential NSData CredentialId { get; } } - [NoWatch, Mac (12,0), iOS (15,0), MacCatalyst (15,0), NoTV] + [NoWatch, Mac (12,0), iOS (15,0), MacCatalyst (15,0), TV (16,0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface ASAuthorizationPlatformPublicKeyCredentialDescriptor : ASAuthorizationPublicKeyCredentialDescriptor @@ -1181,7 +1199,7 @@ interface ASAuthorizationPlatformPublicKeyCredentialDescriptor : ASAuthorization NativeHandle Constructor (NSData credentialId); } - [NoWatch, Mac (12,0), iOS (15,0), MacCatalyst (15,0), NoTV] + [NoWatch, Mac (12,0), iOS (15,0), MacCatalyst (15,0), TV (16,0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface ASAuthorizationPlatformPublicKeyCredentialProvider : ASAuthorizationProvider @@ -1299,13 +1317,13 @@ interface ASAuthorizationCustomMethod NSString Other { get; } } - [NoWatch, NoTV, Mac (12,0), iOS (15,0), MacCatalyst (15,0)] + [NoWatch, TV (16,0), Mac (12,0), iOS (15,0), MacCatalyst (15,0)] [BaseType (typeof (NSObject))] interface ASAuthorizationPlatformPublicKeyCredentialAssertion : ASAuthorizationPublicKeyCredentialAssertion { } - [NoWatch, NoTV, Mac (12,0), iOS (15,0), MacCatalyst (15,0)] + [NoWatch, TV (16,0), Mac (12,0), iOS (15,0), MacCatalyst (15,0)] [BaseType (typeof (ASAuthorizationRequest))] [DisableDefaultCtor] interface ASAuthorizationPlatformPublicKeyCredentialRegistrationRequest : ASAuthorizationPublicKeyCredentialRegistrationRequest @@ -1325,9 +1343,227 @@ interface ASAuthorizationSecurityKeyPublicKeyCredentialRegistration : ASAuthoriz { } - [NoWatch, NoTV, Mac (12,0), iOS (15,0), MacCatalyst (15,0)] + [NoWatch, TV (16,0), Mac (12,0), iOS (15,0), MacCatalyst (15,0)] [BaseType (typeof (NSObject))] interface ASAuthorizationPlatformPublicKeyCredentialRegistration : ASAuthorizationPublicKeyCredentialRegistration { } + + [NoWatch, NoTV, MacCatalyst (16,0), Mac (13,0), iOS (16,0)] + [Flags, Native] + public enum ASAuthorizationControllerRequestOptions : ulong + { + PreferImmediatelyAvailableCredentials = 1uL << 0, + } + + [NoWatch, NoTV, NoiOS, NoMacCatalyst, Mac (13,0)] + [Native] + public enum ASAuthorizationProviderExtensionAuthenticationMethod : long + { + Password = 1, + UserSecureEnclaveKey = 2, + } + + [NoWatch, NoTV, NoiOS, NoMacCatalyst, Mac (13,0)] + [Native] + public enum ASAuthorizationProviderExtensionKeyType : long + { + DeviceSigning = 1, + DeviceEncryption = 2, + SecureEnclaveKey = 3, + } + + [NoWatch, NoTV, NoiOS, NoMacCatalyst, Mac (13,0)] + [Native] + public enum ASAuthorizationProviderExtensionRegistrationResult : long + { + Success = 0, + Failed = 1, + UserInterfaceRequired = 2, + FailedNoRetry = 3, + } + + [NoWatch, NoTV, NoiOS, NoMacCatalyst, Mac (13,0)] + [Flags] + [Native] + public enum ASAuthorizationProviderExtensionRequestOptions : ulong + { + None = 0x0, + UserInteractionEnabled = 1uL << 0, + RegistrationRepair = 1uL << 1, + } + + [NoWatch, NoTV, NoiOS, NoMacCatalyst, Mac (13,0)] + [Protocol] + [BaseType (typeof (NSObject))] + interface ASAuthorizationProviderExtensionRegistrationHandler + { + [Abstract, Async] + [Export ("beginDeviceRegistrationUsingLoginManager:options:completion:")] + void BeginDeviceRegistration (ASAuthorizationProviderExtensionLoginManager loginManager, ASAuthorizationProviderExtensionRequestOptions options, Action completion); + + [Abstract, Async] + [Export ("beginUserRegistrationUsingLoginManager:userName:authenticationMethod:options:completion:")] + void BeginUserRegistration (ASAuthorizationProviderExtensionLoginManager loginManager, [NullAllowed] string userName, ASAuthorizationProviderExtensionAuthenticationMethod authenticationMethod, ASAuthorizationProviderExtensionRequestOptions options, Action completion); + + [Export ("registrationDidComplete")] + void RegistrationDidComplete (); + } + + [NoWatch, NoTV, NoiOS, NoMacCatalyst, Mac (13,0)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface ASAuthorizationProviderExtensionLoginConfiguration + { + [Export ("initWithClientID:issuer:tokenEndpointURL:jwksEndpointURL:audience:")] + NativeHandle Constructor (string clientId, string issuer, NSUrl tokenEndpointUrl, NSUrl jwksEndpointUrl, [NullAllowed] string audience); + + [Static, Async] + [Export ("configurationWithOpenIDConfigurationURL:clientID:issuer:completion:")] + void CreateConfiguration (NSUrl openIdConfigurationUrl, string clientId, [NullAllowed] string issuer, Action completion); + + [NullAllowed, Export ("invalidCredentialPredicate")] + string InvalidCredentialPredicate { get; set; } + + [NullAllowed, Export ("accountDisplayName")] + string AccountDisplayName { get; set; } + + [Export ("clientID")] + string ClientId { get; } + + [Export ("issuer")] + string Issuer { get; } + + [Export ("audience")] + string Audience { get; set; } + + [Export ("tokenEndpointURL", ArgumentSemantic.Copy)] + NSUrl TokenEndpointUrl { get; set; } + + [Export ("jwksEndpointURL", ArgumentSemantic.Copy)] + NSUrl JwksEndpointUrl { get; set; } + + [Export ("nonceEndpointURL", ArgumentSemantic.Copy)] + NSUrl NonceEndpointUrl { get; set; } + + [Export ("nonceResponseKeypath")] + string NonceResponseKeypath { get; set; } + + [Export ("serverNonceClaimName")] + string ServerNonceClaimName { get; set; } + + [Export ("customNonceRequestValues", ArgumentSemantic.Copy)] + NSUrlQueryItem[] CustomNonceRequestValues { get; set; } + + [Export ("setCustomAssertionRequestHeaderClaims:returningError:")] + bool SetCustomAssertionRequestHeaderClaims (NSDictionary claims, [NullAllowed] out NSError error); + + [Export ("setCustomAssertionRequestBodyClaims:returningError:")] + bool SetCustomAssertionRequestBodyClaims (NSDictionary claims, [NullAllowed] out NSError error); + + [Export ("additionalScopes")] + string AdditionalScopes { get; set; } + + [Export ("includePreviousRefreshTokenInLoginRequest")] + bool IncludePreviousRefreshTokenInLoginRequest { get; set; } + + [Export ("previousRefreshTokenClaimName")] + string PreviousRefreshTokenClaimName { get; set; } + + [Export ("customLoginRequestValues", ArgumentSemantic.Copy)] + NSUrlQueryItem[] CustomLoginRequestValues { get; set; } + + [Export ("setCustomLoginRequestHeaderClaims:returningError:")] + bool SetCustomLoginRequestHeaderClaims (NSDictionary claims, [NullAllowed] out NSError error); + + [Export ("setCustomLoginRequestBodyClaims:returningError:")] + bool SetCustomLoginRequestBodyClaims (NSDictionary claims, [NullAllowed] out NSError error); + + [Export ("kerberosTicketMappings", ArgumentSemantic.Copy)] + ASAuthorizationProviderExtensionKerberosMapping[] KerberosTicketMappings { get; set; } + } + + [NoWatch, NoTV, NoiOS, NoMacCatalyst, Mac (13,0)] + [BaseType (typeof (NSObject))] + interface ASAuthorizationProviderExtensionKerberosMapping + { + [NullAllowed, Export ("ticketKeyPath")] + string TicketKeyPath { get; set; } + + [NullAllowed, Export ("messageBufferKeyName")] + string MessageBufferKeyName { get; set; } + + [NullAllowed, Export ("realmKeyName")] + string RealmKeyName { get; set; } + + [NullAllowed, Export ("serviceNameKeyName")] + string ServiceNameKeyName { get; set; } + + [NullAllowed, Export ("clientNameKeyName")] + string ClientNameKeyName { get; set; } + + [NullAllowed, Export ("encryptionKeyTypeKeyName")] + string EncryptionKeyTypeKeyName { get; set; } + + [NullAllowed, Export ("sessionKeyKeyName")] + string SessionKeyKeyName { get; set; } + } + + [NoWatch, NoTV, NoiOS, Mac (13,0), NoMacCatalyst] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface ASAuthorizationProviderExtensionLoginManager + { + [Export ("deviceRegistered")] + bool DeviceRegistered { [Bind ("isDeviceRegistered")] get; } + + [Export ("userRegistered")] + bool UserRegistered { [Bind ("isUserRegistered")] get; } + + [NullAllowed, Export ("registrationToken")] + string RegistrationToken { get; } + + [NullAllowed, Export ("loginUserName")] + string LoginUserName { get; set; } + + [NullAllowed, Export ("ssoTokens", ArgumentSemantic.Copy)] + NSDictionary SsoTokens { get; set; } + + [NullAllowed, Export ("loginConfiguration", ArgumentSemantic.Copy)] + ASAuthorizationProviderExtensionLoginConfiguration LoginConfiguration { get; } + + [Export ("saveLoginConfiguration:error:")] + bool SaveLoginConfiguration (ASAuthorizationProviderExtensionLoginConfiguration loginConfiguration, [NullAllowed] out NSError error); + + [Internal] + [Export ("saveCertificate:keyType:")] + void _SaveCertificate (IntPtr certificate, ASAuthorizationProviderExtensionKeyType keyType); + + [Internal] + [Export ("copyKeyForKeyType:")] + [return: NullAllowed] + IntPtr _CopyKey (ASAuthorizationProviderExtensionKeyType keyType); + + [Export ("copyIdentityForKeyType:")] + [return: NullAllowed] + [return: Release] + SecIdentity CopyIdentity (ASAuthorizationProviderExtensionKeyType keyType); + + [Async] + [Export ("userNeedsReauthenticationWithCompletion:")] + void ReauthenticateUser (Action completion); + + [Export ("deviceRegistrationsNeedsRepair")] + void RepairDeviceRegistrations (); + + [Export ("userRegistrationsNeedsRepair")] + void RepairUserRegistrations (); + + [Export ("resetKeys")] + void ResetKeys (); + + [Async] + [Export ("presentRegistrationViewControllerWithCompletion:")] + void PresentRegistrationViewController (Action completion); + } } diff --git a/tests/xtro-sharpie/api-annotations-dotnet/tvOS-AuthenticationServices.todo b/tests/xtro-sharpie/api-annotations-dotnet/tvOS-AuthenticationServices.todo deleted file mode 100644 index 0aae6ce2ff7..00000000000 --- a/tests/xtro-sharpie/api-annotations-dotnet/tvOS-AuthenticationServices.todo +++ /dev/null @@ -1,28 +0,0 @@ -!missing-enum! ASWebAuthenticationSessionErrorCode not bound -!missing-field! ASAuthorizationPublicKeyCredentialUserVerificationPreferenceDiscouraged not bound -!missing-field! ASAuthorizationPublicKeyCredentialUserVerificationPreferencePreferred not bound -!missing-field! ASAuthorizationPublicKeyCredentialUserVerificationPreferenceRequired not bound -!missing-field! ASWebAuthenticationSessionErrorDomain not bound -!missing-protocol! ASAuthorizationPublicKeyCredentialAssertion not bound -!missing-protocol! ASAuthorizationPublicKeyCredentialAssertionRequest not bound -!missing-protocol! ASAuthorizationPublicKeyCredentialDescriptor not bound -!missing-protocol! ASAuthorizationPublicKeyCredentialRegistration not bound -!missing-protocol! ASAuthorizationPublicKeyCredentialRegistrationRequest not bound -!missing-protocol! ASPublicKeyCredential not bound -!missing-selector! ASAuthorizationPlatformPublicKeyCredentialAssertionRequest::allowedCredentials not bound -!missing-selector! ASAuthorizationPlatformPublicKeyCredentialAssertionRequest::setAllowedCredentials: not bound -!missing-selector! ASAuthorizationPlatformPublicKeyCredentialDescriptor::initWithCredentialID: not bound -!missing-selector! ASAuthorizationPlatformPublicKeyCredentialProvider::createCredentialAssertionRequestWithChallenge: not bound -!missing-selector! ASAuthorizationPlatformPublicKeyCredentialProvider::createCredentialRegistrationRequestWithChallenge:name:userID: not bound -!missing-selector! ASAuthorizationPlatformPublicKeyCredentialProvider::initWithRelyingPartyIdentifier: not bound -!missing-selector! ASAuthorizationPlatformPublicKeyCredentialProvider::relyingPartyIdentifier not bound -!missing-selector! ASWebAuthenticationSession::canStart not bound -!missing-selector! ASWebAuthenticationSession::initWithURL:callbackURLScheme:completionHandler: not bound -!missing-selector! ASWebAuthenticationSession::start not bound -!missing-type! ASAuthorizationPlatformPublicKeyCredentialAssertion not bound -!missing-type! ASAuthorizationPlatformPublicKeyCredentialAssertionRequest not bound -!missing-type! ASAuthorizationPlatformPublicKeyCredentialDescriptor not bound -!missing-type! ASAuthorizationPlatformPublicKeyCredentialProvider not bound -!missing-type! ASAuthorizationPlatformPublicKeyCredentialRegistration not bound -!missing-type! ASAuthorizationPlatformPublicKeyCredentialRegistrationRequest not bound -!missing-type! ASWebAuthenticationSession not bound diff --git a/tests/xtro-sharpie/tvOS-AuthenticationServices.todo b/tests/xtro-sharpie/tvOS-AuthenticationServices.todo deleted file mode 100644 index 0aae6ce2ff7..00000000000 --- a/tests/xtro-sharpie/tvOS-AuthenticationServices.todo +++ /dev/null @@ -1,28 +0,0 @@ -!missing-enum! ASWebAuthenticationSessionErrorCode not bound -!missing-field! ASAuthorizationPublicKeyCredentialUserVerificationPreferenceDiscouraged not bound -!missing-field! ASAuthorizationPublicKeyCredentialUserVerificationPreferencePreferred not bound -!missing-field! ASAuthorizationPublicKeyCredentialUserVerificationPreferenceRequired not bound -!missing-field! ASWebAuthenticationSessionErrorDomain not bound -!missing-protocol! ASAuthorizationPublicKeyCredentialAssertion not bound -!missing-protocol! ASAuthorizationPublicKeyCredentialAssertionRequest not bound -!missing-protocol! ASAuthorizationPublicKeyCredentialDescriptor not bound -!missing-protocol! ASAuthorizationPublicKeyCredentialRegistration not bound -!missing-protocol! ASAuthorizationPublicKeyCredentialRegistrationRequest not bound -!missing-protocol! ASPublicKeyCredential not bound -!missing-selector! ASAuthorizationPlatformPublicKeyCredentialAssertionRequest::allowedCredentials not bound -!missing-selector! ASAuthorizationPlatformPublicKeyCredentialAssertionRequest::setAllowedCredentials: not bound -!missing-selector! ASAuthorizationPlatformPublicKeyCredentialDescriptor::initWithCredentialID: not bound -!missing-selector! ASAuthorizationPlatformPublicKeyCredentialProvider::createCredentialAssertionRequestWithChallenge: not bound -!missing-selector! ASAuthorizationPlatformPublicKeyCredentialProvider::createCredentialRegistrationRequestWithChallenge:name:userID: not bound -!missing-selector! ASAuthorizationPlatformPublicKeyCredentialProvider::initWithRelyingPartyIdentifier: not bound -!missing-selector! ASAuthorizationPlatformPublicKeyCredentialProvider::relyingPartyIdentifier not bound -!missing-selector! ASWebAuthenticationSession::canStart not bound -!missing-selector! ASWebAuthenticationSession::initWithURL:callbackURLScheme:completionHandler: not bound -!missing-selector! ASWebAuthenticationSession::start not bound -!missing-type! ASAuthorizationPlatformPublicKeyCredentialAssertion not bound -!missing-type! ASAuthorizationPlatformPublicKeyCredentialAssertionRequest not bound -!missing-type! ASAuthorizationPlatformPublicKeyCredentialDescriptor not bound -!missing-type! ASAuthorizationPlatformPublicKeyCredentialProvider not bound -!missing-type! ASAuthorizationPlatformPublicKeyCredentialRegistration not bound -!missing-type! ASAuthorizationPlatformPublicKeyCredentialRegistrationRequest not bound -!missing-type! ASWebAuthenticationSession not bound