UNPKG

@codesmith-99/ionic-appauth-test

Version:

Intergration for OpenId/AppAuth-JS into Ionic V3/4/5

21 lines (20 loc) 729 B
import { __awaiter } from "tslib"; export class IonicUserInfoHandler { constructor(requestor) { this.requestor = requestor; } performUserInfoRequest(configuration, token) { return __awaiter(this, void 0, void 0, function* () { let settings = { url: configuration.userInfoEndpoint, dataType: 'json', method: 'GET', headers: { "Authorization": `${(token.tokenType == 'bearer') ? 'Bearer' : token.tokenType} ${token.accessToken}`, "Content-Type": "application/json" } }; return this.requestor.xhr(settings); }); } }