mirror of
https://github.com/valitydev/capi-v2.git
synced 2024-11-06 01:55:20 +00:00
Epic: Organizations (#28)
* TD-502: Enable usage of user_id and party_id from token (#26) * TD-502: Enable usage of user_id and party_id from token * Fix tests * TD-642: debug auth by key * TD-642: fix typo * debug off --------- Co-authored-by: ndiezel0 <ndiezel0@gmail.com> Co-authored-by: Артем <WWW_cool@inbox.ru> Co-authored-by: anatoliy.losev <losto@nix>
This commit is contained in:
parent
d7a05735d1
commit
d9db173e23
@ -111,15 +111,11 @@ get_subject_id(Context) ->
|
||||
|
||||
-spec get_user_id(processing_context()) -> binary().
|
||||
get_user_id(Context) ->
|
||||
%% TODO Replace when user ids finally stop being equal to party ids
|
||||
%% capi_auth:get_user_id(get_auth_context(Context)).
|
||||
get_subject_id(Context).
|
||||
capi_auth:get_user_id(get_auth_context(Context)).
|
||||
|
||||
-spec get_party_id(processing_context()) -> binary().
|
||||
get_party_id(Context) ->
|
||||
%% TODO Replace when user ids finally stop being equal to party ids
|
||||
%% capi_auth:get_party_id(get_auth_context(Context)).
|
||||
get_subject_id(Context).
|
||||
capi_auth:get_party_id(get_auth_context(Context)).
|
||||
|
||||
%% Utils
|
||||
|
||||
|
@ -173,13 +173,15 @@ combine_metadata(#{} = FullMetadata) ->
|
||||
|
||||
user_session_metadata() ->
|
||||
genlib_map:compact(#{
|
||||
?TK_META_PARTY_ID => ?PARTY_ID,
|
||||
?TK_META_USER_ID => ?USER_ID,
|
||||
?TK_META_USER_EMAIL => ?USER_EMAIL
|
||||
}).
|
||||
|
||||
api_key_metadata() ->
|
||||
genlib_map:compact(#{
|
||||
?TK_META_PARTY_ID => ?PARTY_ID
|
||||
?TK_META_PARTY_ID => ?PARTY_ID,
|
||||
?TK_META_USER_ID => ?USER_ID
|
||||
}).
|
||||
|
||||
consumer_metadata(Consumer) ->
|
||||
|
Loading…
Reference in New Issue
Block a user