59
59
% % client port
60
60
peer_port ,
61
61
auth_mechanism ,
62
+ authentication_state :: any (),
62
63
connected_at :: integer (),
63
64
helper_sup :: pid (),
64
65
socket :: rabbit_net :socket (),
70
71
stream_leaders :: #{stream () => pid ()},
71
72
stream_subscriptions :: #{stream () => [subscription_id ()]},
72
73
credits :: atomics :atomics_ref (),
73
- authentication_state :: atom (),
74
74
user :: undefined | # user {},
75
75
virtual_host :: undefined | binary (),
76
76
connection_step ::
@@ -1188,8 +1188,6 @@ handle_frame_pre_auth(Transport,
1188
1188
ServerProperties }}),
1189
1189
send (Transport , S , Frame ),
1190
1190
{Connection # stream_connection {client_properties = ClientProperties ,
1191
- authentication_state =
1192
- peer_properties_exchanged ,
1193
1191
connection_step = peer_properties_exchanged },
1194
1192
State };
1195
1193
handle_frame_pre_auth (Transport ,
@@ -1252,13 +1250,8 @@ handle_frame_pre_auth(Transport,
1252
1250
{C1 # stream_connection {connection_step = failure },
1253
1251
{sasl_authenticate , ? RESPONSE_SASL_ERROR , <<>>}};
1254
1252
{challenge , Challenge , AuthState1 } ->
1255
- rabbit_core_metrics :auth_attempt_succeeded (RemoteAddress ,
1256
- <<>>,
1257
- stream ),
1258
- {C1 # stream_connection {authentication_state =
1259
- AuthState1 ,
1260
- connection_step =
1261
- authenticating },
1253
+ {C1 # stream_connection {authentication_state = AuthState1 ,
1254
+ connection_step = authenticating },
1262
1255
{sasl_authenticate , ? RESPONSE_SASL_CHALLENGE ,
1263
1256
Challenge }};
1264
1257
{ok , User = # user {username = Username }} ->
@@ -1275,11 +1268,9 @@ handle_frame_pre_auth(Transport,
1275
1268
[],
1276
1269
C1 ,
1277
1270
State ),
1278
- {C1 # stream_connection {authentication_state =
1279
- done ,
1280
- user = User ,
1281
- connection_step =
1282
- authenticated },
1271
+ {C1 # stream_connection {user = User ,
1272
+ authentication_state = done ,
1273
+ connection_step = authenticated },
1283
1274
{sasl_authenticate , ? RESPONSE_CODE_OK ,
1284
1275
<<>>}};
1285
1276
not_allowed ->
0 commit comments