diff --git a/src/events/http/authJWTSettingsExtractor.js b/src/events/http/authJWTSettingsExtractor.js index 19fade1c5..73396a076 100644 --- a/src/events/http/authJWTSettingsExtractor.js +++ b/src/events/http/authJWTSettingsExtractor.js @@ -1,20 +1,24 @@ import { log } from '@serverless/utils/log.js' +function buildFailureResult(warningMessage) { + log.warning(warningMessage) + + return { + unsupportedAuth: true, + } +} + +function buildSuccessResult(authorizerName) { + return { + authorizerName, + } +} + export default function authJWTSettingsExtractor( endpoint, provider, ignoreJWTSignature, ) { - const buildFailureResult = (warningMessage) => { - log.warning(warningMessage) - - return { - unsupportedAuth: true, - } - } - - const buildSuccessResult = (authorizerName) => ({ authorizerName }) - const { authorizer } = endpoint if (!authorizer) {