cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Retrieve token

fshestov
Explorer
0 Likes
656

Hi Guys. I created a cloud application with approuter. When a user goes to the link there are a few identity providers(cloud foundry). I would like to retrieve a token for one of them. For example, A is the first provider (default), B is another (connected to ByD). I need a token for the second one. Which API endpoint do I need to use? Thanks

Accepted Solutions (0)

Answers (1)

Answers (1)

CarlosRoggan
Product and Topic Expert
Product and Topic Expert
0 Likes

Hi,

as far as I understand, the scenario is as follows:

Your app and your approuter are bound to an instance of XSUAA.
When the user logs in, the token is issued by this XSUAA - (oauth-server)
However, the xsuaa is not the Identity Provider.
As such, XSUAA will delegate the user-verification to the connected IdP.
Not matter which one is chosen (depends on the user, where he is stored)
So if I'm correct, to fetch a JWT token, you always turn to the URL which is revealed to you in the binding of XSUAA to your app (use cf env <appname> to view the credentials) or you create a service key for the XSUAA instance, then view the credentials there.

Does this sound reasonable?
Cheers,
Carlos

fshestov
Explorer
0 Likes

you're right. The process happens exactly this way. But I would like to get a list. of Idp via API call and choose one and send a request to obtain a token