custom_req_fields_h.erl 291 B

12345678910
  1. %% This module adds custom fields to the Req object.
  2. %% It is only meant to be checked by Dialyzer.
  3. -module(custom_req_fields_h).
  4. -export([init/2]).
  5. -spec init(Req, Opts) -> {ok, Req, Opts} when Req::cowboy_req:req().
  6. init(Req, Opts) ->
  7. {ok, Req#{'_myapp_auth_method' => pubkey}, Opts}.