export interface AuthenticationInfo { /** * Authentication type. */ type: string; /** * Indicates whether or not the authentication information is valid. * * @return *true* if the authentication information is valid. */ isValid(): boolean; /** * Encodes the authentication information as a string. * * @return encoded authentication information. */ encode(): string; /** * Returns the username associated with this authentication information. * * @return username. */ getUsername(): string; } export interface AuthenticationProvider { /** * Generates and returns authentication information. * * @return authentication information. */ getAuthenticationInfo(): Promise; /** * Resets internal state and releases any associated resources. */ reset(): void; } /** * Authentication info consisting of a JWT signed using the TEST registration key. */ export declare class TESTAuthenticationInfo implements AuthenticationInfo { private jwt; readonly type: string; constructor(jwt: string); isValid(): boolean; encode(): string; getUsername(): string; } /** * Authentication provider for generating authentication info using a TEST registration key. * * @param name provider name. This name will be prepended to the generated UUID in JWT sub. * @param privateKey PEM encoded RSA private key. * @param keyId key ID of the TEST registration key which is obtained from the admin console. * @param attributes additional attributes to be added to the issued authentication info. */ export declare class TESTAuthenticationProvider implements AuthenticationProvider { private name; private privateKey; private keyId; private attributes?; readonly testRegistrationIssuer: string; readonly testRegistrationAudience: string; constructor(name: string, privateKey: string, keyId?: string, attributes?: Record | undefined); getAuthenticationInfo(): Promise; reset(): void; } /** * Authentication info consisting of a JWT signed using the locally stored private key. */ export declare class LocalAuthenticationInfo implements AuthenticationInfo { private jwt; private username; readonly type: string; constructor(jwt: string, username: string); isValid(): boolean; encode(): string; getUsername(): string; } /** * Authentication info consisting of a JWT signed using the locally stored private key. * * @param name provider name. This name will be used to populate JWT iss (issuer). * @param privateKey PEM encoded RSA private key. * @param keyId key ID. * @param username username to be associated with the issued authentication info. * @param attributes additional attributes to be added to the issued authentication info. */ export declare class LocalAuthenticationProvider implements AuthenticationProvider { private name; private privateKey; private keyId; private username; private attributes?; constructor(name: string, privateKey: string, keyId: string, username: string, attributes?: Record | undefined); getAuthenticationInfo(): Promise; reset(): void; }