Based on edk2 discussion, update RedfishCredentailDxe driver to follow below design:
New function to determinate authentication method will be created in this driver. The idea is as below:
Get URI path to computer system by parsing redfish service root (/redfish/v1)
Issue HTTP GET to "/redfish/v1/Systems" (which normally require authentication) without authentication method.
a) if client receive 200 OK, "No Auth" is used and we don't need to get credentials
b) if client receive 401 Unauthorized, check the "WWW-Authenticate" field in returned HTTP header. "Basic realm" or "X-Auh-Token realm" or both two methods will be specified. Then client can know what method to use. Two methods all require credential.
Will need to update edk2/RedfishPkg/Include/Library/RedfishCredentialLib.h and remove EDKII_REDFISH_AUTH_METHOD from API.
Add new design of getting permanent credentials in this driver. And leave the implementation to vendor as optional feature.
Based on edk2 discussion, update RedfishCredentailDxe driver to follow below design: