Skip to content

Commit

Permalink
Update erlfmt & Format
Browse files Browse the repository at this point in the history
  • Loading branch information
maennchen committed Sep 3, 2024
1 parent 9ef9cc0 commit 9f026ca
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 37 deletions.
1 change: 0 additions & 1 deletion src/oidcc_backoff.erl
Original file line number Diff line number Diff line change
Expand Up @@ -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]).
Expand Down
1 change: 0 additions & 1 deletion src/oidcc_client_registration.erl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion src/oidcc_logout.erl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

-feature(maybe_expr, enable).


-include("internal/doc.hrl").
?MODULEDOC("Logout from the OpenID Provider.").
?MODULEDOC(#{since => <<"3.0.0">>}).
Expand Down
3 changes: 0 additions & 3 deletions src/oidcc_token.erl
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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() ::
#{
Expand Down Expand Up @@ -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(),
Expand Down
61 changes: 30 additions & 31 deletions src/oidcc_token_introspection.erl
Original file line number Diff line number Diff line change
Expand Up @@ -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(), ...],
Expand Down Expand Up @@ -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
)
}}.

0 comments on commit 9f026ca

Please sign in to comment.