import { User, Ticket, Credential, CredentialId, Base64UrlString } from '@digitalpersona/core'; import { ExtendedAuthResult } from './extendedResult'; import { Service } from '../../private'; /** Branded alias type for an authentication handle. */ export declare type AuthenticationHandle = number & { brand?: "dp.services.AuthenticationHandle"; }; /** DigitalPersona Web Authentication (DPWebAuth) service interface. */ export interface IAuthService { GetUserCredentials(user: User): Promise; GetEnrollmentData(user: User, credentialId: CredentialId): Promise; Identify(credential: Credential): Promise; Authenticate(identity: User | Ticket, credential: Credential): Promise; CustomAction(actionId: number, ticket: Ticket, user: User, credential: Credential): Promise; CreateAuthentication(identity: User | Ticket | null, credentialId: CredentialId): Promise; ContinueAuthentication(auth: AuthenticationHandle, data: string): Promise; DestroyAuthentication(auth: AuthenticationHandle): Promise; } /** DigitalPersona WebAuth (DPWebAuth) service client wrapper. */ export declare class AuthService extends Service implements IAuthService { /** Constructs a service wrapper. * @param endpointUrl - a URL to the DPWebClaims service. */ constructor(endpointUrl: string); /** @inheritdoc */ GetUserCredentials(user: User): Promise; /** @inheritdoc */ GetEnrollmentData(user: User, credentialId: CredentialId): Promise; /** @inheritdoc */ Identify(credential: Credential): Promise; /** @inheritdoc */ Authenticate(identity: User | Ticket, credential: Credential): Promise; /** @inheritdoc */ CustomAction(actionId: number, ticket?: Ticket, user?: User, credential?: Credential): Promise; /** @inheritdoc */ CreateAuthentication(identity: User | Ticket | null, credentialId: CredentialId): Promise; /** @inheritdoc */ ContinueAuthentication(authId: AuthenticationHandle, authData: string): Promise; /** @inheritdoc */ DestroyAuthentication(authId: AuthenticationHandle): Promise; }