netbird/management/server
Maycon Santos da39c8bbca
Refactor login with store.SavePeer (#2334)
This pull request refactors the login functionality by integrating store.SavePeer. The changes aim to improve the handling of peer login processes, particularly focusing on synchronization and error handling.

Changes:
- Refactored login logic to use store.SavePeer.
- Added checks for login without lock for login necessary checks from the client and utilized write lock for full login flow.
- Updated error handling with status.NewPeerLoginExpiredError().
- Moved geoIP check logic to a more appropriate place.
- Removed redundant calls and improved documentation.
- Moved the code to smaller methods to improve readability.
2024-07-29 13:30:27 +02:00
..
account Feature/peer validator (#1553) 2024-03-27 18:48:48 +01:00
activity Add context to throughout the project and update logging (#2209) 2024-07-03 11:33:02 +02:00
context Add context to throughout the project and update logging (#2209) 2024-07-03 11:33:02 +02:00
geolocation Add context to throughout the project and update logging (#2209) 2024-07-03 11:33:02 +02:00
group Feature/peer validator (#1553) 2024-03-27 18:48:48 +01:00
http Add context to throughout the project and update logging (#2209) 2024-07-03 11:33:02 +02:00
idp Add context to throughout the project and update logging (#2209) 2024-07-03 11:33:02 +02:00
integrated_validator Add context to throughout the project and update logging (#2209) 2024-07-03 11:33:02 +02:00
integration_reference Feature/peer validator (#1553) 2024-03-27 18:48:48 +01:00
jwtclaims Add context to throughout the project and update logging (#2209) 2024-07-03 11:33:02 +02:00
metrics Fix issue with canceled context before pushing metrics and decreasing pushing interval (#2235) 2024-07-04 19:15:59 +02:00
migration Add context to throughout the project and update logging (#2209) 2024-07-03 11:33:02 +02:00
mock_server Add batch save/update for groups and users (#2245) 2024-07-15 17:04:06 +03:00
peer Release 0.28.0 (#2092) 2024-06-13 13:24:24 +02:00
posture Add context to throughout the project and update logging (#2209) 2024-07-03 11:33:02 +02:00
status Refactor login with store.SavePeer (#2334) 2024-07-29 13:30:27 +02:00
telemetry Add context to throughout the project and update logging (#2209) 2024-07-03 11:33:02 +02:00
testdata Remove usage stats (#1665) 2024-03-05 09:45:32 +01:00
testutil Add context to throughout the project and update logging (#2209) 2024-07-03 11:33:02 +02:00
account_test.go Remove redundant check for empty JWT groups (#2323) 2024-07-26 16:33:54 +02:00
account.go Remove redundant check for empty JWT groups (#2323) 2024-07-26 16:33:54 +02:00
config.go Expose trusted proxy list and counter configuration for realip middleware (#1535) 2024-02-08 14:40:40 +01:00
dns_test.go Add context to throughout the project and update logging (#2209) 2024-07-03 11:33:02 +02:00
dns.go Add context to throughout the project and update logging (#2209) 2024-07-03 11:33:02 +02:00
ephemeral_test.go Add context to throughout the project and update logging (#2209) 2024-07-03 11:33:02 +02:00
ephemeral.go Add context to throughout the project and update logging (#2209) 2024-07-03 11:33:02 +02:00
event_test.go Add context to throughout the project and update logging (#2209) 2024-07-03 11:33:02 +02:00
event.go Add context to throughout the project and update logging (#2209) 2024-07-03 11:33:02 +02:00
file_store_test.go Add context to throughout the project and update logging (#2209) 2024-07-03 11:33:02 +02:00
file_store.go Add SavePeer method to prevent a possible account inconsistency (#2296) 2024-07-26 07:49:05 +02:00
group_test.go Add context to throughout the project and update logging (#2209) 2024-07-03 11:33:02 +02:00
group.go Add batch save/update for groups and users (#2245) 2024-07-15 17:04:06 +03:00
grpcserver.go Add context to throughout the project and update logging (#2209) 2024-07-03 11:33:02 +02:00
integrated_validator.go Add context to throughout the project and update logging (#2209) 2024-07-03 11:33:02 +02:00
management_proto_test.go Add context to throughout the project and update logging (#2209) 2024-07-03 11:33:02 +02:00
management_suite_test.go Move management server to a separate directory (#67) 2021-07-24 16:14:29 +02:00
management_test.go Add context to throughout the project and update logging (#2209) 2024-07-03 11:33:02 +02:00
nameserver_test.go Add context to throughout the project and update logging (#2209) 2024-07-03 11:33:02 +02:00
nameserver.go Add context to throughout the project and update logging (#2209) 2024-07-03 11:33:02 +02:00
network_test.go Exclude second last IP from allocation to use it in the Fake DNS (#912) 2023-05-30 18:26:44 +04:00
network.go Migrate serializer:gob fields to serializer:json (#1855) 2024-04-18 18:14:21 +02:00
peer_test.go Add context to throughout the project and update logging (#2209) 2024-07-03 11:33:02 +02:00
peer.go Refactor login with store.SavePeer (#2334) 2024-07-29 13:30:27 +02:00
personal_access_token_test.go move into separate package 2023-05-16 12:57:56 +02:00
personal_access_token.go Implement SQLite Store using gorm and relational approach (#1065) 2023-10-12 15:42:36 +02:00
policy_test.go Add context to throughout the project and update logging (#2209) 2024-07-03 11:33:02 +02:00
policy.go Add context to throughout the project and update logging (#2209) 2024-07-03 11:33:02 +02:00
posture_checks_test.go Add context to throughout the project and update logging (#2209) 2024-07-03 11:33:02 +02:00
posture_checks.go Add context to throughout the project and update logging (#2209) 2024-07-03 11:33:02 +02:00
route_test.go Add context to throughout the project and update logging (#2209) 2024-07-03 11:33:02 +02:00
route.go Add context to throughout the project and update logging (#2209) 2024-07-03 11:33:02 +02:00
scheduler_test.go Add context to throughout the project and update logging (#2209) 2024-07-03 11:33:02 +02:00
scheduler.go Add context to throughout the project and update logging (#2209) 2024-07-03 11:33:02 +02:00
setupkey_test.go Add context to throughout the project and update logging (#2209) 2024-07-03 11:33:02 +02:00
setupkey.go Add context to throughout the project and update logging (#2209) 2024-07-03 11:33:02 +02:00
sql_store_test.go Add SavePeer method to prevent a possible account inconsistency (#2296) 2024-07-26 07:49:05 +02:00
sql_store.go Add SavePeer method to prevent a possible account inconsistency (#2296) 2024-07-26 07:49:05 +02:00
store_test.go Add context to throughout the project and update logging (#2209) 2024-07-03 11:33:02 +02:00
store.go Add SavePeer method to prevent a possible account inconsistency (#2296) 2024-07-26 07:49:05 +02:00
turncredentials_test.go Add context to throughout the project and update logging (#2209) 2024-07-03 11:33:02 +02:00
turncredentials.go Add context to throughout the project and update logging (#2209) 2024-07-03 11:33:02 +02:00
updatechannel_test.go Add context to throughout the project and update logging (#2209) 2024-07-03 11:33:02 +02:00
updatechannel.go Add context to throughout the project and update logging (#2209) 2024-07-03 11:33:02 +02:00
user_test.go Add context to throughout the project and update logging (#2209) 2024-07-03 11:33:02 +02:00
user.go Add batch save/update for groups and users (#2245) 2024-07-15 17:04:06 +03:00