Challenge: Securing APIs
Explore how to secure APIs by defining machine-to-machine identities in Auth0, implementing OAuth and JWT for access control, and updating Node.js projects with middleware. This lesson guides you through generating and validating JWT tokens and testing secured API endpoints to ensure robust API security.
Exercise
For this exercise, you’ll define an M2M identity in Auth0 for your credit-check service and then update your code to support access control using OAuth and JWTs. Along the way, you’ll use the security bash scripts to request a valid JWT and then use it to make secured requests of your updated credit-check service.
Defining the API in Auth0 and collecting access control parameters
- First, sign into the Auth0 website and define or create a new API called
bigco-credit-check. Then collect the five important access control parameters