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/>
|
- **isALLProvider**(): `boolean`<br/>
|
||||||
Does the provider support both ECM and BPM?
|
Does the provider support both ECM and BPM?
|
||||||
- **Returns** `boolean` - True if both are supported, false otherwise
|
- **Returns** `boolean` - True if both are supported, false otherwise
|
||||||
- **isAuthCodeFlow**(): `boolean`<br/>
|
|
||||||
|
|
||||||
- **Returns** `boolean` -
|
|
||||||
|
|
||||||
- **isBPMProvider**(): `boolean`<br/>
|
- **isBPMProvider**(): `boolean`<br/>
|
||||||
Does the provider support BPM?
|
Does the provider support BPM?
|
||||||
- **Returns** `boolean` - True if supported, false otherwise
|
- **Returns** `boolean` - True if supported, false otherwise
|
||||||
@@ -66,10 +62,6 @@ Provides authentication to ACS and APS.
|
|||||||
- **isEcmLoggedIn**(): `boolean`<br/>
|
- **isEcmLoggedIn**(): `boolean`<br/>
|
||||||
Checks if the user is logged in on an ECM provider.
|
Checks if the user is logged in on an ECM provider.
|
||||||
- **Returns** `boolean` - True if logged in, false otherwise
|
- **Returns** `boolean` - True if logged in, false otherwise
|
||||||
- **isImplicitFlow**(): `boolean`<br/>
|
|
||||||
|
|
||||||
- **Returns** `boolean` -
|
|
||||||
|
|
||||||
- **isKerberosEnabled**(): `boolean`<br/>
|
- **isKerberosEnabled**(): `boolean`<br/>
|
||||||
Does kerberos enabled?
|
Does kerberos enabled?
|
||||||
- **Returns** `boolean` - True if enabled, false otherwise
|
- **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');
|
return this.redirectUrl && (this.redirectUrl.provider === 'ALL' || provider === 'ALL');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated use `getUsername()` instead
|
||||||
|
* @returns the username of the authenticated user
|
||||||
|
*/
|
||||||
getBpmUsername(): string {
|
getBpmUsername(): string {
|
||||||
return this.processAuth.getUsername();
|
return this.processAuth.getUsername();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated use `getUsername()` instead
|
||||||
|
* @returns the username of the authenticated user
|
||||||
|
*/
|
||||||
getEcmUsername(): string {
|
getEcmUsername(): string {
|
||||||
return this.contentAuth.getUsername();
|
return this.contentAuth.getUsername();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the username of the authenticated user.
|
||||||
|
*
|
||||||
|
* @returns the username of the authenticated user
|
||||||
|
*/
|
||||||
getUsername(): string {
|
getUsername(): string {
|
||||||
if (this.isBPMProvider()) {
|
if (this.isBPMProvider()) {
|
||||||
return this.processAuth.getUsername();
|
return this.processAuth.getUsername();
|
||||||
|
@@ -82,16 +82,6 @@ export class OidcAuthenticationService extends BaseAuthenticationService {
|
|||||||
return this.oauthService.hasValidIdToken();
|
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 }> {
|
login(username: string, password: string): Observable<{ type: string; ticket: any }> {
|
||||||
return this.auth.baseAuthLogin(username, password).pipe(
|
return this.auth.baseAuthLogin(username, password).pipe(
|
||||||
map((response) => {
|
map((response) => {
|
||||||
@@ -125,12 +115,17 @@ export class OidcAuthenticationService extends BaseAuthenticationService {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the username of the authenticated user.
|
||||||
|
*
|
||||||
|
* @returns the logged username
|
||||||
|
*/
|
||||||
getUsername() {
|
getUsername() {
|
||||||
return this.jwtHelperService.getValueFromLocalToken<string>(JwtHelperService.USER_PREFERRED_USERNAME);
|
return this.jwtHelperService.getValueFromLocalToken<string>(JwtHelperService.USER_PREFERRED_USERNAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @deprecated
|
* @deprecated use `getUsername` instead
|
||||||
* @returns the logged username
|
* @returns the logged username
|
||||||
*/
|
*/
|
||||||
getEcmUsername(): string {
|
getEcmUsername(): string {
|
||||||
@@ -138,7 +133,7 @@ export class OidcAuthenticationService extends BaseAuthenticationService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @deprecated
|
* @deprecated use `getUsername` instead
|
||||||
* @returns the logged username
|
* @returns the logged username
|
||||||
*/
|
*/
|
||||||
getBpmUsername(): string {
|
getBpmUsername(): string {
|
||||||
@@ -149,10 +144,6 @@ export class OidcAuthenticationService extends BaseAuthenticationService {
|
|||||||
this.auth.login(redirectUrl);
|
this.auth.login(redirectUrl);
|
||||||
}
|
}
|
||||||
|
|
||||||
ssoCodeFlowLogin() {
|
|
||||||
this.oauthService.initCodeFlow();
|
|
||||||
}
|
|
||||||
|
|
||||||
isRememberMeSet(): boolean {
|
isRememberMeSet(): boolean {
|
||||||
return true;
|
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
|
* @returns the username of the authenticated user
|
||||||
*/
|
*/
|
||||||
getUsername(): string {
|
getUsername(): string {
|
||||||
@@ -160,7 +162,7 @@ export class AuthenticationService implements AuthenticationServiceInterface, ee
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @deprecated
|
* @deprecated use `getUsername` instead
|
||||||
* @returns the logged username
|
* @returns the logged username
|
||||||
*/
|
*/
|
||||||
getEcmUsername(): string {
|
getEcmUsername(): string {
|
||||||
@@ -172,7 +174,7 @@ export class AuthenticationService implements AuthenticationServiceInterface, ee
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @deprecated
|
* @deprecated use `getUsername` instead
|
||||||
* @returns the logged username
|
* @returns the logged username
|
||||||
*/
|
*/
|
||||||
getBpmUsername(): string {
|
getBpmUsername(): string {
|
||||||
|
@@ -40,21 +40,24 @@ export abstract class BaseAuthenticationService implements AuthenticationService
|
|||||||
}
|
}
|
||||||
|
|
||||||
abstract getAuthHeaders(requestUrl: string, header: HttpHeaders): HttpHeaders;
|
abstract getAuthHeaders(requestUrl: string, header: HttpHeaders): HttpHeaders;
|
||||||
|
|
||||||
abstract getToken(): string;
|
abstract getToken(): string;
|
||||||
|
|
||||||
abstract isLoggedIn(): boolean;
|
abstract isLoggedIn(): boolean;
|
||||||
|
|
||||||
abstract logout(): any;
|
abstract logout(): any;
|
||||||
|
|
||||||
|
/** @deprecated use `isLoggedIn` instead */
|
||||||
abstract isEcmLoggedIn(): boolean;
|
abstract isEcmLoggedIn(): boolean;
|
||||||
|
|
||||||
|
/** @deprecated use `isLoggedIn` instead */
|
||||||
abstract isBpmLoggedIn(): boolean;
|
abstract isBpmLoggedIn(): boolean;
|
||||||
|
|
||||||
abstract reset(): void;
|
abstract reset(): void;
|
||||||
|
|
||||||
|
abstract getUsername(): string;
|
||||||
|
|
||||||
|
/** @deprecated use `getUsername` instead */
|
||||||
abstract getEcmUsername(): string;
|
abstract getEcmUsername(): string;
|
||||||
|
|
||||||
|
/** @deprecated use `getUsername` instead */
|
||||||
abstract getBpmUsername(): string;
|
abstract getBpmUsername(): string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -110,11 +113,6 @@ export abstract class BaseAuthenticationService implements AuthenticationService
|
|||||||
return provider && provider.toUpperCase() === 'ALL';
|
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
|
* Prints an error message in the console browser
|
||||||
*
|
*
|
||||||
|
Reference in New Issue
Block a user