mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-09-17 14:21:29 +00:00
update api docs and clean dead code
This commit is contained in:
committed by
Anton Ramanovich
parent
31c2cb2162
commit
1f946ff69a
@@ -50,10 +50,6 @@ Provides authentication to ACS and APS.
|
||||
- **isALLProvider**(): `boolean`<br/>
|
||||
Does the provider support both ECM and BPM?
|
||||
- **Returns** `boolean` - True if both are supported, false otherwise
|
||||
- **isAuthCodeFlow**(): `boolean`<br/>
|
||||
|
||||
- **Returns** `boolean` -
|
||||
|
||||
- **isBPMProvider**(): `boolean`<br/>
|
||||
Does the provider support BPM?
|
||||
- **Returns** `boolean` - True if supported, false otherwise
|
||||
@@ -66,10 +62,6 @@ Provides authentication to ACS and APS.
|
||||
- **isEcmLoggedIn**(): `boolean`<br/>
|
||||
Checks if the user is logged in on an ECM provider.
|
||||
- **Returns** `boolean` - True if logged in, false otherwise
|
||||
- **isImplicitFlow**(): `boolean`<br/>
|
||||
|
||||
- **Returns** `boolean` -
|
||||
|
||||
- **isKerberosEnabled**(): `boolean`<br/>
|
||||
Does kerberos enabled?
|
||||
- **Returns** `boolean` - True if enabled, false otherwise
|
||||
|
@@ -317,14 +317,27 @@ export class BasicAlfrescoAuthService extends BaseAuthenticationService {
|
||||
return this.redirectUrl && (this.redirectUrl.provider === 'ALL' || provider === 'ALL');
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated use `getUsername()` instead
|
||||
* @returns the username of the authenticated user
|
||||
*/
|
||||
getBpmUsername(): string {
|
||||
return this.processAuth.getUsername();
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated use `getUsername()` instead
|
||||
* @returns the username of the authenticated user
|
||||
*/
|
||||
getEcmUsername(): string {
|
||||
return this.contentAuth.getUsername();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the username of the authenticated user.
|
||||
*
|
||||
* @returns the username of the authenticated user
|
||||
*/
|
||||
getUsername(): string {
|
||||
if (this.isBPMProvider()) {
|
||||
return this.processAuth.getUsername();
|
||||
|
@@ -82,16 +82,6 @@ export class OidcAuthenticationService extends BaseAuthenticationService {
|
||||
return this.oauthService.hasValidIdToken();
|
||||
}
|
||||
|
||||
isImplicitFlow() {
|
||||
const oauth2: OauthConfigModel = Object.assign({}, this.appConfig.get<OauthConfigModel>(AppConfigValues.OAUTHCONFIG, null));
|
||||
return !!oauth2?.implicitFlow;
|
||||
}
|
||||
|
||||
isAuthCodeFlow() {
|
||||
const oauth2: OauthConfigModel = Object.assign({}, this.appConfig.get<OauthConfigModel>(AppConfigValues.OAUTHCONFIG, null));
|
||||
return !!oauth2?.codeFlow;
|
||||
}
|
||||
|
||||
login(username: string, password: string): Observable<{ type: string; ticket: any }> {
|
||||
return this.auth.baseAuthLogin(username, password).pipe(
|
||||
map((response) => {
|
||||
@@ -125,12 +115,17 @@ export class OidcAuthenticationService extends BaseAuthenticationService {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the username of the authenticated user.
|
||||
*
|
||||
* @returns the logged username
|
||||
*/
|
||||
getUsername() {
|
||||
return this.jwtHelperService.getValueFromLocalToken<string>(JwtHelperService.USER_PREFERRED_USERNAME);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @deprecated use `getUsername` instead
|
||||
* @returns the logged username
|
||||
*/
|
||||
getEcmUsername(): string {
|
||||
@@ -138,7 +133,7 @@ export class OidcAuthenticationService extends BaseAuthenticationService {
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @deprecated use `getUsername` instead
|
||||
* @returns the logged username
|
||||
*/
|
||||
getBpmUsername(): string {
|
||||
@@ -149,10 +144,6 @@ export class OidcAuthenticationService extends BaseAuthenticationService {
|
||||
this.auth.login(redirectUrl);
|
||||
}
|
||||
|
||||
ssoCodeFlowLogin() {
|
||||
this.oauthService.initCodeFlow();
|
||||
}
|
||||
|
||||
isRememberMeSet(): boolean {
|
||||
return true;
|
||||
}
|
||||
|
@@ -149,6 +149,8 @@ export class AuthenticationService implements AuthenticationServiceInterface, ee
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the username of the authenticated user.
|
||||
*
|
||||
* @returns the username of the authenticated user
|
||||
*/
|
||||
getUsername(): string {
|
||||
@@ -160,7 +162,7 @@ export class AuthenticationService implements AuthenticationServiceInterface, ee
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @deprecated use `getUsername` instead
|
||||
* @returns the logged username
|
||||
*/
|
||||
getEcmUsername(): string {
|
||||
@@ -172,7 +174,7 @@ export class AuthenticationService implements AuthenticationServiceInterface, ee
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @deprecated use `getUsername` instead
|
||||
* @returns the logged username
|
||||
*/
|
||||
getBpmUsername(): string {
|
||||
|
@@ -40,21 +40,24 @@ export abstract class BaseAuthenticationService implements AuthenticationService
|
||||
}
|
||||
|
||||
abstract getAuthHeaders(requestUrl: string, header: HttpHeaders): HttpHeaders;
|
||||
|
||||
abstract getToken(): string;
|
||||
|
||||
abstract isLoggedIn(): boolean;
|
||||
|
||||
abstract logout(): any;
|
||||
|
||||
/** @deprecated use `isLoggedIn` instead */
|
||||
abstract isEcmLoggedIn(): boolean;
|
||||
|
||||
/** @deprecated use `isLoggedIn` instead */
|
||||
abstract isBpmLoggedIn(): boolean;
|
||||
|
||||
abstract reset(): void;
|
||||
|
||||
abstract getUsername(): string;
|
||||
|
||||
/** @deprecated use `getUsername` instead */
|
||||
abstract getEcmUsername(): string;
|
||||
|
||||
/** @deprecated use `getUsername` instead */
|
||||
abstract getBpmUsername(): string;
|
||||
|
||||
/**
|
||||
@@ -110,11 +113,6 @@ export abstract class BaseAuthenticationService implements AuthenticationService
|
||||
return provider && provider.toUpperCase() === 'ALL';
|
||||
}
|
||||
|
||||
isOauthConfiguration(): boolean {
|
||||
const authType = this.appConfig.get('authType') as string;
|
||||
return authType === 'OAUTH';
|
||||
}
|
||||
|
||||
/**
|
||||
* Prints an error message in the console browser
|
||||
*
|
||||
|
Reference in New Issue
Block a user