]>
Commit | Line | Data |
---|---|---|
bfbe0bee | 1 | /** @file\r |
2 | UEFI 2.3.1 User Credential Protocol definition.\r | |
3 | \r | |
4 | Attached to a device handle, this protocol identifies a single means of identifying the user.\r | |
5 | \r | |
9095d37b | 6 | Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r |
9344f092 | 7 | SPDX-License-Identifier: BSD-2-Clause-Patent\r |
bfbe0bee | 8 | \r |
9 | **/\r | |
10 | \r | |
11 | #ifndef __USER_CREDENTIAL2_H__\r | |
12 | #define __USER_CREDENTIAL2_H__\r | |
13 | \r | |
14 | #include <Protocol/UserManager.h>\r | |
15 | \r | |
16 | #define EFI_USER_CREDENTIAL2_PROTOCOL_GUID \\r | |
17 | { \\r | |
18 | 0xe98adb03, 0xb8b9, 0x4af8, { 0xba, 0x20, 0x26, 0xe9, 0x11, 0x4c, 0xbc, 0xe5 } \\r | |
19 | }\r | |
20 | \r | |
2f88bd3a | 21 | typedef struct _EFI_USER_CREDENTIAL2_PROTOCOL EFI_USER_CREDENTIAL2_PROTOCOL;\r |
bfbe0bee | 22 | \r |
23 | /**\r | |
24 | Enroll a user on a credential provider.\r | |
25 | \r | |
9095d37b LG |
26 | This function enrolls a user on this credential provider. If the user exists on this credential\r |
27 | provider, update the user information on this credential provider; otherwise add the user information\r | |
bfbe0bee | 28 | on credential provider.\r |
29 | \r | |
30 | @param[in] This Points to this instance of the EFI_USER_CREDENTIAL2_PROTOCOL.\r | |
31 | @param[in] User The user profile to enroll.\r | |
9095d37b | 32 | \r |
bfbe0bee | 33 | @retval EFI_SUCCESS User profile was successfully enrolled.\r |
9095d37b LG |
34 | @retval EFI_ACCESS_DENIED Current user profile does not permit enrollment on the user profile\r |
35 | handle. Either the user profile cannot enroll on any user profile or\r | |
bfbe0bee | 36 | cannot enroll on a user profile other than the current user profile.\r |
37 | @retval EFI_UNSUPPORTED This credential provider does not support enrollment in the pre-OS.\r | |
38 | @retval EFI_DEVICE_ERROR The new credential could not be created because of a device error.\r | |
39 | @retval EFI_INVALID_PARAMETER User does not refer to a valid user profile handle.\r | |
40 | **/\r | |
41 | typedef\r | |
42 | EFI_STATUS\r | |
042a73f5 | 43 | (EFIAPI *EFI_CREDENTIAL2_ENROLL)(\r |
bfbe0bee | 44 | IN CONST EFI_USER_CREDENTIAL2_PROTOCOL *This,\r |
45 | IN EFI_USER_PROFILE_HANDLE User\r | |
46 | );\r | |
47 | \r | |
48 | /**\r | |
49 | Returns the user interface information used during user identification.\r | |
50 | \r | |
9095d37b LG |
51 | This function returns information about the form used when interacting with the user during user\r |
52 | identification. The form is the first enabled form in the form-set class\r | |
53 | EFI_HII_USER_CREDENTIAL_FORMSET_GUID installed on the HII handle HiiHandle. If\r | |
54 | the user credential provider does not require a form to identify the user, then this function should\r | |
bfbe0bee | 55 | return EFI_NOT_FOUND.\r |
56 | \r | |
57 | @param[in] This Points to this instance of the EFI_USER_CREDENTIAL2_PROTOCOL.\r | |
58 | @param[out] Hii On return, holds the HII database handle.\r | |
59 | @param[out] FormSetId On return, holds the identifier of the form set which contains\r | |
60 | the form used during user identification.\r | |
9095d37b | 61 | @param[out] FormId On return, holds the identifier of the form used during user\r |
bfbe0bee | 62 | identification.\r |
9095d37b | 63 | \r |
bfbe0bee | 64 | @retval EFI_SUCCESS Form returned successfully.\r |
65 | @retval EFI_NOT_FOUND Form not returned.\r | |
66 | @retval EFI_INVALID_PARAMETER Hii is NULL or FormSetId is NULL or FormId is NULL.\r | |
67 | **/\r | |
68 | typedef\r | |
69 | EFI_STATUS\r | |
042a73f5 | 70 | (EFIAPI *EFI_CREDENTIAL2_FORM)(\r |
bfbe0bee | 71 | IN CONST EFI_USER_CREDENTIAL2_PROTOCOL *This,\r |
72 | OUT EFI_HII_HANDLE *Hii,\r | |
73 | OUT EFI_GUID *FormSetId,\r | |
74 | OUT EFI_FORM_ID *FormId\r | |
75 | );\r | |
76 | \r | |
77 | /**\r | |
78 | Returns bitmap used to describe the credential provider type.\r | |
79 | \r | |
9095d37b LG |
80 | This optional function returns a bitmap which is less than or equal to the number of pixels specified\r |
81 | by Width and Height. If no such bitmap exists, then EFI_NOT_FOUND is returned.\r | |
bfbe0bee | 82 | \r |
83 | @param[in] This Points to this instance of the EFI_USER_CREDENTIAL2_PROTOCOL.\r | |
84 | @param[in, out] Width On entry, points to the desired bitmap width. If NULL then no bitmap\r | |
9095d37b | 85 | information will be returned. On exit, points to the width of the\r |
bfbe0bee | 86 | bitmap returned.\r |
9095d37b LG |
87 | @param[in, out] Height On entry, points to the desired bitmap height. If NULL then no bitmap\r |
88 | information will be returned. On exit, points to the height of the\r | |
bfbe0bee | 89 | bitmap returned\r |
9095d37b LG |
90 | @param[out] Hii On return, holds the HII database handle.\r |
91 | @param[out] Image On return, holds the HII image identifier.\r | |
92 | \r | |
bfbe0bee | 93 | @retval EFI_SUCCESS Image identifier returned successfully.\r |
94 | @retval EFI_NOT_FOUND Image identifier not returned.\r | |
95 | @retval EFI_INVALID_PARAMETER Hii is NULL or Image is NULL.\r | |
96 | **/\r | |
97 | typedef\r | |
98 | EFI_STATUS\r | |
042a73f5 | 99 | (EFIAPI *EFI_CREDENTIAL2_TILE)(\r |
bfbe0bee | 100 | IN CONST EFI_USER_CREDENTIAL2_PROTOCOL *This,\r |
101 | IN OUT UINTN *Width,\r | |
102 | IN OUT UINTN *Height,\r | |
103 | OUT EFI_HII_HANDLE *Hii,\r | |
104 | OUT EFI_IMAGE_ID *Image\r | |
105 | );\r | |
106 | \r | |
107 | /**\r | |
108 | Returns string used to describe the credential provider type.\r | |
109 | \r | |
9095d37b LG |
110 | This function returns a string which describes the credential provider. If no such string exists, then\r |
111 | EFI_NOT_FOUND is returned.\r | |
bfbe0bee | 112 | \r |
113 | @param[in] This Points to this instance of the EFI_USER_CREDENTIAL2_PROTOCOL.\r | |
114 | @param[out] Hii On return, holds the HII database handle.\r | |
115 | @param[out] String On return, holds the HII string identifier.\r | |
9095d37b | 116 | \r |
bfbe0bee | 117 | @retval EFI_SUCCESS String identifier returned successfully.\r |
118 | @retval EFI_NOT_FOUND String identifier not returned.\r | |
119 | @retval EFI_INVALID_PARAMETER Hii is NULL or String is NULL.\r | |
120 | **/\r | |
121 | typedef\r | |
122 | EFI_STATUS\r | |
042a73f5 | 123 | (EFIAPI *EFI_CREDENTIAL2_TITLE)(\r |
bfbe0bee | 124 | IN CONST EFI_USER_CREDENTIAL2_PROTOCOL *This,\r |
125 | OUT EFI_HII_HANDLE *Hii,\r | |
126 | OUT EFI_STRING_ID *String\r | |
127 | );\r | |
128 | \r | |
129 | /**\r | |
130 | Return the user identifier associated with the currently authenticated user.\r | |
131 | \r | |
9095d37b LG |
132 | This function returns the user identifier of the user authenticated by this credential provider. This\r |
133 | function is called after the credential-related information has been submitted on a form OR after a\r | |
bfbe0bee | 134 | call to Default() has returned that this credential is ready to log on.\r |
135 | \r | |
136 | @param[in] This Points to this instance of the EFI_USER_CREDENTIAL2_PROTOCOL.\r | |
9095d37b LG |
137 | @param[in] User The user profile handle of the user profile currently being considered\r |
138 | by the user identity manager. If NULL, then no user profile is currently\r | |
bfbe0bee | 139 | under consideration.\r |
9095d37b LG |
140 | @param[out] Identifier On return, points to the user identifier.\r |
141 | \r | |
bfbe0bee | 142 | @retval EFI_SUCCESS User identifier returned successfully.\r |
143 | @retval EFI_NOT_READY No user identifier can be returned.\r | |
144 | @retval EFI_ACCESS_DENIED The user has been locked out of this user credential.\r | |
9095d37b LG |
145 | @retval EFI_NOT_FOUND User is not NULL, and the specified user handle can't be found in user\r |
146 | profile database\r | |
bfbe0bee | 147 | @retval EFI_INVALID_PARAMETER Identifier is NULL.\r |
148 | **/\r | |
149 | typedef\r | |
150 | EFI_STATUS\r | |
042a73f5 | 151 | (EFIAPI *EFI_CREDENTIAL2_USER)(\r |
bfbe0bee | 152 | IN CONST EFI_USER_CREDENTIAL2_PROTOCOL *This,\r |
153 | IN EFI_USER_PROFILE_HANDLE User,\r | |
154 | OUT EFI_USER_INFO_IDENTIFIER *Identifier\r | |
155 | );\r | |
156 | \r | |
157 | /**\r | |
158 | Indicate that user interface interaction has begun for the specified credential.\r | |
159 | \r | |
9095d37b LG |
160 | This function is called when a credential provider is selected by the user. If AutoLogon returns\r |
161 | FALSE, then the user interface will be constructed by the User Identity Manager.\r | |
bfbe0bee | 162 | \r |
163 | @param[in] This Points to this instance of the EFI_USER_CREDENTIAL2_PROTOCOL.\r | |
9095d37b LG |
164 | @param[out] AutoLogon On return, points to the credential provider's capabilities after\r |
165 | the credential provider has been selected by the user.\r | |
166 | \r | |
bfbe0bee | 167 | @retval EFI_SUCCESS Credential provider successfully selected.\r |
168 | @retval EFI_INVALID_PARAMETER AutoLogon is NULL.\r | |
169 | **/\r | |
170 | typedef\r | |
171 | EFI_STATUS\r | |
042a73f5 | 172 | (EFIAPI *EFI_CREDENTIAL2_SELECT)(\r |
bfbe0bee | 173 | IN CONST EFI_USER_CREDENTIAL2_PROTOCOL *This,\r |
174 | OUT EFI_CREDENTIAL_LOGON_FLAGS *AutoLogon\r | |
9095d37b | 175 | );\r |
bfbe0bee | 176 | \r |
177 | /**\r | |
178 | Indicate that user interface interaction has ended for the specified credential.\r | |
179 | \r | |
180 | This function is called when a credential provider is deselected by the user.\r | |
181 | \r | |
182 | @param[in] This Points to this instance of the EFI_USER_CREDENTIAL2_PROTOCOL.\r | |
9095d37b | 183 | \r |
bfbe0bee | 184 | @retval EFI_SUCCESS Credential provider successfully deselected.\r |
185 | **/\r | |
186 | typedef\r | |
187 | EFI_STATUS\r | |
042a73f5 | 188 | (EFIAPI *EFI_CREDENTIAL2_DESELECT)(\r |
bfbe0bee | 189 | IN CONST EFI_USER_CREDENTIAL2_PROTOCOL *This\r |
190 | );\r | |
191 | \r | |
192 | /**\r | |
193 | Return the default logon behavior for this user credential.\r | |
194 | \r | |
9095d37b | 195 | This function reports the default login behavior regarding this credential provider.\r |
bfbe0bee | 196 | \r |
197 | @param[in] This Points to this instance of the EFI_USER_CREDENTIAL2_PROTOCOL.\r | |
9095d37b LG |
198 | @param[out] AutoLogon On return, holds whether the credential provider should be\r |
199 | used by default to automatically log on the user.\r | |
200 | \r | |
bfbe0bee | 201 | @retval EFI_SUCCESS Default information successfully returned.\r |
202 | @retval EFI_INVALID_PARAMETER AutoLogon is NULL.\r | |
203 | **/\r | |
9095d37b | 204 | typedef\r |
bfbe0bee | 205 | EFI_STATUS\r |
042a73f5 | 206 | (EFIAPI *EFI_CREDENTIAL2_DEFAULT)(\r |
bfbe0bee | 207 | IN CONST EFI_USER_CREDENTIAL2_PROTOCOL *This,\r |
208 | OUT EFI_CREDENTIAL_LOGON_FLAGS *AutoLogon\r | |
209 | );\r | |
210 | \r | |
211 | /**\r | |
212 | Return information attached to the credential provider.\r | |
213 | \r | |
9095d37b | 214 | This function returns user information.\r |
bfbe0bee | 215 | \r |
216 | @param[in] This Points to this instance of the EFI_USER_CREDENTIAL2_PROTOCOL.\r | |
9095d37b LG |
217 | @param[in] UserInfo Handle of the user information data record.\r |
218 | @param[out] Info On entry, points to a buffer of at least *InfoSize bytes. On exit, holds the user\r | |
219 | information. If the buffer is too small to hold the information, then\r | |
220 | EFI_BUFFER_TOO_SMALL is returned and InfoSize is updated to contain the\r | |
bfbe0bee | 221 | number of bytes actually required.\r |
9095d37b LG |
222 | @param[in,out] InfoSize On entry, points to the size of Info. On return, points to the size of the user\r |
223 | information.\r | |
224 | \r | |
bfbe0bee | 225 | @retval EFI_SUCCESS Information returned successfully.\r |
9095d37b | 226 | @retval EFI_BUFFER_TOO_SMALL The size specified by InfoSize is too small to hold all of the user\r |
bfbe0bee | 227 | information. The size required is returned in *InfoSize.\r |
228 | @retval EFI_NOT_FOUND The specified UserInfo does not refer to a valid user info handle.\r | |
9095d37b | 229 | @retval EFI_INVALID_PARAMETER Info is NULL or InfoSize is NULL.\r |
bfbe0bee | 230 | **/\r |
231 | typedef\r | |
232 | EFI_STATUS\r | |
042a73f5 | 233 | (EFIAPI *EFI_CREDENTIAL2_GET_INFO)(\r |
bfbe0bee | 234 | IN CONST EFI_USER_CREDENTIAL2_PROTOCOL *This,\r |
235 | IN EFI_USER_INFO_HANDLE UserInfo,\r | |
236 | OUT EFI_USER_INFO *Info,\r | |
237 | IN OUT UINTN *InfoSize\r | |
238 | );\r | |
239 | \r | |
240 | /**\r | |
241 | Enumerate all of the user information records on the credential provider.\r | |
242 | \r | |
9095d37b LG |
243 | This function returns the next user information record. To retrieve the first user information record\r |
244 | handle, point UserInfo at a NULL. Each subsequent call will retrieve another user information\r | |
245 | record handle until there are no more, at which point UserInfo will point to NULL.\r | |
bfbe0bee | 246 | \r |
247 | @param[in] This Points to this instance of the EFI_USER_CREDENTIAL2_PROTOCOL.\r | |
9095d37b LG |
248 | @param[in,out] UserInfo On entry, points to the previous user information handle or NULL to\r |
249 | start enumeration. On exit, points to the next user information handle\r | |
bfbe0bee | 250 | or NULL if there is no more user information.\r |
9095d37b | 251 | \r |
bfbe0bee | 252 | @retval EFI_SUCCESS User information returned.\r |
253 | @retval EFI_NOT_FOUND No more user information found.\r | |
254 | @retval EFI_INVALID_PARAMETER UserInfo is NULL.\r | |
255 | **/\r | |
256 | typedef\r | |
257 | EFI_STATUS\r | |
042a73f5 | 258 | (EFIAPI *EFI_CREDENTIAL2_GET_NEXT_INFO)(\r |
bfbe0bee | 259 | IN CONST EFI_USER_CREDENTIAL2_PROTOCOL *This,\r |
260 | IN OUT EFI_USER_INFO_HANDLE *UserInfo\r | |
261 | );\r | |
262 | \r | |
263 | /**\r | |
264 | Delete a user on this credential provider.\r | |
265 | \r | |
9095d37b | 266 | This function deletes a user on this credential provider.\r |
bfbe0bee | 267 | \r |
268 | @param[in] This Points to this instance of the EFI_USER_CREDENTIAL2_PROTOCOL.\r | |
269 | @param[in] User The user profile handle to delete.\r | |
270 | \r | |
271 | @retval EFI_SUCCESS User profile was successfully deleted.\r | |
9095d37b LG |
272 | @retval EFI_ACCESS_DENIED Current user profile does not permit deletion on the user profile handle.\r |
273 | Either the user profile cannot delete on any user profile or cannot delete\r | |
274 | on a user profile other than the current user profile.\r | |
bfbe0bee | 275 | @retval EFI_UNSUPPORTED This credential provider does not support deletion in the pre-OS.\r |
276 | @retval EFI_DEVICE_ERROR The new credential could not be deleted because of a device error.\r | |
277 | @retval EFI_INVALID_PARAMETER User does not refer to a valid user profile handle.\r | |
278 | **/\r | |
9095d37b LG |
279 | typedef\r |
280 | EFI_STATUS\r | |
042a73f5 | 281 | (EFIAPI *EFI_CREDENTIAL2_DELETE)(\r |
2f88bd3a MK |
282 | IN CONST EFI_USER_CREDENTIAL2_PROTOCOL *This,\r |
283 | IN EFI_USER_PROFILE_HANDLE User\r | |
284 | );\r | |
bfbe0bee | 285 | \r |
286 | ///\r | |
287 | /// This protocol provides support for a single class of credentials\r | |
288 | ///\r | |
289 | struct _EFI_USER_CREDENTIAL2_PROTOCOL {\r | |
2f88bd3a MK |
290 | EFI_GUID Identifier; ///< Uniquely identifies this credential provider.\r |
291 | EFI_GUID Type; ///< Identifies this class of User Credential Provider.\r | |
292 | EFI_CREDENTIAL2_ENROLL Enroll;\r | |
293 | EFI_CREDENTIAL2_FORM Form;\r | |
294 | EFI_CREDENTIAL2_TILE Tile;\r | |
295 | EFI_CREDENTIAL2_TITLE Title;\r | |
296 | EFI_CREDENTIAL2_USER User;\r | |
297 | EFI_CREDENTIAL2_SELECT Select;\r | |
298 | EFI_CREDENTIAL2_DESELECT Deselect;\r | |
299 | EFI_CREDENTIAL2_DEFAULT Default;\r | |
300 | EFI_CREDENTIAL2_GET_INFO GetInfo;\r | |
301 | EFI_CREDENTIAL2_GET_NEXT_INFO GetNextInfo;\r | |
302 | EFI_CREDENTIAL_CAPABILITIES Capabilities;\r | |
303 | EFI_CREDENTIAL2_DELETE Delete;\r | |
bfbe0bee | 304 | };\r |
305 | \r | |
2f88bd3a | 306 | extern EFI_GUID gEfiUserCredential2ProtocolGuid;\r |
bfbe0bee | 307 | \r |
308 | #endif\r |