Add implicit woody context (#4)

This commit is contained in:
Anton Belyaev 2018-07-06 18:11:59 +03:00 committed by GitHub
parent 623197fba5
commit c79954c062
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View File

@ -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).

View File

@ -34,7 +34,7 @@
identity_classes => #{
<<"person">> => #{
name => <<"Person">>,
contact_template_id => 10000,
contract_template_id => 10000,
initial_level => <<"anonymous">>,
levels => #{
<<"anonymous">> => #{