import { Money } from '@commercetools/platform-sdk'; export interface AuthenticationManager { authenticate(authentication: Authentication): Promise | Authentication; } export interface Authentication { hasPrincipal(): boolean; getAuthorities(): string[]; hasCredentials(): boolean; getPrincipal(): Principal; getCredentials(): Credentials; isAuthenticated(): boolean; } export type HeaderPrincipal = { authHeader: string; }; export type QueryParamPrincipal = { authQueryParam: string; }; export type SessionPrincipal = { cartId: string; allowedPaymentMethods: string[]; processorUrl: string; /** * @deprecated use checkoutTransactionItemId instead */ paymentInterface?: string; checkoutTransactionItemId?: string; merchantReturnUrl?: string; futureOrderNumber?: string; giftCardPlannedAmount?: Money; correlationId?: string; }; export type Oauth2Principal = { clientId: string; scope: string; customerId?: string; anonymousId?: string; }; export type JWTPrincipal = { mcCustomerId?: string; };