NetanelBasal
7/22/2018 - 7:39 AM

a-4.ts

export class SessionService {
	
   constructor(private authStore: SessionStore, 
	       private authDataService: SessionDataService) { }

   login(creds) {
      return this.authDataService.login(creds).pipe(
	tap(session => this.authStore.login(session))
      );
   }

   logout() {
      this.authStore.logout();
   }
}