How to use a Named Credential within an Auth. Provider Pluggin?

125 Views Asked by At

I'm currently working on an Apex Auth Provider Plugin, and I've encountered a PMD code scan error with the following message:

Suggest named credentials for authentication. Rule: Security-ApexSuggestUsingNamedCred

The challenge I'm facing is that, to create the required Named Credential, I need to have an Auth Provider already created that is specific to that Named Credential. This leads to a circular dependency where creating one necessitates the creation of the other, and so on.

How you typically addres this PMD rule in such scenarios. Any insights or suggestions would be greatly appreciated.

Thank you!

0

There are 0 best solutions below