mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-26 17:24:56 +00:00
Fix ticket name
This commit is contained in:
parent
a638f3ee6f
commit
5a87734810
@ -212,7 +212,7 @@ describe('AlfrescoAuthentication', () => {
|
|||||||
localStorage.setItem('ticket-ECM', 'fake-post-ticket-ECM');
|
localStorage.setItem('ticket-ECM', 'fake-post-ticket-ECM');
|
||||||
service.createProviderInstance(providers);
|
service.createProviderInstance(providers);
|
||||||
spyOn(AlfrescoAuthenticationECM.prototype, 'callApiLogout').and.returnValue(fakePromiseECM);
|
spyOn(AlfrescoAuthenticationECM.prototype, 'callApiLogout').and.returnValue(fakePromiseECM);
|
||||||
service.performeSaveToken('ECM', 'fake-ticket-ECM');
|
service.performeSaveTicket('ECM', 'fake-ticket-ECM');
|
||||||
service.logout()
|
service.logout()
|
||||||
.subscribe(() => {
|
.subscribe(() => {
|
||||||
expect(service.isLoggedIn(providers[0])).toBe(false);
|
expect(service.isLoggedIn(providers[0])).toBe(false);
|
||||||
|
@ -82,7 +82,7 @@ export class AlfrescoAuthenticationService extends AlfrescoAuthenticationBase {
|
|||||||
Observable.forkJoin(observableBatch).subscribe(
|
Observable.forkJoin(observableBatch).subscribe(
|
||||||
(response: any[]) => {
|
(response: any[]) => {
|
||||||
response.forEach((res) => {
|
response.forEach((res) => {
|
||||||
this.performeSaveToken(res.type, res.ticket);
|
this.performeSaveTicket(res.type, res.ticket);
|
||||||
});
|
});
|
||||||
observer.next(response);
|
observer.next(response);
|
||||||
},
|
},
|
||||||
@ -125,7 +125,7 @@ export class AlfrescoAuthenticationService extends AlfrescoAuthenticationBase {
|
|||||||
* @param type - providerName
|
* @param type - providerName
|
||||||
* @param ticket
|
* @param ticket
|
||||||
*/
|
*/
|
||||||
private performeSaveToken(type: string, ticket: string) {
|
private performeSaveTicket(type: string, ticket: string) {
|
||||||
let auth: AbstractAuthentication = this.findProviderInstance(type);
|
let auth: AbstractAuthentication = this.findProviderInstance(type);
|
||||||
if (auth) {
|
if (auth) {
|
||||||
auth.saveTicket(ticket);
|
auth.saveTicket(ticket);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user