Skip to content

Commit c31abb4

Browse files
committed
fix: remove uws completely
1 parent d50cf3b commit c31abb4

39 files changed

+201
-8447
lines changed

.env.docker.template

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ S3_SSL=false
88
S3_ACCESS_KEY=minioadmin
99
S3_SECRET_KEY=minioadmin
1010

11-
AUTH_PERM_CALLBACK=http://demo:5173/auth/perm
12-
YDOC_UPDATE_CALLBACK=http://demo:5173/ydoc
11+
NO_AUTH=true
12+
# YDOC_UPDATE_CALLBACK=http://demo:5173/ydoc
1313

1414
# log everything
1515
LOG=*

.env.template

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
### Server mode 'ws' (default) | 'socketio'
2-
# SERVER_MODE=socketio
3-
41
### Redis endpoint
52
REDIS=redis://localhost:6379
63
# REDIS_PREFIX=y # by default "y:" is prepended to all used redis keys
@@ -24,7 +21,6 @@ S3_SECRET_KEY=minioadmin
2421
# POSTGRES_TESTDB=yredis_tests ## use a different database for testing
2522

2623
### Skip authentication
27-
## Only works in SocketIO mode
2824
# NO_AUTH=true
2925

3026
### Auth signature
@@ -35,16 +31,10 @@ S3_SECRET_KEY=minioadmin
3531
AUTH_PUBLIC_KEY=..
3632
AUTH_PRIVATE_KEY=..
3733

38-
### Auth backend
39-
## This REST endpoint is called to check whether a user has access to a document. It
40-
## is provided by you. However, there are multiple sample implementations in this
41-
## repository.
42-
AUTH_PERM_CALLBACK=http://localhost:5173/auth/perm
43-
4434
### Optional change callback
4535
## This REST endpoint is called in regular intervals when a ydoc is changed.
4636
## Remove this if you don't need it.
47-
YDOC_UPDATE_CALLBACK=http://localhost:5173/ydoc
37+
# YDOC_UPDATE_CALLBACK=http://localhost:5173/ydoc
4838

4939
### Logging
5040
## Configure what you want to log. LOG is a regular expression that is applied

.env.test.template

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ S3_SECRET_KEY=minioadmin
2020
POSTGRES=postgres://yredis:yredis@localhost:35432/yredis
2121
POSTGRES_TESTDB=yredis_tests ## use a different database for testing
2222

23+
### Skip authentication
24+
# NO_AUTH=true
25+
2326
### Auth signature
2427
## The auth server authenticates web clients using json-web-tokens (jwt).
2528
## They are generated and validated using the following json-web-keys (jwk).
@@ -28,16 +31,10 @@ POSTGRES_TESTDB=yredis_tests ## use a different database for testing
2831
AUTH_PUBLIC_KEY=..
2932
AUTH_PRIVATE_KEY=..
3033

31-
### Auth backend
32-
## This REST endpoint is called to check whether a user has access to a document. It
33-
## is provided by you. However, there are multiple sample implementations in this
34-
## repository.
35-
AUTH_PERM_CALLBACK=http://localhost:5173/auth/perm
36-
3734
### Optional change callback
3835
## This REST endpoint is called in regular intervals when a ydoc is changed.
3936
## Remove this if you don't need it.
40-
YDOC_UPDATE_CALLBACK=http://localhost:5173/ydoc
37+
# YDOC_UPDATE_CALLBACK=http://localhost:5173/ydoc
4138

4239
### Logging
4340
## Configure what you want to log. LOG is a regular expression that is applied

bin/auth-server-example.js

Lines changed: 0 additions & 99 deletions
This file was deleted.

bin/server.js

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ const port = number.parseInt(env.getConf('port') || '3002')
88
const redisPrefix = env.getConf('redis-prefix') || 'y'
99
const postgresUrl = env.getConf('postgres')
1010
const s3Endpoint = env.getConf('s3-endpoint')
11-
const serverMode = env.getConf('server-mode')
12-
const checkPermCallbackUrl = env.ensureConf('AUTH_PERM_CALLBACK')
1311

1412
let store
1513
if (s3Endpoint) {
@@ -31,8 +29,4 @@ if (s3Endpoint) {
3129
store = createMemoryStorage()
3230
}
3331

34-
if (serverMode === 'socketio') {
35-
server.createYSocketIOServer({ port, store, redisPrefix })
36-
} else {
37-
server.createYWebsocketServer({ port, store, checkPermCallbackUrl, redisPrefix })
38-
}
32+
server.createYSocketIOServer({ port, store, redisPrefix })

demos/auth-express/Dockerfile

Lines changed: 0 additions & 38 deletions
This file was deleted.

demos/auth-express/README.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

demos/auth-express/compose.yaml

Lines changed: 0 additions & 10 deletions
This file was deleted.

demos/auth-express/demo.js

Lines changed: 0 additions & 74 deletions
This file was deleted.

demos/auth-express/index.html

Lines changed: 0 additions & 26 deletions
This file was deleted.

0 commit comments

Comments
 (0)