If the provider Id is been registered by other light-oauth server, then the following error will be returned.
"description": "Provider id %s exists; It has been regristed already."
Change the provider Id and the registration request again.
If the registration sucuessfully returned, we need add the provider Id to security.yml file of the light-oauth provider service (in our example, Light-oauth server B or light-oauth server C )
# light-oauth server also work as provider for other light-oauth server, following is the provider id
# JWT signature public certificates. kid and certificate path mappings.
Client gets token from local light-oauth server (from the diagram, Light-Oauth B). The token header includes certificate Key Id
Client tries to access the service which registered on light-oauth A with the access token;
The service will check the light-oauth server (Light-Oauth A) for the token to verify the access. The light-oauth server (Light-Oauth A) will try get the local certificate based on the key Id in the token header
If light-oauth server (Light-Oauth A) can get the certificate directly from local server, verify the token directly. If light-oauth server (Light-Oauth A) cannot get the certificate directly from local server, then light-oauth key service will try to get the certificate from registered provider.
If light-oauth key service will try to get the certificate from registered provider, then verify the token with the certificate. Otherwise, return with access error.