You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* added explict authorize and unauthorize methods
* disable autologging in on rpc and wrote a test for this behavor
* updated README
* fixed README typo
* Added race condition test
* check for auth success in tests setup
* added warnings when auth/unauth is unnecessarily called
* added more detail to the README example
* added more auth tests
* removed unused import
* fixed main function
* added test for action after unauth
Copy file name to clipboardExpand all lines: README.md
+16-3Lines changed: 16 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -95,12 +95,25 @@ Applications use the CSync class to create a connection to a specific CSync serv
95
95
final CSync csync = new CSync.builder()
96
96
.host("localhost")
97
97
.port(6005)
98
-
.provider("demo")
99
-
.token("demoToken")
100
98
.build();
101
99
```
102
100
103
-
Note: Update the `host` and `port` to your specific csync server instance. Also, `provider` and `token` can be updated to allow other providers to authenticate the csync session.
101
+
Note: Update the `host` and `port` to your specific csync server instance.
102
+
103
+
## Authenticating
104
+
```
105
+
csync.authenticate("demo", "demoToken")
106
+
.onComplete((exception, didSucceed) -> {
107
+
if(didSucceed) {
108
+
//We successfully logged in
109
+
}
110
+
else {
111
+
ex.printStackTrace()
112
+
}
113
+
});
114
+
```
115
+
116
+
Note: The provider and token can be updated to allow other providers to authenticate the csync session.
0 commit comments