@iotize/tap
Version:
IoTize Device client for Javascript
25 lines (24 loc) • 1.24 kB
TypeScript
import { CodeError } from '@iotize/common/error';
import { TapResponseStatusError } from '@iotize/tap';
import { UsernamePassword } from './definitions';
export declare class TapAuthError extends CodeError<TapAuthError.Code> {
cause?: Error | undefined;
static tapRequestError(params: any, err: Error): TapAuthError;
static tooManyLoginFailedError(params: UsernamePassword, err: TapResponseStatusError): TapAuthError;
static invalidCredentialsError(credentials: UsernamePassword, err: TapResponseStatusError): TapAuthError;
constructor(code: TapAuthError.Code, message: string, cause?: Error | undefined);
}
export declare namespace TapAuthError {
enum Code {
InvalidServerProof = "TapAuthErrorInvalidServerProof",
ScramDisabled = "TapAuthErrorScramDisabled",
InvalidCredentials = "TapAuthErrorInvalidCredentials",
TooManyLoginAttempt = "TapAuthErrorTooManyLoginAttempt",
TapRequestError = "TapAuthErrorTapRequestError"
}
class InvalidServerKey extends TapAuthError {
deviceServerProof: Uint8Array;
expectedServerProof: Uint8Array;
constructor(deviceServerProof: Uint8Array, expectedServerProof: Uint8Array);
}
}