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