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 ::
@@ -1365,8 +1365,6 @@ handle_frame_pre_auth(Transport,
1365
1365
ServerProperties }}),
1366
1366
send (Transport , S , Frame ),
1367
1367
{Connection # stream_connection {client_properties = ClientProperties ,
1368
- authentication_state =
1369
- peer_properties_exchanged ,
1370
1368
connection_step = peer_properties_exchanged },
1371
1369
State };
1372
1370
handle_frame_pre_auth (Transport ,
@@ -1428,13 +1426,8 @@ handle_frame_pre_auth(Transport,
1428
1426
{C1 # stream_connection {connection_step = failure },
1429
1427
{sasl_authenticate , ? RESPONSE_SASL_ERROR , <<>>}};
1430
1428
{challenge , Challenge , AuthState1 } ->
1431
- rabbit_core_metrics :auth_attempt_succeeded (Host ,
1432
- <<>>,
1433
- stream ),
1434
- {C1 # stream_connection {authentication_state =
1435
- AuthState1 ,
1436
- connection_step =
1437
- authenticating },
1429
+ {C1 # stream_connection {authentication_state = AuthState1 ,
1430
+ connection_step = authenticating },
1438
1431
{sasl_authenticate , ? RESPONSE_SASL_CHALLENGE ,
1439
1432
Challenge }};
1440
1433
{ok , User = # user {username = Username }} ->
@@ -1451,11 +1444,9 @@ handle_frame_pre_auth(Transport,
1451
1444
[],
1452
1445
C1 ,
1453
1446
State ),
1454
- {C1 # stream_connection {authentication_state =
1455
- done ,
1456
- user = User ,
1457
- connection_step =
1458
- authenticated },
1447
+ {C1 # stream_connection {user = User ,
1448
+ authentication_state = done ,
1449
+ connection_step = authenticated },
1459
1450
{sasl_authenticate , ? RESPONSE_CODE_OK ,
1460
1451
<<>>}};
1461
1452
not_allowed ->
0 commit comments