Populate refresh token from a client credentials OAuth2 call (#3794)

This commit is contained in:
Ben Walker
2021-07-29 06:35:03 +01:00
committed by GitHub
parent 8b011d68cf
commit b8cc881d36
2 changed files with 5 additions and 0 deletions

View File

@@ -23,6 +23,7 @@ describe('client_credentials', () => {
bodyPath,
JSON.stringify({
access_token: 'token_123',
refresh_token: 'token_456',
token_type: 'token_type',
scope: SCOPE,
audience: AUDIENCE,
@@ -100,6 +101,7 @@ describe('client_credentials', () => {
expect(result).toEqual({
access_token: 'token_123',
id_token: null,
refresh_token: 'token_456',
expires_in: null,
token_type: 'token_type',
scope: SCOPE,
@@ -118,6 +120,7 @@ describe('client_credentials', () => {
bodyPath,
JSON.stringify({
access_token: 'token_123',
refresh_token: 'token_456',
token_type: 'token_type',
scope: SCOPE,
audience: AUDIENCE,
@@ -199,6 +202,7 @@ describe('client_credentials', () => {
expect(result).toEqual({
access_token: 'token_123',
id_token: null,
refresh_token: 'token_456',
expires_in: null,
token_type: 'token_type',
scope: SCOPE,

View File

@@ -93,6 +93,7 @@ export default async function(
const results = responseToObject(bodyBuffer.toString('utf8'), [
c.P_ACCESS_TOKEN,
c.P_ID_TOKEN,
c.P_REFRESH_TOKEN,
c.P_TOKEN_TYPE,
c.P_EXPIRES_IN,
c.P_SCOPE,