mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2026-05-02 00:07:23 +08:00
Merge branch 'master' into v5
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
import { checkAvailability, CordovaInstance, InstanceProperty, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { checkAvailability, CordovaInstance, InstanceProperty, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
|
||||
export interface AuthenticationResult {
|
||||
|
||||
accessToken: string;
|
||||
accesSTokenType: string;
|
||||
expiresOn: Date;
|
||||
@@ -18,7 +18,6 @@ export interface AuthenticationResult {
|
||||
* @returns {String} The authorization header.
|
||||
*/
|
||||
createAuthorizationHeader(): string;
|
||||
|
||||
}
|
||||
|
||||
export interface TokenCache {
|
||||
@@ -52,7 +51,6 @@ export interface UserInfo {
|
||||
uniqueId: string;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @name MS ADAL
|
||||
* @description
|
||||
@@ -101,12 +99,17 @@ export class MSAdal extends IonicNativePlugin {
|
||||
|
||||
createAuthenticationContext(authority: string, validateAuthority = true) {
|
||||
let authContext: any;
|
||||
if (checkAvailability(MSAdal.getPluginRef(), null, MSAdal.getPluginName()) === true) {
|
||||
authContext = new (MSAdal.getPlugin()).AuthenticationContext(authority);
|
||||
if (
|
||||
checkAvailability(MSAdal.getPluginRef(), null, MSAdal.getPluginName()) ===
|
||||
true
|
||||
) {
|
||||
authContext = new (MSAdal.getPlugin()).AuthenticationContext(
|
||||
authority,
|
||||
validateAuthority
|
||||
);
|
||||
}
|
||||
return new AuthenticationContext(authContext);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user