Skip to content

Commit

Permalink
fix: make otp 23 compliant (#7)
Browse files Browse the repository at this point in the history
* chore: use otp 23

* fix: add bas64url to app.src

* chore: upgrade hackney

* fix: don't use base64url module
  • Loading branch information
jakobsvenning authored Dec 28, 2020
1 parent b6d1179 commit 092de63
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 26 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/erlang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- uses: actions/[email protected]
- uses: gleam-lang/[email protected]
with:
otp-version: 22.1
otp-version: 23.2
- name: Compile
run: make
- name: Run xref
Expand Down
4 changes: 2 additions & 2 deletions rebar.config
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{erl_opts, [debug_info]}.
{deps, [ {jsx, "2.11.0"},
{jose, "1.10.1"},
{hackney, "1.16.0"}
{jose, "1.11.0"},
{hackney, "1.17.0"}
]}.

{shell, [{config, "config/sys.config"},
Expand Down
41 changes: 19 additions & 22 deletions rebar.lock
Original file line number Diff line number Diff line change
@@ -1,38 +1,35 @@
{"1.2.0",
[{<<"base64url">>,{pkg,<<"base64url">>,<<"0.0.1">>},1},
{<<"certifi">>,{pkg,<<"certifi">>,<<"2.5.1">>},1},
{<<"hackney">>,{pkg,<<"hackney">>,<<"1.15.2">>},0},
{<<"idna">>,{pkg,<<"idna">>,<<"6.0.0">>},1},
{<<"jose">>,{pkg,<<"jose">>,<<"1.9.0">>},0},
[{<<"certifi">>,{pkg,<<"certifi">>,<<"2.5.3">>},1},
{<<"hackney">>,{pkg,<<"hackney">>,<<"1.17.0">>},0},
{<<"idna">>,{pkg,<<"idna">>,<<"6.1.1">>},1},
{<<"jose">>,{pkg,<<"jose">>,<<"1.11.0">>},0},
{<<"jsx">>,{pkg,<<"jsx">>,<<"2.10.0">>},0},
{<<"metrics">>,{pkg,<<"metrics">>,<<"1.0.1">>},1},
{<<"mimerl">>,{pkg,<<"mimerl">>,<<"1.2.0">>},1},
{<<"parse_trans">>,{pkg,<<"parse_trans">>,<<"3.3.0">>},2},
{<<"ssl_verify_fun">>,{pkg,<<"ssl_verify_fun">>,<<"1.1.5">>},1},
{<<"unicode_util_compat">>,{pkg,<<"unicode_util_compat">>,<<"0.4.1">>},2}]}.
{<<"parse_trans">>,{pkg,<<"parse_trans">>,<<"3.3.0">>},1},
{<<"ssl_verify_fun">>,{pkg,<<"ssl_verify_fun">>,<<"1.1.6">>},1},
{<<"unicode_util_compat">>,{pkg,<<"unicode_util_compat">>,<<"0.7.0">>},1}]}.
[
{pkg_hash,[
{<<"base64url">>, <<"36A90125F5948E3AFD7BE97662A1504B934DD5DAC78451CA6E9ABF85A10286BE">>},
{<<"certifi">>, <<"867CE347F7C7D78563450A18A6A28A8090331E77FA02380B4A21962A65D36EE5">>},
{<<"hackney">>, <<"07E33C794F8F8964EE86CEBEC1A8ED88DB5070E52E904B8F12209773C1036085">>},
{<<"idna">>, <<"689C46CBCDF3524C44D5F3DDE8001F364CD7608A99556D8FBD8239A5798D4C10">>},
{<<"jose">>, <<"4167C5F6D06FFAEBFFD15CDB8DA61A108445EF5E85AB8F5A7AD926FDF3ADA154">>},
{<<"certifi">>, <<"70BDD7E7188C804F3A30EE0E7C99655BC35D8AC41C23E12325F36AB449B70651">>},
{<<"hackney">>, <<"717EA195FD2F898D9FE9F1CE0AFCC2621A41ECFE137FAE57E7FE6E9484B9AA99">>},
{<<"idna">>, <<"8A63070E9F7D0C62EB9D9FCB360A7DE382448200FBBD1B106CC96D3D8099DF8D">>},
{<<"jose">>, <<"B1E6145881C97F489A26C19E117BE014EDCD1EAC71DEEDCE09EBB3A529569578">>},
{<<"jsx">>, <<"77760560D6AC2B8C51FD4C980E9E19B784016AA70BE354CE746472C33BEB0B1C">>},
{<<"metrics">>, <<"25F094DEA2CDA98213CECC3AEFF09E940299D950904393B2A29D191C346A8486">>},
{<<"mimerl">>, <<"67E2D3F571088D5CFD3E550C383094B47159F3EEE8FFA08E64106CDF5E981BE3">>},
{<<"parse_trans">>, <<"09765507A3C7590A784615CFD421D101AEC25098D50B89D7AA1D66646BC571C1">>},
{<<"ssl_verify_fun">>, <<"6EAF7AD16CB568BB01753DBBD7A95FF8B91C7979482B95F38443FE2C8852A79B">>},
{<<"unicode_util_compat">>, <<"D869E4C68901DD9531385BB0C8C40444EBF624E60B6962D95952775CAC5E90CD">>}]},
{<<"ssl_verify_fun">>, <<"CF344F5692C82D2CD7554F5EC8FD961548D4FD09E7D22F5B62482E5AEAEBD4B0">>},
{<<"unicode_util_compat">>, <<"BC84380C9AB48177092F43AC89E4DFA2C6D62B40B8BD132B1059ECC7232F9A78">>}]},
{pkg_hash_ext,[
{<<"base64url">>, <<"FAB09B20E3F5DB886725544CBCF875B8E73EC93363954EB8A1A9ED834AA8C1F9">>},
{<<"certifi">>, <<"805ABD97539CAF89EC6D4732C91E62BA9DA0CDA51AC462380BBD28EE697A8C42">>},
{<<"hackney">>, <<"E0100F8EF7D1124222C11AD362C857D3DF7CB5F4204054F9F0F4A728666591FC">>},
{<<"idna">>, <<"4BDD305EB64E18B0273864920695CB18D7A2021F31A11B9C5FBCD9A253F936E2">>},
{<<"jose">>, <<"6429C4FEE52B2DDA7861EE19A4F09C8C1FFA213BEE3A1EC187828FDE95D447ED">>},
{<<"certifi">>, <<"ED516ACB3929B101208A9D700062D520F3953DA3B6B918D866106FFA980E1C10">>},
{<<"hackney">>, <<"64C22225F1EA8855F584720C0E5B3CD14095703AF1C9FBC845BA042811DC671C">>},
{<<"idna">>, <<"92376EB7894412ED19AC475E4A86F7B413C1B9FBB5BD16DCCD57934157944CEA">>},
{<<"jose">>, <<"35739462122A4D073519643E55D582375F4C43192D1BCD240357D101B80B2B34">>},
{<<"jsx">>, <<"9A83E3704807298016968DB506F9FAD0F027DE37546EB838B3AE1064C3A0AD62">>},
{<<"metrics">>, <<"69B09ADDDC4F74A40716AE54D140F93BEB0FB8978D8636EADED0C31B6F099F16">>},
{<<"mimerl">>, <<"F278585650AA581986264638EBF698F8BB19DF297F66AD91B18910DFC6E19323">>},
{<<"parse_trans">>, <<"17EF63ABDE837AD30680EA7F857DD9E7CED9476CDD7B0394432AF4BFC241B960">>},
{<<"ssl_verify_fun">>, <<"13104D7897E38ED7F044C4DE953A6C28597D1C952075EB2E328BC6D6F2BFC496">>},
{<<"unicode_util_compat">>, <<"1D1848C40487CDB0B30E8ED975E34E025860C02E419CB615D255849F3427439D">>}]}
{<<"ssl_verify_fun">>, <<"BDB0D2471F453C88FF3908E7686F86F9BE327D065CC1EC16FA4540197EA04680">>},
{<<"unicode_util_compat">>, <<"25EEE6D67DF61960CF6A794239566599B09E17E668D3700247BC498638152521">>}]}
].
2 changes: 1 addition & 1 deletion src/id_token_jws.erl
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ alg_to_curve(<<"ES384">>) -> <<"P-384">>;
alg_to_curve(<<"ES512">>) -> <<"P-521">>.

kid(#{kid := Kid}) -> Kid;
kid(_) -> base64url:encode(crypto:strong_rand_bytes(16)).
kid(_) -> jose_base64url:encode(crypto:strong_rand_bytes(16)).

iat(#{iat := Iat}) -> Iat;
iat(_) -> erlang:system_time(seconds).
Expand Down

0 comments on commit 092de63

Please sign in to comment.