KdcProxyIdentityRegister
Registers the identity with kdc_agent. This function must be called once after the URL and certificate configurations are complete.
Prototype
uint32_t KdcProxyIdentityRegister();
Parameters
None
Return Values
Return Value |
Description |
|---|---|
0 |
Success |
Non-zero |
Failure |
Precautions
- This function can be called only after SetRAAgentTokenUrl, SetKdcAgentUrl, and certificate configuration APIs (SetCaFile, SetTlsCertAndKeyFile, and SetCrlFile) are all complete.
- This function needs to be called only once during kdc_proxy startup.
- Identity registration must be completed before KdcTrustedRequest is called.
Examples
- Configure the URLs and certificates.
SetRAAgentTokenUrl("https://api.example.com/global-trust-authority/agent/v1/tokens"); SetKdcAgentUrl("https://127.0.0.1:26068/rest/kdc_agent/v1/proxy"); SetCaFile("/path/to/ca.crt"); SetTlsCertAndKeyFile("/path/to/tls.crt", "/path/to/tls.key", NULL); - Register the identity (called once at startup).
uint32_t ret = KdcProxyIdentityRegister(); if (ret != 0){ // Handle the error. return; }
Parent topic: kdc_proxy Identity Registration