January 2018
Intermediate to advanced
336 pages
7h 56m
English
The next step is to define APIs for the Auth service to authenticate and authorize users. Add the /tokens and /tokens/validate routes to the helping-hands.auth.service namespace, as follows:
(ns helping-hands.auth.service (:require [helping-hands.auth.core :as core] [cheshire.core :as jp] [io.pedestal.http :as http] [io.pedestal.http.route :as route] [io.pedestal.http.body-params :as body-params] [io.pedestal.interceptor.chain :as chain] [ring.util.response :as ring-resp]));; Defines "/" and "/about" routes with their associated :get handlers.;; The interceptors defined after the verb map (e.g., {:get home-page};; apply to / and its children (/about).(def common-interceptors [(body-params/body-params) http/html-body]) ...Read now
Unlock full access