Articles tagged in: Futureflix



learn hapi — JWT Authentication in Swagger API Documentation

In the previous tutorial, you implemented JWT authentication and required the related jwt strategy on API endpoints. This change affects your Swagger API documentation because users can’t simply run requests against the endpoints from within the Swagger UI anymore. In this tutorial, you’ll configure Swagger to support API …

Continue Reading

learn hapi — JWT Authentication and Private API Endpoints

The previous tutorial laid the foundation for API authentication with username and password. You created a dedicated API authentication plugin which registers login route to authenticate with username and password to the hapi API server. A successful login generated an API authentication token which should be used for API requests. …

Continue Reading

learn hapi — API Login With Username and Password to Generate a JWT

Building an API usually involves user accounts and personal data. Users should see their personalized dashboard or newsfeed. This requires API endpoints that identify the requesting user. The most straightforward approach: API endpoints that require authentication. The login with username and password is the first part of API authentication. The …

Continue Reading

learn hapi — Describe Endpoint Details in Your Swagger API Documentation

Your Swagger API documentation becomes a beneficial place for developers. The integrated Swagger UI allows anyone to send sample requests against your endpoints. It’s a good way to see the actual response format and data of endpoints. Swagger allows you to add detailed documentation for responses. Define the format …

Continue Reading

learn hapi — Customize Your Swagger API Documentation URL

Your initial API documentation for Futureflix uses hapi-swagger to generate an endpoint overview from your project configuration. By default, hapi-swagger registers the /documentation route. If you want another path, like /docs, you can customize it. You’ll do that in a minute 😉 Besides the API documentation URL, you can tell …

Continue Reading

Explore the Library

Find interesting tutorials and solutions for your problems.