Skip to content

Commit

Permalink
fix(oidc): dpop typo
Browse files Browse the repository at this point in the history
  • Loading branch information
guillaume-chervet committed Nov 8, 2024
1 parent 08a21f8 commit 0986096
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions packages/oidc-client/src/oidcClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<T extends OidcUserInfo = OidcUserInfo>(
noCache = false,
demonstrating_proof_of_possession: boolean = false,
demonstratingProofOfPossession: boolean = false,
): Promise<T> {
return this._oidc.userInfoAsync(noCache, demonstrating_proof_of_possession);
return this._oidc.userInfoAsync(noCache, demonstratingProofOfPossession);
}

userInfo<T extends OidcUserInfo = OidcUserInfo>(): T {
Expand Down
12 changes: 6 additions & 6 deletions packages/react-oidc/src/FetchToken.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,34 +11,34 @@ const fetchWithToken =
(
fetch: Fetch,
getOidcWithConfigurationName: () => OidcClient | null,
demonstrating_proof_of_possession: boolean = false,
demonstratingProofOfPossession: boolean = false,
) =>
async (...params: Parameters<Fetch>) => {
const oidc = getOidcWithConfigurationName();
const newFetch = oidc.fetchWithTokens(fetch, demonstrating_proof_of_possession);
const newFetch = oidc.fetchWithTokens(fetch, demonstratingProofOfPossession);
return await newFetch(...params);
};

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,

Check failure on line 33 in packages/react-oidc/src/FetchToken.tsx

View workflow job for this annotation

GitHub Actions / Run linters

Delete `··`

Check failure on line 33 in packages/react-oidc/src/FetchToken.tsx

View workflow job for this annotation

GitHub Actions / Run linters

Delete `··`
);
return <WrappedComponent {...props} fetch={newFetch} />;
};

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;
Expand All @@ -49,7 +49,7 @@ export const useOidcFetch = (
const newFetch = fetchWithToken(
previousFetch,
getOidcWithConfigurationName,
demonstrating_proof_of_possession,
demonstratingProofOfPossession,

Check failure on line 52 in packages/react-oidc/src/FetchToken.tsx

View workflow job for this annotation

GitHub Actions / Run linters

Delete `··`

Check failure on line 52 in packages/react-oidc/src/FetchToken.tsx

View workflow job for this annotation

GitHub Actions / Run linters

Delete `··`
);
return newFetch(input, init);
},
Expand Down

0 comments on commit 0986096

Please sign in to comment.