Special offers now — see discounted courses.
day
:
hour
:
min
:
sec
See special offers
Angular: API Communication and Authentication

Angular: API Communication and Authentication

1h 41mIntermediate2017-07-13

Authors

Victor Mejia

Victor Mejia

Senior UI Engineer and Instructor

Course details

APIs are at the heart of enterprise development, and Angular ships with robust services to communicate with them via HTTP. But one of the best ways to implement authentication of API services is using JWTs (JSON web tokens). In this course, we take a deep dive into using the provided $http service in Angular to create a robust and reusable API service implementing JWT authentication. Instructor Victor Mejia also covers how to use an Angular router to protect client-side routes and unit test services, HTTP requests, and async actions. All these concepts are demonstrated using a realistic contact management application, so you can see how API calls and user authentication are implemented in a real-world Angular app.

Learning objectives
Setting up and seeding your database
Using HTTP requests and routing in Angular
Creating an Angular service
Adding JWT authentication
Implementing a user login
Sending JWTs to API requests

Skills covered

AngularAPIsFront-End Web DevelopmentWeb DevelopmentOpen SourceSoftware DevelopmentDeep Dive (X:Y)

Concepts

0. Introduction

  • 01 - Welcome
  • 02 - What you should know
  • 03 - Using exercise files

1. Getting Started

  • 04 - Overview of the Angular CLI
  • 05 - Architecture of an Angular + Node application
  • 06 - Database setup using mLab
  • 07 - Seeding a database

2. HTTP in Angular

  • 08 - GET route for the API
  • 09 - POST route for the API
  • 10 - Using @angular http to retrieve contacts, part 1
  • 11 - Using @angular http to retrieve contacts, part 2
  • 12 - Creating a new route for adding a new contact
  • 13 - Using ngForm for form submission
  • 14 - Writing the onSubmit() function

3. Creating an Angular Service for API Communication

  • 15 - API service with a central request function
  • 16 - Wrapper functions for GET, POST, PUT, and DELETE
  • 17 - Refactoring HTTP calls to use the API service
  • 18 - Central error catching

4. Adding JWT Authentication to the Node Express API

  • 19 - JWT (JSON Web Token) overview
  • 20 - Using Express Router
  • 21 - User login and generating JWTs
  • 22 - Authenticating requests and validating JWTs

5. UI Communication with the API and Authentication

  • 23 - Auth service for local JWT management
  • 24 - Implementing a user login
  • 25 - Sending JWTs to API requests
  • 26 - Logging out of the application
  • 27 - Preventing route access without authentication

Conclusion

  • 28 - Next steps

About us

LyndaKade is a leading learning platform that helps people learn business, software, technology, and creative skills to achieve personal and professional goals.

Phone numberAparat ChannelTelegram SupportTelegram ChannelInstagram Page

All rights to this site belong to LyndaKade.

Terms of Service|Privacy Policy

نماد الکترونیک enamad در صورت اتصال با آی‌پی داخل کشور، نمایش داده خواهد شد.
logo-samandehi - لوگو ساماندهی
Zarinpal
Zibal