]>
Commit | Line | Data |
---|---|---|
e6ae24e1 AC |
1 | /** @file\r |
2 | Definition of Redfish Credential DXE driver.\r | |
3 | \r | |
4 | (C) Copyright 2020 Hewlett Packard Enterprise Development LP<BR>\r | |
5 | \r | |
6 | SPDX-License-Identifier: BSD-2-Clause-Patent\r | |
7 | \r | |
8 | **/\r | |
39de741e | 9 | \r |
e6ae24e1 AC |
10 | #ifndef EDKII_REDFISH_CREDENTIAL_DXE_H_\r |
11 | #define EDKII_REDFISH_CREDENTIAL_DXE_H_\r | |
12 | \r | |
13 | #include <Protocol/EdkIIRedfishCredential.h>\r | |
14 | \r | |
15 | #include <Library/BaseLib.h>\r | |
16 | #include <Library/DebugLib.h>\r | |
17 | #include <Library/PrintLib.h>\r | |
18 | #include <Library/RedfishCredentialLib.h>\r | |
19 | #include <Library/UefiLib.h>\r | |
20 | #include <Library/UefiBootServicesTableLib.h>\r | |
21 | \r | |
22 | /**\r | |
23 | Retrieve platform's Redfish authentication information.\r | |
24 | \r | |
25 | This functions returns the Redfish authentication method together with the user Id and\r | |
26 | password.\r | |
27 | - For AuthMethodNone, the UserId and Password could be used for HTTP header authentication\r | |
28 | as defined by RFC7235.\r | |
29 | - For AuthMethodRedfishSession, the UserId and Password could be used for Redfish\r | |
30 | session login as defined by Redfish API specification (DSP0266).\r | |
31 | \r | |
32 | Callers are responsible for and freeing the returned string storage.\r | |
33 | \r | |
34 | @param[in] This Pointer to EDKII_REDFISH_CREDENTIAL_PROTOCOL instance.\r | |
35 | @param[out] AuthMethod Type of Redfish authentication method.\r | |
36 | @param[out] UserId The pointer to store the returned UserId string.\r | |
37 | @param[out] Password The pointer to store the returned Password string.\r | |
38 | \r | |
39 | @retval EFI_SUCCESS Get the authentication information successfully.\r | |
40 | @retval EFI_ACCESS_DENIED SecureBoot is disabled after EndOfDxe.\r | |
41 | @retval EFI_INVALID_PARAMETER This or AuthMethod or UserId or Password is NULL.\r | |
42 | @retval EFI_OUT_OF_RESOURCES There are not enough memory resources.\r | |
43 | @retval EFI_UNSUPPORTED Unsupported authentication method is found.\r | |
44 | \r | |
45 | **/\r | |
46 | EFI_STATUS\r | |
47 | EFIAPI\r | |
48 | RedfishCredentialGetAuthInfo (\r | |
39de741e MK |
49 | IN EDKII_REDFISH_CREDENTIAL_PROTOCOL *This,\r |
50 | OUT EDKII_REDFISH_AUTH_METHOD *AuthMethod,\r | |
51 | OUT CHAR8 **UserId,\r | |
52 | OUT CHAR8 **Password\r | |
e6ae24e1 AC |
53 | );\r |
54 | \r | |
55 | /**\r | |
56 | Notify the Redfish service provide to stop provide configuration service to this platform.\r | |
57 | \r | |
58 | This function should be called when the platfrom is about to leave the safe environment.\r | |
59 | It will notify the Redfish service provider to abort all logined session, and prohibit\r | |
60 | further login with original auth info. GetAuthInfo() will return EFI_UNSUPPORTED once this\r | |
61 | function is returned.\r | |
62 | \r | |
63 | @param[in] This Pointer to EDKII_REDFISH_CREDENTIAL_PROTOCOL instance.\r | |
64 | \r | |
65 | @retval EFI_SUCCESS Service has been stoped successfully.\r | |
66 | @retval EFI_INVALID_PARAMETER This is NULL.\r | |
67 | @retval Others Some error happened.\r | |
68 | \r | |
69 | **/\r | |
70 | EFI_STATUS\r | |
71 | EFIAPI\r | |
72 | RedfishCredentialStopService (\r | |
39de741e MK |
73 | IN EDKII_REDFISH_CREDENTIAL_PROTOCOL *This,\r |
74 | IN EDKII_REDFISH_CREDENTIAL_STOP_SERVICE_TYPE ServiceStopType\r | |
e6ae24e1 | 75 | );\r |
39de741e | 76 | \r |
e6ae24e1 | 77 | #endif\r |