summaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
authorUlf Wiger <ulf@feuerlabs.com>2016-01-08 06:24:45 -0800
committerUlf Wiger <ulf@feuerlabs.com>2016-01-08 06:24:45 -0800
commitd99ab04baa8e2e72ba18c9fd2a32dcef5b9385dd (patch)
treecea906f0e5621df6624d6bd2f2a100c4636b9fbb /components
parent986dc5b0b94deb0bfd6fc4f8324835375fde7a04 (diff)
downloadrvi_core-d99ab04baa8e2e72ba18c9fd2a32dcef5b9385dd.tar.gz
add debug support for creds_by_conn
Diffstat (limited to 'components')
-rw-r--r--components/authorize/src/authorize_keys.erl2
1 files changed, 2 insertions, 0 deletions
diff --git a/components/authorize/src/authorize_keys.erl b/components/authorize/src/authorize_keys.erl
index 86ab2c6..e17675b 100644
--- a/components/authorize/src/authorize_keys.erl
+++ b/components/authorize/src/authorize_keys.erl
@@ -172,6 +172,7 @@ init([]) ->
Creds = scan_creds(CredDir, ProvisioningKey, DevCert),
?debug("scan_creds found ~p credentials~n", [length(Creds)]),
[ets:insert(?CREDS, {{local, C#cred.id}, C}) || C <- Creds],
+ ?debug("CREDS = ~p", [ets:tab2list(?CREDS)]),
{ok, #st{provisioning_key = ProvisioningKey,
dev_cert = DevCert,
cred_dir = CredDir}}.
@@ -244,6 +245,7 @@ code_change(_FromVsn, S, _Extra) ->
creds_by_conn(Conn) ->
?debug("creds_by_conn(~p)~n", [Conn]),
UTC = rvi_common:utc_timestamp(),
+ ?debug("all creds = ~p", [ets:tab2list(?CREDS)]),
Creds = ets:select(?CREDS, [{ {{Conn,'_'}, #cred{jwt = '$1',
validity = '$2',
_='_'}},