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