ngx-pesapal
Version:
Angular schematics lib for abstracting Pesapal APIs
21 lines (20 loc) • 927 B
TypeScript
import { Observable } from 'rxjs';
import { IKeys, ITokenResponse } from '../types';
import * as i0 from "@angular/core";
export declare class TokenService {
private credentials;
private store;
private http;
constructor(credentials: IKeys);
/**
* Initiates the process to authenticate keys by requesting an authentication token.
* It sends a POST request to the server to obtain an authentication token based on provided consumer key and secret.
* Upon successful authentication, the received token is stored in session storage and in the authenticationResponseBs BehaviorSubject for further usage.
*
* @returns An Observable containing the received authentication token as ITokenResponse
* @private
*/
AuthenticateKeys(): Observable<ITokenResponse>;
static ɵfac: i0.ɵɵFactoryDeclaration<TokenService, never>;
static ɵprov: i0.ɵɵInjectableDeclaration<TokenService>;
}