mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2026-05-02 00:07:23 +08:00
refactor(lib): run prettier
This commit is contained in:
@@ -91,21 +91,14 @@ export interface UserInfo {
|
||||
plugin: 'cordova-plugin-ms-adal',
|
||||
pluginRef: 'Microsoft.ADAL',
|
||||
repo: 'https://github.com/AzureAD/azure-activedirectory-library-for-cordova',
|
||||
platforms: ['Android', 'iOS', 'Windows']
|
||||
platforms: ['Android', 'iOS', 'Windows'],
|
||||
})
|
||||
@Injectable()
|
||||
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,
|
||||
validateAuthority
|
||||
);
|
||||
if (checkAvailability(MSAdal.getPluginRef(), null, MSAdal.getPluginName()) === true) {
|
||||
authContext = new (MSAdal.getPlugin().AuthenticationContext)(authority, validateAuthority);
|
||||
}
|
||||
return new AuthenticationContext(authContext);
|
||||
}
|
||||
@@ -115,7 +108,6 @@ export class MSAdal extends IonicNativePlugin {
|
||||
* @hidden
|
||||
*/
|
||||
export class AuthenticationContext {
|
||||
|
||||
@InstanceProperty()
|
||||
authority: string;
|
||||
|
||||
@@ -125,8 +117,7 @@ export class AuthenticationContext {
|
||||
@InstanceProperty()
|
||||
tokenCache: any;
|
||||
|
||||
constructor(private _objectInstance: any) {
|
||||
}
|
||||
constructor(private _objectInstance: any) {}
|
||||
|
||||
/**
|
||||
* Acquires token using interactive flow. It always shows UI and skips token from cache.
|
||||
@@ -142,9 +133,16 @@ export class AuthenticationContext {
|
||||
* @returns {Promise} Promise either fulfilled with AuthenticationResult object or rejected with error
|
||||
*/
|
||||
@CordovaInstance({
|
||||
otherPromise: true
|
||||
otherPromise: true,
|
||||
})
|
||||
acquireTokenAsync(resourceUrl: string, clientId: string, redirectUrl: string, userId?: string, extraQueryParameters?: any, claims?: string): Promise<AuthenticationResult> {
|
||||
acquireTokenAsync(
|
||||
resourceUrl: string,
|
||||
clientId: string,
|
||||
redirectUrl: string,
|
||||
userId?: string,
|
||||
extraQueryParameters?: any,
|
||||
claims?: string
|
||||
): Promise<AuthenticationResult> {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -159,12 +157,11 @@ export class AuthenticationContext {
|
||||
* @returns {Promise} Promise either fulfilled with AuthenticationResult object or rejected with error
|
||||
*/
|
||||
@CordovaInstance({
|
||||
otherPromise: true
|
||||
otherPromise: true,
|
||||
})
|
||||
acquireTokenSilentAsync(resourceUrl: string, clientId: string, userId?: string): Promise<AuthenticationResult> {
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export class AuthenticationSettings {
|
||||
@@ -177,7 +174,7 @@ export class AuthenticationSettings {
|
||||
* @returns {Promise} Promise either fulfilled or rejected with error
|
||||
*/
|
||||
@CordovaInstance({
|
||||
otherPromise: true
|
||||
otherPromise: true,
|
||||
})
|
||||
static setUseBroker(useBroker: boolean): Promise<void> {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user