Skip to content
This repository has been archived by the owner on Feb 22, 2021. It is now read-only.

Add Get Access Token sample #37

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

Add Get Access Token sample #37

wants to merge 2 commits into from

Conversation

jrgarcia
Copy link
Contributor

What this PR does / why we need it:

This sample allows you to get an access token using the OAuth2 client
credentials grant type. You create a Server to Server app and get a
client ID and client secret. Using these, you can get an access token
from the added API call.

This also includes an update to the VMC Environment file for client_id
and client_secret.

This sample allows you to get an access token using the OAuth2 client
credentials grant type. You create a Server to Server app and get a
client ID and client secret. Using these, you can get an access token
from the added API call.

This also includes an update to the VMC Environment file for client_id
and client_secret.

Signed-off-by: J.R. Garcia <[email protected]>
@jrgarcia jrgarcia requested a review from jobingeo July 31, 2019 20:02
Copy link

@jobingeo jobingeo left a comment

Choose a reason for hiding this comment

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

Looks good.
Is this tested?

"enabled": true
},
{
"key": "client_id",
Copy link

Choose a reason for hiding this comment

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

rename to app_id

"enabled": true
},
{
"key": "client_secret",
Copy link

Choose a reason for hiding this comment

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

rename to app_secret.

The VMC oAuth Apps use this name convention

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I can rename these tomorrow. I took those names from the downloaded JSON file from VMC, I didn't realize there was any other naming.

@jrgarcia
Copy link
Contributor Author

jrgarcia commented Aug 1, 2019

@jobingeo Yes, I tested this and it works fine. There is also a test to ensure that an access token is returned.

@jrgarcia
Copy link
Contributor Author

jrgarcia commented Aug 1, 2019

@jobingeo Ok, I've updated the variable names.

Rename the client_id and client_secret variables to app_id and app_secret.

Signed-off-by: J.R. Garcia <[email protected]>
@jrgarcia jrgarcia requested a review from jobingeo August 16, 2019 02:44
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants