mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
[ADF-3745] Updates for doc review (#3989)
This commit is contained in:
committed by
Eugenio Romano
parent
6e8677a768
commit
383b74151a
@@ -24,11 +24,11 @@ import { AuthenticationService } from '../services/authentication.service';
|
||||
})
|
||||
export class LogoutDirective implements OnInit {
|
||||
|
||||
/** Uri to be redirect after the logout default value login */
|
||||
/** URI to redirect to after logging out. */
|
||||
@Input()
|
||||
redirectUri: string = '/login';
|
||||
|
||||
/** Enable redirect after logout */
|
||||
/** Enable redirecting after logout */
|
||||
@Input()
|
||||
enableRedirect: boolean = true;
|
||||
|
||||
|
@@ -277,14 +277,27 @@ export class AuthenticationService {
|
||||
return throwError(error || 'Server error');
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the set of URLs that the token bearer is excluded from.
|
||||
* @returns Array of URL strings
|
||||
*/
|
||||
getBearerExcludedUrls(): string[] {
|
||||
return this.bearerExcludedUrls;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the auth token.
|
||||
* @returns Auth token string
|
||||
*/
|
||||
getToken(): string {
|
||||
return localStorage.getItem('access_token');
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds the auth token to an HTTP header using the 'bearer' scheme.
|
||||
* @param headersArg Header that will receive the token
|
||||
* @returns The new header with the token added
|
||||
*/
|
||||
addTokenToHeader(headersArg?: HttpHeaders): Observable<HttpHeaders> {
|
||||
return new Observable((observer: Observer<any>) => {
|
||||
let headers = headersArg;
|
||||
|
Reference in New Issue
Block a user