diff options
author | Sebastian <sebasjm@gmail.com> | 2024-05-06 13:06:05 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2024-05-06 13:06:05 -0300 |
commit | f062d9f774944063784907b6788a17e543a36d54 (patch) | |
tree | d1f1a71ef13cd63b55ce63df6df6f19e1872a1d2 /packages/merchant-backoffice-ui/src | |
parent | bf03157b6570af6804032e206a3c60a3c7e030f3 (diff) | |
download | wallet-core-f062d9f774944063784907b6788a17e543a36d54.tar.xz |
fix #8783
Diffstat (limited to 'packages/merchant-backoffice-ui/src')
3 files changed, 8 insertions, 8 deletions
diff --git a/packages/merchant-backoffice-ui/src/paths/admin/create/CreatePage.tsx b/packages/merchant-backoffice-ui/src/paths/admin/create/CreatePage.tsx index 4a5ab440b..a28992a2f 100644 --- a/packages/merchant-backoffice-ui/src/paths/admin/create/CreatePage.tsx +++ b/packages/merchant-backoffice-ui/src/paths/admin/create/CreatePage.tsx @@ -22,7 +22,7 @@ import { Duration, TalerMerchantApi, - createAccessToken, + createRFC8959AccessTokenPlain, } from "@gnu-taler/taler-util"; import { useTranslationContext } from "@gnu-taler/web-util/browser"; import { h, VNode } from "preact"; @@ -132,7 +132,7 @@ export function CreatePage({ onCreate, onBack, forceId }: Props): VNode { newValue.auth = newToken === null || newToken === undefined ? { method: "external" } - : { method: "token", token: createAccessToken(newToken) }; + : { method: "token", token: createRFC8959AccessTokenPlain(newToken) }; if (!newValue.address) newValue.address = {}; if (!newValue.jurisdiction) newValue.jurisdiction = {}; // remove above use conversion diff --git a/packages/merchant-backoffice-ui/src/paths/instance/token/DetailPage.tsx b/packages/merchant-backoffice-ui/src/paths/instance/token/DetailPage.tsx index f75ee89b8..d718ffb69 100644 --- a/packages/merchant-backoffice-ui/src/paths/instance/token/DetailPage.tsx +++ b/packages/merchant-backoffice-ui/src/paths/instance/token/DetailPage.tsx @@ -27,7 +27,7 @@ import { FormProvider } from "../../../components/form/FormProvider.js"; import { Input } from "../../../components/form/Input.js"; import { NotificationCard } from "../../../components/menu/index.js"; import { useSessionContext } from "../../../context/session.js"; -import { AccessToken, createAccessToken } from "@gnu-taler/taler-util"; +import { AccessToken, createRFC8959AccessTokenPlain } from "@gnu-taler/taler-util"; interface Props { hasToken: boolean | undefined; @@ -78,9 +78,9 @@ export function DetailPage({ if (hasErrors) return; const oldToken = form.old_token !== undefined && hasToken - ? createAccessToken(form.old_token) + ? createRFC8959AccessTokenPlain(form.old_token) : undefined; - const newToken = createAccessToken(form.new_token!); + const newToken = createRFC8959AccessTokenPlain(form.new_token!); onNewToken(oldToken, newToken); } @@ -134,7 +134,7 @@ export function DetailPage({ class="button" onClick={() => { if (hasToken) { - onClearToken(form.old_token ? createAccessToken(form.old_token) : undefined); + onClearToken(form.old_token ? createRFC8959AccessTokenPlain(form.old_token) : undefined); } else { onClearToken(undefined); } diff --git a/packages/merchant-backoffice-ui/src/paths/login/index.tsx b/packages/merchant-backoffice-ui/src/paths/login/index.tsx index 272c40b55..d77bc75fd 100644 --- a/packages/merchant-backoffice-ui/src/paths/login/index.tsx +++ b/packages/merchant-backoffice-ui/src/paths/login/index.tsx @@ -19,7 +19,7 @@ * @author Sebastian Javier Marchano (sebasjm) */ -import { HttpStatusCode, createAccessToken } from "@gnu-taler/taler-util"; +import { HttpStatusCode, createRFC8959AccessTokenEncoded } from "@gnu-taler/taler-util"; import { useTranslationContext } from "@gnu-taler/web-util/browser"; @@ -49,7 +49,7 @@ export function LoginPage(_p: Props): VNode { async function doLoginImpl() { const result = await lib.authenticate.createAccessTokenBearer( - createAccessToken(token), + createRFC8959AccessTokenEncoded(token), tokenRequest, ); if (result.type === "ok") { |