mirror of
https://github.com/valitydev/wapi-lib.git
synced 2024-11-07 10:38:52 +00:00
Add implicit woody context (#4)
This commit is contained in:
parent
623197fba5
commit
c79954c062
@ -82,7 +82,10 @@ create_woody_context(#{'X-Request-ID' := RequestID}, AuthContext, Opts) ->
|
||||
RpcID = #{trace_id := TraceID} = woody_context:new_rpc_id(genlib:to_binary(RequestID)),
|
||||
ok = scoper:add_meta(#{request_id => RequestID, trace_id => TraceID}),
|
||||
_ = lager:debug("Created TraceID for the request"),
|
||||
woody_user_identity:put(collect_user_identity(AuthContext, Opts), woody_context:new(RpcID)).
|
||||
Ctx = woody_user_identity:put(collect_user_identity(AuthContext, Opts), woody_context:new(RpcID)),
|
||||
%% TODO remove this fistful specific step, when separating the wapi service.
|
||||
ok = ff_woody_ctx:set(Ctx),
|
||||
Ctx.
|
||||
|
||||
-define(APP, wapi).
|
||||
|
||||
|
@ -34,7 +34,7 @@
|
||||
identity_classes => #{
|
||||
<<"person">> => #{
|
||||
name => <<"Person">>,
|
||||
contact_template_id => 10000,
|
||||
contract_template_id => 10000,
|
||||
initial_level => <<"anonymous">>,
|
||||
levels => #{
|
||||
<<"anonymous">> => #{
|
||||
|
Loading…
Reference in New Issue
Block a user