2 * Copyright (C) 2022 Mohamad Al-Jaf
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
20 #pragma winrt ns_prefix
23 import
"inspectable.idl";
24 import
"asyncinfo.idl";
25 import
"eventtoken.idl";
26 import
"windowscontracts.idl";
27 import
"windows.foundation.idl";
28 /* import "windows.security.cryptography.core.idl"; */
29 import
"windows.storage.streams.idl";
30 import
"windows.system.idl";
32 namespace Windows.Security.Credentials
{
33 typedef enum KeyCredentialCreationOption KeyCredentialCreationOption
;
34 typedef enum KeyCredentialStatus KeyCredentialStatus
;
36 interface IKeyCredential
;
37 interface IKeyCredentialManagerStatics
;
38 interface IKeyCredentialRetrievalResult
;
40 runtimeclass KeyCredential
;
41 runtimeclass KeyCredentialManager
;
42 runtimeclass KeyCredentialRetrievalResult
;
45 interface Windows.Foundation.AsyncOperationCompletedHandler
<Windows.Security.Credentials.KeyCredentialRetrievalResult
*>;
46 interface Windows.Foundation.IAsyncOperation
<Windows.Security.Credentials.KeyCredentialRetrievalResult
*>;
50 contract
(Windows.Foundation.UniversalApiContract
, 1.0)
52 enum KeyCredentialCreationOption
59 contract
(Windows.Foundation.UniversalApiContract
, 1.0)
61 enum KeyCredentialStatus
67 UserPrefersPassword
= 4,
68 CredentialAlreadyExists
= 5,
69 SecurityDeviceLocked
= 6,
73 contract
(Windows.Foundation.UniversalApiContract
, 1.0),
74 exclusiveto
(Windows.Security.Credentials.KeyCredentialManager
),
75 uuid(6aac468b
-0ef1
-4ce0
-8290-4106da6a63b5
)
77 interface IKeyCredentialManagerStatics
: IInspectable
79 HRESULT IsSupportedAsync
([out, retval] Windows.Foundation.IAsyncOperation
<boolean> **value
);
80 HRESULT RenewAttestationAsync
([out, retval] Windows.Foundation.IAsyncAction
**operation
);
81 HRESULT RequestCreateAsync
(HSTRING name
, Windows.Security.Credentials.KeyCredentialCreationOption option
,
82 [out, retval] Windows.Foundation.IAsyncOperation
<Windows.Security.Credentials.KeyCredentialRetrievalResult
*> **value
);
83 HRESULT OpenAsync
(HSTRING name
, [out, retval] Windows.Foundation.IAsyncOperation
<Windows.Security.Credentials.KeyCredentialRetrievalResult
*> **value
);
84 HRESULT DeleteAsync
(HSTRING name
, [out, retval] Windows.Foundation.IAsyncAction
**operation
);
88 contract
(Windows.Foundation.UniversalApiContract
, 1.0),
89 exclusiveto
(Windows.Security.Credentials.KeyCredentialRetrievalResult
),
90 uuid(58cd7703
-8d87
-4249-9b58
-f6598cc9644e
)
92 interface IKeyCredentialRetrievalResult
: IInspectable
94 [propget] HRESULT Credential
([out, retval] Windows.Security.Credentials.KeyCredential
**value
);
95 [propget] HRESULT Status
([out, retval] Windows.Security.Credentials.KeyCredentialStatus
*value
);
99 contract
(Windows.Foundation.UniversalApiContract
, 1.0),
100 marshaling_behavior
(agile
)
102 runtimeclass KeyCredential
104 [default] interface Windows.Security.Credentials.IKeyCredential
;
108 contract
(Windows.Foundation.UniversalApiContract
, 1.0),
109 marshaling_behavior
(agile
),
110 static
(Windows.Security.Credentials.IKeyCredentialManagerStatics
, Windows.Foundation.UniversalApiContract
, 1.0),
113 runtimeclass KeyCredentialManager
118 contract
(Windows.Foundation.UniversalApiContract
, 1.0),
119 marshaling_behavior
(agile
)
121 runtimeclass KeyCredentialRetrievalResult
123 [default] interface Windows.Security.Credentials.IKeyCredentialRetrievalResult
;