Skip to content

Commit 593cab5

Browse files
committed
chore: update client auth related variables
1 parent 8f2d8b1 commit 593cab5

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

lib/actions/authorization/index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -141,11 +141,11 @@ export default function authorizationAction(provider, endpoint) {
141141
use(() => deviceUserFlow.bind(undefined, allowList), CV, DR );
142142
use(() => parseBody, A, DA, PAR, BA);
143143
if (authRequired.has(endpoint)) {
144-
const { params: authParams, middleware: tokenAuth } = getClientAuth(provider);
144+
const { params: authParams, middleware: clientAuth } = getClientAuth(provider);
145145
use(() => paramsMiddleware.bind(undefined, authParams), DA, PAR, BA);
146-
tokenAuth.forEach((tokenAuthMiddleware) => {
147-
use(() => tokenAuthMiddleware, DA, PAR, BA);
148-
});
146+
for (const clientAuthMiddlware of clientAuth) {
147+
use(() => clientAuthMiddlware, DA, PAR, BA);
148+
}
149149
}
150150
use(() => authenticatedClientId, DA, BA);
151151
use(() => paramsMiddleware.bind(undefined, allowList), A, DA, PAR, BA);

lib/actions/introspection.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const introspectable = new Set(['AccessToken', 'ClientCredentials', 'RefreshToke
1111
const JWT = 'application/token-introspection+jwt';
1212

1313
export default function introspectionAction(provider) {
14-
const { params: authParams, middleware: tokenAuth } = getClientAuth(provider);
14+
const { params: authParams, middleware: clientAuth } = getClientAuth(provider);
1515
const PARAM_LIST = new Set(['token', 'token_type_hint', ...authParams]);
1616
const { configuration } = instance(provider);
1717
const {
@@ -53,7 +53,7 @@ export default function introspectionAction(provider) {
5353
noCache,
5454
parseBody,
5555
paramsMiddleware.bind(undefined, PARAM_LIST),
56-
...tokenAuth,
56+
...clientAuth,
5757
rejectDupes.bind(undefined, {}),
5858

5959
async function validateTokenPresence(ctx, next) {

lib/actions/revocation.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import revoke from '../helpers/revoke.js';
1010
const revokeable = new Set(['AccessToken', 'ClientCredentials', 'RefreshToken']);
1111

1212
export default function revocationAction(provider) {
13-
const { params: authParams, middleware: tokenAuth } = getClientAuth(provider);
13+
const { params: authParams, middleware: clientAuth } = getClientAuth(provider);
1414
const PARAM_LIST = new Set(['token', 'token_type_hint', ...authParams]);
1515
const { grantTypeHandlers } = instance(provider);
1616

@@ -39,7 +39,7 @@ export default function revocationAction(provider) {
3939
return [
4040
parseBody,
4141
paramsMiddleware.bind(undefined, PARAM_LIST),
42-
...tokenAuth,
42+
...clientAuth,
4343
rejectDupes.bind(undefined, {}),
4444

4545
async function validateTokenPresence(ctx, next) {

lib/actions/token.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ import paramsMiddleware from '../shared/assemble_params.js';
1010
const grantTypeSet = new Set(['grant_type']);
1111

1212
export default function tokenAction(provider) {
13-
const { params: authParams, middleware: tokenAuth } = getClientAuth(provider);
13+
const { params: authParams, middleware: clientAuth } = getClientAuth(provider);
1414
const { grantTypeParams } = instance(provider);
1515

1616
return [
1717
noCache,
1818
parseBody,
1919
paramsMiddleware.bind(undefined, grantTypeParams.get(undefined)),
20-
...tokenAuth,
20+
...clientAuth,
2121

2222
rejectDupes.bind(undefined, { only: grantTypeSet }),
2323

0 commit comments

Comments
 (0)