diff options
Diffstat (limited to 'packages/taler-util/src/http-client/types.ts')
-rw-r--r-- | packages/taler-util/src/http-client/types.ts | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/packages/taler-util/src/http-client/types.ts b/packages/taler-util/src/http-client/types.ts index 05897614a..7f97f9ff1 100644 --- a/packages/taler-util/src/http-client/types.ts +++ b/packages/taler-util/src/http-client/types.ts @@ -221,6 +221,16 @@ export namespace TalerAuthentication { // Opque access token. access_token: AccessToken; } + export interface TokenSuccessResponseMerchant { + // Expiration determined by the server. + // Can be based on the token_duration + // from the request, but ultimately the + // server decides the expiration. + expiration: Timestamp; + + // Opque access token. + token: AccessToken; + } } // DD51 https://docs.taler.net/design-documents/051-fractional-digits.html @@ -254,6 +264,13 @@ export const codecForTokenSuccessResponse = .property("expiration", codecForTimestamp) .build("TalerAuthentication.TokenSuccessResponse"); +export const codecForTokenSuccessResponseMerchant = + (): Codec<TalerAuthentication.TokenSuccessResponseMerchant> => + buildCodecForObject<TalerAuthentication.TokenSuccessResponseMerchant>() + .property("token", codecForAccessToken()) + .property("expiration", codecForTimestamp) + .build("TalerAuthentication.TokenSuccessResponseMerchant"); + export const codecForCurrencySpecificiation = (): Codec<CurrencySpecification> => buildCodecForObject<CurrencySpecification>() |