Token Based Security: Angular Applications – Part 3

Introduction

In previous post of this series, we configured our Angular application as a client of IdnentityServer and completed the login/logout process.

However even though user was logged-in, the REST API calls were still not authorized:

In this post, we will authorize HTTP calls by passing bearer token as an Authorization Header.

Now, if you are new to token-based security or how we setup the Angular application, I will suggest to first go through few previous posts and then the topics in this post will much easier to follow. Let’s see how to get an Access Token, next.

Get Access Token

I’ve added following method to authService (we created this service in previous post) to get the access token:

Subscribe to continue reading

Subscribe to get access to the rest of this post and other subscriber-only content.