Skip to content

Commit e0b27c6

Browse files
committed
refactor(token-handler): remove redundant PKCE check for client_id retrieval and rename test description
1 parent a0447b6 commit e0b27c6

2 files changed

Lines changed: 1 addition & 7 deletions

File tree

lib/handlers/token-handler.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -190,12 +190,6 @@ class TokenHandler {
190190
};
191191
}
192192

193-
if (pkce.isPKCERequest({ grantType, codeVerifier })) {
194-
if (request.body.client_id) {
195-
return { clientId: request.body.client_id };
196-
}
197-
}
198-
199193
if (request.body.client_id) {
200194
return { clientId: request.body.client_id };
201195
}

test/unit/handlers/token-handler_test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ describe('TokenHandler', function () {
4545
.catch(should.fail);
4646
});
4747

48-
it('should call `model.getClient()` with no secret is provided (public client)', function () {
48+
it('should call `model.getClient()` when no client secret is provided (public client)', function () {
4949
const model = Model.from({
5050
getClient: sinon.stub().returns({ grants: ['authorization_code'], type: 'public' }),
5151
saveToken: function () {},

0 commit comments

Comments
 (0)