(ns dummy-auth.routes (:require [reitit.ring :as rring] [ring.middleware.params :as rmparams] [ring.middleware.json :as rmjson] [dummy-auth.error :as derror] [dummy-auth.oauth2.auth :as do2auth] [dummy-auth.oauth2.token :as do2token] [dummy-auth.oidc.userinfo :as doidcuserinfo])) (def routes [["/oauth2" ["/authorize" {:get {:handler do2auth/handle}}] ["/token" {:post {:handler do2token/handle}}]] ["/oidc" ["/userinfo" {:get {:handler doidcuserinfo/handle} :post {:handler doidcuserinfo/handle}}]] ["/error" {:get {:handler derror/handle}}]]) (def ring-handler (-> routes rring/router rring/ring-handler rmjson/wrap-json-response rmparams/wrap-params))