Ability to check if loggedIn based on provider (#5598)

* Provide a way to check if loggedIn based on provider

* Fix the comments

* Add schema validation for provider
This commit is contained in:
Maurizio Vitale
2020-04-08 16:43:36 +01:00
committed by GitHub
parent e55d3e53bb
commit 83e362d31a
4 changed files with 26 additions and 0 deletions

View File

@@ -61,6 +61,16 @@ export class AuthenticationService {
return this.alfrescoApi.getInstance().isLoggedIn();
}
isLoggedInWith(provider: string): boolean {
if (provider === 'BPM') {
return this.isBpmLoggedIn();
} else if (provider === 'ECM') {
return this.isEcmLoggedIn();
} else {
return this.isLoggedIn();
}
}
/**
* Does the provider support OAuth?
* @returns True if supported, false otherwise