@eclipse-ditto/ditto-javascript-client-node
Version:
Node.js(r) implementation of Eclipse Ditto JavaScript API.
56 lines • 1.97 kB
TypeScript
/*!
* Copyright (c) 2019 Contributors to the Eclipse Foundation
*
* See the NOTICE file(s) distributed with this work for additional
* information regarding copyright ownership.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
*/
import { Base64Encoder, BasicAuth, HttpBasicAuth } from '../../api/src/auth/basic-auth';
import { HttpBearerAuth, TokenSupplier } from '../../api/src/auth/bearer-auth';
/**
* Node implementation of base64 encoding.
*/
export declare class NodeBase64Encoder implements Base64Encoder {
encodeBase64(toEncode: string): string;
}
/**
* Node implementation of basic auth for HTTP connections.
*/
export declare class NodeHttpBasicAuth extends HttpBasicAuth {
private constructor();
/**
* Create basic authentication for HTTP connections.
* @param username - The username.
* @param password - the password.
*/
static newInstance(username: string, password: string): BasicAuth;
}
/**
* Node implementation of basic auth for WebSocket connections.
*/
export declare class NodeWebSocketBasicAuth extends HttpBasicAuth {
private constructor();
/**
* Create basic authentication for WebSocket connections.
* @param username - The username.
* @param password - the password.
*/
static newInstance(username: string, password: string): BasicAuth;
}
/**
* Node implementation of basic auth for HTTP connections
*/
export declare class NodeHttpBearerAuth extends HttpBearerAuth {
constructor(tokenSupplier: TokenSupplier);
/**
* Create bearer token AuthProvider for HTTP connections
* @param tokenSupplier Provides auth tokens to this AuthProvider when needed
*/
static newInstance(tokenSupplier: TokenSupplier): NodeHttpBearerAuth;
}
//# sourceMappingURL=node-auth.d.ts.map