I have a login component and a simple method:
login(event) {       
    event.preventDefault();
    this.authService.login(this.user);       
}
This is my AuthService:
export class AuthService {
    constructor(private jsonApiService:JsonApiService) {
    }
    isLoggedIn: boolean = false;
    login(user:User): any {
        this.jsonApiService.post('/token', user)
            .subscribe(
                resp => {
                   check if success,
                   store token to localstorage,
                   set isLoggedIn = true
                   * return new object with data about success/error
                },
                err => {    
                    handle error
                    * return new object with data about success/error
                });
    }
    logout(): void {
        this.isLoggedIn = false;
    }
}
This code works fine. I get response, but I am wondering how to return some data from service to component. I don't want to move subscribe to component, because, I believe, handling must be in the AuthService.
AuthService, and then ask for the data via a get-method that your component can call. You can also make that method as an Observable, making your component subscribe on it. This will letAuthServicefinish before the component receives the data.