Skip to content

Commit ea6f194

Browse files
michaelklishinMarcialRosales
authored andcommitted
OAuth 2 client: sync option/1 with rabbit_types, add a comment
1 parent f56324e commit ea6f194

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

deps/oauth2_client/include/types.hrl

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@
55
%% Copyright (c) 2020-2023 VMware, Inc. or its affiliates. All rights reserved.
66
%%
77

8-
%% The closest we have to a type import in Erlang
9-
-type(option(T) :: T | 'undefined').
8+
%% Matches the option type in rabbit_types without introducing a dependency
9+
%% on that module and RabbitMQ core (rabbit_common)
10+
-type(option(T) :: T | 'none' | 'undefined').
1011

1112
-type oauth_provider_id() :: root | binary().
1213

@@ -47,9 +48,10 @@
4748
-record(successful_access_token_response, {
4849
access_token :: binary(),
4950
token_type :: binary(),
50-
refresh_token :: option(binary()), % A refresh token SHOULD NOT be included
51-
% .. for client-credentials flow.
52-
% https://www.rfc-editor.org/rfc/rfc6749#section-4.4.3
51+
%% Note: a refresh token SHOULD NOT be included
52+
%% ... for client-credentials flow.
53+
%% See https://www.rfc-editor.org/rfc/rfc6749#section-4.4.3
54+
refresh_token :: option(binary()),
5355
expires_in :: option(integer())
5456
}).
5557

0 commit comments

Comments
 (0)