From 098609664a6ca50c897b5adba68720e645132c07 Mon Sep 17 00:00:00 2001 From: Guillaume Chervet Date: Fri, 8 Nov 2024 10:12:23 +0100 Subject: [PATCH 1/2] fix(oidc): dpop typo --- packages/oidc-client/src/oidcClient.ts | 8 ++++---- packages/react-oidc/src/FetchToken.tsx | 12 ++++++------ 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/packages/oidc-client/src/oidcClient.ts b/packages/oidc-client/src/oidcClient.ts index 9aaa6bd46..334bc81c5 100644 --- a/packages/oidc-client/src/oidcClient.ts +++ b/packages/oidc-client/src/oidcClient.ts @@ -106,15 +106,15 @@ export class OidcClient { return getValidTokenAsync(oidcToken, waitMs, numberWait); } - fetchWithTokens(fetch: Fetch, demonstrating_proof_of_possession: boolean = false): Fetch { - return fetchWithTokens(fetch, this._oidc, demonstrating_proof_of_possession); + fetchWithTokens(fetch: Fetch, demonstratingProofOfPossession: boolean = false): Fetch { + return fetchWithTokens(fetch, this._oidc, demonstratingProofOfPossession); } async userInfoAsync( noCache = false, - demonstrating_proof_of_possession: boolean = false, + demonstratingProofOfPossession: boolean = false, ): Promise { - return this._oidc.userInfoAsync(noCache, demonstrating_proof_of_possession); + return this._oidc.userInfoAsync(noCache, demonstratingProofOfPossession); } userInfo(): T { diff --git a/packages/react-oidc/src/FetchToken.tsx b/packages/react-oidc/src/FetchToken.tsx index c4e9d60ce..fe00ddb1f 100644 --- a/packages/react-oidc/src/FetchToken.tsx +++ b/packages/react-oidc/src/FetchToken.tsx @@ -11,11 +11,11 @@ const fetchWithToken = ( fetch: Fetch, getOidcWithConfigurationName: () => OidcClient | null, - demonstrating_proof_of_possession: boolean = false, + demonstratingProofOfPossession: boolean = false, ) => async (...params: Parameters) => { const oidc = getOidcWithConfigurationName(); - const newFetch = oidc.fetchWithTokens(fetch, demonstrating_proof_of_possession); + const newFetch = oidc.fetchWithTokens(fetch, demonstratingProofOfPossession); return await newFetch(...params); }; @@ -23,14 +23,14 @@ export const withOidcFetch = ( fetch: Fetch = null, configurationName = defaultConfigurationName, - demonstrating_proof_of_possession: boolean = false, + demonstratingProofOfPossession: boolean = false, ) => WrappedComponent => (props: ComponentWithOidcFetchProps) => { const { fetch: newFetch } = useOidcFetch( fetch || props.fetch, configurationName, - demonstrating_proof_of_possession, + demonstratingProofOfPossession, ); return ; }; @@ -38,7 +38,7 @@ export const withOidcFetch = export const useOidcFetch = ( fetch: Fetch = null, configurationName = defaultConfigurationName, - demonstrating_proof_of_possession: boolean = false, + demonstratingProofOfPossession: boolean = false, ) => { const previousFetch = fetch || window.fetch; const getOidc = OidcClient.get; @@ -49,7 +49,7 @@ export const useOidcFetch = ( const newFetch = fetchWithToken( previousFetch, getOidcWithConfigurationName, - demonstrating_proof_of_possession, + demonstratingProofOfPossession, ); return newFetch(input, init); }, From 14d291274520ee6ee38aca2fbab9d70272d24f63 Mon Sep 17 00:00:00 2001 From: Guillaume Chervet Date: Fri, 8 Nov 2024 12:28:56 +0100 Subject: [PATCH 2/2] fix lint --- packages/react-oidc/src/FetchToken.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/react-oidc/src/FetchToken.tsx b/packages/react-oidc/src/FetchToken.tsx index fe00ddb1f..71ce80167 100644 --- a/packages/react-oidc/src/FetchToken.tsx +++ b/packages/react-oidc/src/FetchToken.tsx @@ -30,7 +30,7 @@ export const withOidcFetch = const { fetch: newFetch } = useOidcFetch( fetch || props.fetch, configurationName, - demonstratingProofOfPossession, + demonstratingProofOfPossession, ); return ; }; @@ -49,7 +49,7 @@ export const useOidcFetch = ( const newFetch = fetchWithToken( previousFetch, getOidcWithConfigurationName, - demonstratingProofOfPossession, + demonstratingProofOfPossession, ); return newFetch(input, init); },