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