@c8y/client
Version:
Client application programming interface to access the Cumulocity IoT-Platform REST services.
33 lines • 1.21 kB
TypeScript
import { IAuthentication, IMicroserviceClientRequestHeaders } from './IAuthentication.js';
import { IFetchOptions } from './IFetchOptions.js';
/**
* Allows to use either Cookie-Auth or Basic-Auth
* of a microservice client request header
* for Authorization to the Cumulocity API.
*/
export declare class MicroserviceClientRequestAuth implements IAuthentication {
protected authTokenFromCookie: string | undefined;
protected authTokenFromHeader: string | undefined;
protected xsrfToken: string | undefined;
/**
* Authenticates using the credentials which were
* provided within the request headers of the
* client call to the microservice.
* @param headers
*/
constructor(headers?: IMicroserviceClientRequestHeaders);
updateCredentials(): string;
getFetchOptions(options: IFetchOptions): IFetchOptions;
getCometdHandshake(config?: {
ext?: {
[key: string]: any;
};
}): {
ext?: {
[key: string]: any;
};
};
logout(): void;
protected getCookieValue(headers: IMicroserviceClientRequestHeaders, name: string): string;
}
//# sourceMappingURL=MicroserviceClientRequestAuth.d.ts.map