adobe / aio-lib-ims

Adobe I/O JavaScript SDK supporting Adobe IMS (Identity Management System) authentication
https://www.adobe.io
Apache License 2.0
5 stars 13 forks source link

Support for IMS service token generation plugin #34

Open moritzraho opened 4 years ago

moritzraho commented 4 years ago
curl --location --request POST 'https://ims-na1-stg1.adobelogin.com/ims/token/v1' \
--header 'Content-Type:  application/x-www-form-urlencoded' \
--form 'grant_type=authorization_code' \
--form 'client_id=<your service client Id>' \
--form 'client_secret=<your client secret>' \
--form 'scope=<scopes> \
--form 'code=<your permanent auth code>'
moritzraho commented 4 years ago

The src/ims.js already provides async getAccessToken (authCode, clientId, clientSecret, scopes) { the idea is that the plugin would wrap this function to additionally provide context and caching mechanisms

honstar commented 3 years ago

@moritzraho @shazron : I started working on a separate plugin and have a working version running on my local machine. Can you guys let me know how to proceed in terms of logistics? Shall I raise a PR from my personal space?

honstar commented 3 years ago

Here's a PR for review: https://github.com/honstar/aio-lib-ims-s2s/pull/1. cc: @moritzraho @shazron @meryllblanchet

moritzraho commented 3 years ago

Hi @honstar, thanks, I will open a repository in git.corp and go through the open sourcing process to get it as part of the adobe org.

moritzraho commented 3 years ago

In the meantime we will look at your PR 🙂 , thank you so much !

moritzraho commented 3 years ago

Also, you can open a PR against this repository to integrate your plugin into: https://github.com/adobe/aio-lib-ims/blob/master/src/token-helper.js in the same way the jwt plugin is handled there. (we will publish the npm package later, but we will be able to test through local linking)

honstar commented 3 years ago

@moritzraho : I can do that, sure. Shall I use @adobe/aio-lib-ims-s2s already and you start testing via local linking?

moritzraho commented 3 years ago

@moritzraho : I can do that, sure. Shall I use @adobe/aio-lib-ims-s2s already and you start testing via local linking?

Sure I think @adobe/aio-lib-ims-s2s is a good name maybe let's ask @meryllblanchet too for the naming?