-
Notifications
You must be signed in to change notification settings - Fork 33
Implement authorization #498
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
It superseds `replicate_after_connect`. By default we just verify compatibility between client and server, but it's customizable via `RepliconSharedPlugin::auth_method`. In the Tic-Tac-Toe example, I switched to deterministic sorting, which is more efficient because I also used it in the doc example for authorization.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #498 +/- ##
==========================================
+ Coverage 81.64% 82.24% +0.59%
==========================================
Files 52 53 +1
Lines 3019 3104 +85
==========================================
+ Hits 2465 2553 +88
+ Misses 554 551 -3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
- React on `DisconnectRequest` event. Relevant PR: projectharmonia/bevy_replicon#491 - Process received data on disconnect. Relevant PR: projectharmonia/bevy_replicon#494 - Update examples. Relevant PRs: projectharmonia/bevy_replicon#498 projectharmonia/bevy_replicon#479 - Update tests. - Move server stopping into a separate test. Relevant PR: projectharmonia/bevy_replicon#494 - Add `finish` calls. Required to initialize channels. Relevant PR: projectharmonia/bevy_replicon#488 - Test `DisconnectRequest`. Relevant PR: projectharmonia/bevy_replicon#491 - Remove uses of the word "Dummy". Relevant PR: projectharmonia/bevy_replicon#486
- React on `DisconnectRequest` event. Relevant PR: projectharmonia/bevy_replicon#491 - Process received data on disconnect. Relevant PR: projectharmonia/bevy_replicon#494 - Update examples. Relevant PRs: projectharmonia/bevy_replicon#498 projectharmonia/bevy_replicon#479 - Update tests. - Move server stopping into a separate test. Relevant PR: projectharmonia/bevy_replicon#494 - Add `finish` calls. Required to initialize channels. Relevant PR: projectharmonia/bevy_replicon#488 - Test `DisconnectRequest`. Relevant PR: projectharmonia/bevy_replicon#491 - Remove uses of the word "Dummy". Relevant PR: projectharmonia/bevy_replicon#486
src/server.rs
Outdated
AuthMethod::ProtocolCheck => { | ||
app.add_observer(check_protocol); | ||
} | ||
AuthMethod::Disabled => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AuthMethod::Disabled => { | |
AuthMethod::None => { |
This is more semantically accurate. Setting the auth method doesn't 'disable' anything.
self.world_mut() | ||
.resource_mut::<ProtocolHasher>() | ||
.add_replication_rule::<R>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should include priority.
- React on `DisconnectRequest` event. Relevant PR: projectharmonia/bevy_replicon#491 - Process received data on disconnect. Relevant PR: projectharmonia/bevy_replicon#494 - Update examples. Relevant PRs: projectharmonia/bevy_replicon#498 projectharmonia/bevy_replicon#479 - Update tests. - Move server stopping into a separate test. Relevant PR: projectharmonia/bevy_replicon#494 - Add `finish` calls. Required to initialize channels. Relevant PR: projectharmonia/bevy_replicon#488 - Test `DisconnectRequest`. Relevant PR: projectharmonia/bevy_replicon#491 - Remove uses of the word "Dummy". Relevant PR: projectharmonia/bevy_replicon#486
It superseds
replicate_after_connect
. By default we just verify compatibility between client and server, but it's customizable viaRepliconSharedPlugin::auth_method
.