@ctodev/cclibrary-typings
Version:
Library typings for use with CLARC INFINITY
36 lines (35 loc) • 1.1 kB
TypeScript
/**
* WebAuthn Angular service for use with node 'webauthn' package
*
* Author: Jamie Perkins
* License: MIT
*/
import { HttpClient } from '@angular/common/http';
import { Observable } from 'rxjs';
import { User, StatusResponse } from '../../models/authn.model';
import { TccAuthNSettings } from './tccauthnsettings.token';
export declare class TccAuthNService {
private http;
private authnsettings;
constructor(http: HttpClient, authnsettings: TccAuthNSettings);
registerUser(user: User): Observable<StatusResponse>;
loginUser(user: User): Observable<StatusResponse>;
authCheck(): Observable<boolean>;
logout(): Observable<StatusResponse>;
isSupported(): boolean;
private sendWebauthnResponse;
private post;
private handleError;
/**
* Converts PublicKeyCredential into serialised JSON
*/
private publicKeyCredentialToJSON;
/**
* Decodes array buffers in make credential request
*/
private preformatMakeCredReq;
/**
* Decodes array buffer in get assertion request
*/
private preformatGetAssertReq;
}