OAuth2-based security is enabled in the backend API now. Angular can be modified to include code to generate and retrieve an access_token, use it to access protected resource endpoints. For this particular reason, an AuthService like the following one is used:
import {Injectable} from '@angular/core';import {Router} from '@angular/router';import { Cookie } from 'ng2-cookies';import { Http, Response, Headers, RequestOptions } from '@angular/http';import { Observable } from 'rxjs/Observable';import 'rxjs/add/operator/catch';import 'rxjs/add/operator/map';@Injectable()export class AuthService { constructor( private router: Router, private http: Http){} getAndSaveAccessToken(loginData){ ...