Provides authentication to ACS and APS.
addTokenToHeader(headersArg?: HttpHeaders): Observable<HttpHeaders>
Adds the auth token to an HTTP header using the 'bearer' scheme.
HttpHeaders - (Optional) Header that will receive the tokenObservable<HttpHeaders> - The new header with the token addedgetBearerExcludedUrls()
Gets the set of URLs that the token bearer is excluded from.
getBpmLoggedUser(): Observable<UserRepresentation>
Gets information about the user currently logged into APS.
Observable<UserRepresentation> - User informationgetBpmUsername(): string
Gets the BPM username
string - The BPM usernamegetEcmUsername(): string
Gets the ECM username.
string - The ECM usernamegetRedirect(): string
Gets the URL to redirect to after login.
string - The redirect URLgetTicketBpm(): string|null
Gets the BPM ticket stored in the Storage.
string|null - The ticket or null if none was foundgetTicketEcm(): string|null
Gets the ECM ticket stored in the Storage.
string|null - The ticket or null if none was foundgetTicketEcmBase64(): string|null
Gets the BPM ticket from the Storage in Base 64 format.
string|null - The ticket or null if none was foundgetToken(): string
Gets the auth token.
string - Auth token stringhandleError(error: any): Observable<any>
Prints an error message in the console browser
any - Error messageObservable<any> - Object representing the error messageisALLProvider(): boolean
Does the provider support both ECM and BPM?
boolean - True if both are supported, false otherwiseisAuthCodeFlow(): boolean
boolean - isBPMProvider(): boolean
Does the provider support BPM?
boolean - True if supported, false otherwiseisBpmLoggedIn(): boolean
Checks if the user is logged in on a BPM provider.
boolean - True if logged in, false otherwiseisECMProvider(): boolean
Does the provider support ECM?
boolean - True if supported, false otherwiseisEcmLoggedIn(): boolean
Checks if the user is logged in on an ECM provider.
boolean - True if logged in, false otherwiseisImplicitFlow(): boolean
boolean - isKerberosEnabled(): boolean
Does kerberos enabled?
boolean - True if enabled, false otherwiseisLoggedIn(): boolean
Checks if the user logged in.
boolean - True if logged in, false otherwiseisLoggedInWith(provider: string): boolean
string - boolean - isOauth(): boolean
Does the provider support OAuth?
boolean - True if supported, false otherwiseisPublicUrl(): boolean
boolean - isRememberMeSet(): boolean
Checks whether the "remember me" cookie was set or not.
boolean - True if set, false otherwiselogin(username: string, password: string, rememberMe: boolean = false): Observable<Function>
Logs the user in.
string - Username for the loginstring - Password for the loginboolean - Stores the user's login details if trueObservable<Function> - Object with auth type ("ECM", "BPM" or "ALL") and auth ticketlogout(): Observable<any>
Logs the user out.
Observable<any> - Response event called when logout is completereset()
saveRememberMeCookie(rememberMe: boolean)
Saves the "remember me" cookie as either a long-life cookie or a session cookie.
boolean - Enables a long-life cookiesetRedirect(url?: RedirectionModel)
Sets the URL to redirect to after login.
RedirectionModel - (Optional) URL to redirect tossoImplicitLogin()
Logs the user in with SSO
import { AuthenticationService } from '@alfresco/adf-core';
@Component({...})
class AppComponent {
constructor(authService: AuthenticationService) {
this.AuthenticationService.login('admin', 'admin').subscribe(
token => {
console.log(token);
},
error => {
console.log(error);
}
);
}
}
© 2023 Alfresco Software, Inc. All Rights Reserved.
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.