When to use the named credential and JWT?

When to use the named credential and JWT?

When your code uses the named credential to call your 3rd party service, SF will send the newly issued JWT token to your 3rd party service as a bearer token (a type of access token). JWT Token Exchange: SF will issue a JWT and send it to the external authorization service.

How to use JWT tokens to exchange data?

In our example, we will use OAuth2 access tokens to authorize calls to the API and JWT tokens to transfer user data between the API and the backend. In this way, we can exchange confidential information between the API Manager and the backend (usually an Enterprise Integrator), in an automated and secure way.

Is the service endpoint URL the same as the JWT?

The “service endpoint URL” (URL field on the Named Credential screen) is definitely not the same as the Token Endpoint URL. You would use JWT Token option if the 3rd party service you’re calling supports JWT as a bearer token for authorization.

How does a user get an access token?

The user will subscribe to an existing API through the API Store. The API Store will delegate control to the API Gateway, which will connect to the IS-KM and get an access token. The user will call a specific API resource with the retrieved access token.

Why do we need JWT token exchange in Salesforce?

Intent :- 1) To facilitate the JWT token exchnage between salesforce and external auth server. I am using apex callout to test this. However any other mechanism to test the same is also appreciated.

What’s the difference between JWT and JWT exchange?

When JWT exchange is selected, two additional attributes Scope and Token Endpoint URL are shown. This kind of makes sense to me, that the URL attribute in the top is the endpoint url for the service to which, the call needs to be made and the token endpoint url is the one for which the JWT will be sent to get the access token.