Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get ephemeral tokens for Partners #39

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

lucmir
Copy link

@lucmir lucmir commented Mar 15, 2019

Add the getEphemeralToken method to the Civic client so Civic (requester) customers will be able to secure the Partner interactions.

The ephemeral token is retrieved from a central service that is authenticated using a JWT based on the app specific ID and keys.

Usage example:

const civicSip = require('civic-sip-api');

const civicClient = civicSip.newClient({
    appId: 'ABC123',
    appSecret: APP_SECRET,
    prvKey: PRV_KEY,
});

civicClient.getEphemeralToken()
    .then((ephemeralToken) => {
      // use ephemeralToken in requests from Partners
    }).catch((error) => {
        console.log(error);
    });

@lucmir lucmir self-assigned this Mar 15, 2019
@lucmir lucmir changed the title [WIP] Request ephemeral token from SIP client Request ephemeral token from SIP client Mar 15, 2019
@lucmir lucmir changed the title Request ephemeral token from SIP client Request an ephemeral token to authenticate Partners interactions Mar 15, 2019
@lucmir lucmir changed the title Request an ephemeral token to authenticate Partners interactions Get ephemeral tokens to authenticate Partners interactions Mar 15, 2019
@lucmir lucmir changed the title Get ephemeral tokens to authenticate Partners interactions Get ephemeral tokens for Partners interactions Mar 15, 2019
@lucmir lucmir changed the title Get ephemeral tokens for Partners interactions Get ephemeral tokens for Partners Mar 15, 2019
dmelosantos
dmelosantos previously approved these changes Mar 15, 2019
Copy link
Contributor

@dmelosantos dmelosantos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see no changes to be made.

@@ -80,6 +80,29 @@ civicClient.exchangeCode(jwtToken)
});
```

### Ephemeral Token
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be possible to add a use case description here and show how it would be used on the front end? I think it would help anyone coming here to understand when to use this token?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants