From 9f026caf5adf4bc99c4baf27163b087fdcfb2a17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonatan=20M=C3=A4nnchen?= Date: Tue, 3 Sep 2024 11:45:52 +0000 Subject: [PATCH] Update erlfmt & Format --- src/oidcc_backoff.erl | 1 - src/oidcc_client_registration.erl | 1 - src/oidcc_logout.erl | 1 - src/oidcc_token.erl | 3 -- src/oidcc_token_introspection.erl | 61 +++++++++++++++---------------- 5 files changed, 30 insertions(+), 37 deletions(-) diff --git a/src/oidcc_backoff.erl b/src/oidcc_backoff.erl index 514f1dd..a0803d9 100644 --- a/src/oidcc_backoff.erl +++ b/src/oidcc_backoff.erl @@ -8,7 +8,6 @@ Based on [`db_connection`](https://github.com/elixir-ecto/db_connection/blob/8ef """). ?MODULEDOC(#{since => <<"3.2.0">>}). - -export_type([type/0]). -export_type([min/0]). -export_type([max/0]). diff --git a/src/oidcc_client_registration.erl b/src/oidcc_client_registration.erl index c516cef..e8e4f34 100644 --- a/src/oidcc_client_registration.erl +++ b/src/oidcc_client_registration.erl @@ -147,7 +147,6 @@ All unrecognized fields are stored in `extra_fields`. extra_fields :: #{binary() => term()} }. - ?DOC(#{since => <<"3.0.0">>}). -type error() :: registration_not_supported diff --git a/src/oidcc_logout.erl b/src/oidcc_logout.erl index 140a279..46ef5f1 100644 --- a/src/oidcc_logout.erl +++ b/src/oidcc_logout.erl @@ -2,7 +2,6 @@ -feature(maybe_expr, enable). - -include("internal/doc.hrl"). ?MODULEDOC("Logout from the OpenID Provider."). ?MODULEDOC(#{since => <<"3.0.0">>}). diff --git a/src/oidcc_token.erl b/src/oidcc_token.erl index 3e9fcdc..784b583 100644 --- a/src/oidcc_token.erl +++ b/src/oidcc_token.erl @@ -64,7 +64,6 @@ ID Token Wrapper. ?DOC(#{since => <<"3.0.0">>}). -type id() :: #oidcc_token_id{token :: binary(), claims :: oidcc_jwt_util:claims()}. - ?DOC(""" Access Token Wrapper. @@ -154,7 +153,6 @@ See https://datatracker.ietf.org/doc/html/rfc6749#section-4.1.3. body_extension => oidcc_http_util:query_params() }. - ?DOC(#{since => <<"3.0.0">>}). -type refresh_opts() :: #{ @@ -184,7 +182,6 @@ See https://datatracker.ietf.org/doc/html/rfc6749#section-4.1.3. trusted_audiences => [binary()] | any }. - ?DOC(#{since => <<"3.0.0">>}). -type jwt_profile_opts() :: #{ scope => oidcc_scope:scopes(), diff --git a/src/oidcc_token_introspection.erl b/src/oidcc_token_introspection.erl index 7f2b918..8f6e227 100644 --- a/src/oidcc_token_introspection.erl +++ b/src/oidcc_token_introspection.erl @@ -48,7 +48,6 @@ See https://datatracker.ietf.org/doc/html/rfc7662#section-2.2. iss :: binary() }. - ?DOC(#{since => <<"3.0.0">>}). -type opts() :: #{ preferred_auth_methods => [oidcc_auth_util:auth_method(), ...], @@ -225,33 +224,33 @@ extract_response(TokenMap) -> Jti = maps:get(<<"jti">>, TokenMap, undefined), ClientId = maps:get(<<"client_id">>, TokenMap, undefined), {ok, #oidcc_token_introspection{ - active = Active, - scope = oidcc_scope:parse(Scope), - client_id = ClientId, - username = Username, - exp = Exp, - token_type = TokenType, - iat = Iat, - nbf = Nbf, - sub = Sub, - aud = Aud, - iss = Iss, - jti = Jti, - extra = maps:without( - [ - <<"scope">>, - <<"active">>, - <<"username">>, - <<"exp">>, - <<"client_id">>, - <<"token_type">>, - <<"iat">>, - <<"nbf">>, - <<"sub">>, - <<"aud">>, - <<"iss">>, - <<"jti">> - ], - TokenMap - ) - }}. + active = Active, + scope = oidcc_scope:parse(Scope), + client_id = ClientId, + username = Username, + exp = Exp, + token_type = TokenType, + iat = Iat, + nbf = Nbf, + sub = Sub, + aud = Aud, + iss = Iss, + jti = Jti, + extra = maps:without( + [ + <<"scope">>, + <<"active">>, + <<"username">>, + <<"exp">>, + <<"client_id">>, + <<"token_type">>, + <<"iat">>, + <<"nbf">>, + <<"sub">>, + <<"aud">>, + <<"iss">>, + <<"jti">> + ], + TokenMap + ) + }}.