Chapter 8Securing with Authentication and Authorization

With some basic functionality squared away and Absinthe tools ready at hand, we’re all set to take the API live. When any API goes live, even internally within an organization, there is generally a need to secure portions of the API behind authentication and authorization checks.

In this chapter, we’ll cover how to add these checks to an Absinthe schema, continuing to build on the restaurant ordering system, PlateSlate. Along the way, you’ll discover how to tailor mechanisms that you’re probably already familiar with, like token-based authentication, to work within the greater flexibility of a GraphQL API.

Let’s start by giving our hungry restaurant customers access to our system ...

Get Craft GraphQL APIs in Elixir with Absinthe now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.