Skip to content

Commit

Permalink
Update test description
Browse files Browse the repository at this point in the history
  • Loading branch information
alexashley committed Feb 15, 2019
1 parent 16826d9 commit 8f9ec79
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
5 changes: 0 additions & 5 deletions src/plugin.js
Expand Up @@ -119,11 +119,6 @@ const authenticateOrRefresh = async (config, tokens) => {

let newTokens = null;

/*
* TODO:
* - not handling refresh
* - not checking if refresh token has already expired
* */
if (shouldAuthenticate(tokens)) {
debug(
`authenticating to ${issuerUri} with client ${clientId} and grant type: ${grantType}`
Expand Down
2 changes: 1 addition & 1 deletion test/plugin.spec.js
Expand Up @@ -266,7 +266,7 @@ describe('plugin', () => {
expect(tokenAfterRefresh.jti).not.toBe(tokenBeforeRefresh.jti);
});

it('should not refresh the token if it has not expired', async () => {
it('should re-use non-expired token', async () => {
const previousToken = await getNthAccessTokenClaims();

await requestHook(context);
Expand Down

0 comments on commit 8f9ec79

Please sign in to comment.