64
64
% % client port
65
65
peer_port ,
66
66
auth_mechanism ,
67
+ authentication_state :: any (),
67
68
connected_at :: integer (),
68
69
helper_sup :: pid (),
69
70
socket :: rabbit_net :socket (),
75
76
stream_leaders :: #{stream () => pid ()},
76
77
stream_subscriptions :: #{stream () => [subscription_id ()]},
77
78
credits :: atomics :atomics_ref (),
78
- authentication_state :: atom (),
79
79
user :: undefined | # user {},
80
80
virtual_host :: undefined | binary (),
81
81
connection_step ::
@@ -1371,8 +1371,6 @@ handle_frame_pre_auth(Transport,
1371
1371
ServerProperties }}),
1372
1372
send (Transport , S , Frame ),
1373
1373
{Connection # stream_connection {client_properties = ClientProperties ,
1374
- authentication_state =
1375
- peer_properties_exchanged ,
1376
1374
connection_step = peer_properties_exchanged },
1377
1375
State };
1378
1376
handle_frame_pre_auth (Transport ,
@@ -1435,13 +1433,8 @@ handle_frame_pre_auth(Transport,
1435
1433
{C1 # stream_connection {connection_step = failure },
1436
1434
{sasl_authenticate , ? RESPONSE_SASL_ERROR , <<>>}};
1437
1435
{challenge , Challenge , AuthState1 } ->
1438
- rabbit_core_metrics :auth_attempt_succeeded (RemoteAddress ,
1439
- <<>>,
1440
- stream ),
1441
- {C1 # stream_connection {authentication_state =
1442
- AuthState1 ,
1443
- connection_step =
1444
- authenticating },
1436
+ {C1 # stream_connection {authentication_state = AuthState1 ,
1437
+ connection_step = authenticating },
1445
1438
{sasl_authenticate , ? RESPONSE_SASL_CHALLENGE ,
1446
1439
Challenge }};
1447
1440
{ok , User = # user {username = Username }} ->
@@ -1458,11 +1451,9 @@ handle_frame_pre_auth(Transport,
1458
1451
[],
1459
1452
C1 ,
1460
1453
State ),
1461
- {C1 # stream_connection {authentication_state =
1462
- done ,
1463
- user = User ,
1464
- connection_step =
1465
- authenticated },
1454
+ {C1 # stream_connection {user = User ,
1455
+ authentication_state = done ,
1456
+ connection_step = authenticated },
1466
1457
{sasl_authenticate , ? RESPONSE_CODE_OK ,
1467
1458
<<>>}};
1468
1459
not_allowed ->
0 commit comments