Merge branch 'develop' of github.com:thecodingmachine/workadventure
This commit is contained in:
+5
-6
@@ -4,7 +4,7 @@
|
|||||||
local tag = namespace,
|
local tag = namespace,
|
||||||
local url = namespace+".test.workadventu.re",
|
local url = namespace+".test.workadventu.re",
|
||||||
// develop branch does not use admin because of issue with SSL certificate of admin as of now.
|
// develop branch does not use admin because of issue with SSL certificate of admin as of now.
|
||||||
local adminUrl = if namespace == "master" || namespace == "develop" || std.startsWith(namespace, "admin") then "https://"+url else null,
|
local adminUrl = if std.startsWith(namespace, "admin") then "https://"+url else null,
|
||||||
"$schema": "https://raw.githubusercontent.com/thecodingmachine/deeployer/master/deeployer.schema.json",
|
"$schema": "https://raw.githubusercontent.com/thecodingmachine/deeployer/master/deeployer.schema.json",
|
||||||
"version": "1.0",
|
"version": "1.0",
|
||||||
"containers": {
|
"containers": {
|
||||||
@@ -17,7 +17,6 @@
|
|||||||
"ports": [8080, 50051],
|
"ports": [8080, 50051],
|
||||||
"env": {
|
"env": {
|
||||||
"SECRET_KEY": "tempSecretKeyNeedsToChange",
|
"SECRET_KEY": "tempSecretKeyNeedsToChange",
|
||||||
"ADMIN_API_TOKEN": env.ADMIN_API_TOKEN,
|
|
||||||
"JITSI_ISS": env.JITSI_ISS,
|
"JITSI_ISS": env.JITSI_ISS,
|
||||||
"JITSI_URL": env.JITSI_URL,
|
"JITSI_URL": env.JITSI_URL,
|
||||||
"SECRET_JITSI_KEY": env.SECRET_JITSI_KEY,
|
"SECRET_JITSI_KEY": env.SECRET_JITSI_KEY,
|
||||||
@@ -25,6 +24,7 @@
|
|||||||
"REDIS_HOST": "redis",
|
"REDIS_HOST": "redis",
|
||||||
} + (if adminUrl != null then {
|
} + (if adminUrl != null then {
|
||||||
"ADMIN_API_URL": adminUrl,
|
"ADMIN_API_URL": adminUrl,
|
||||||
|
"ADMIN_API_TOKEN": env.ADMIN_API_TOKEN,
|
||||||
} else {})
|
} else {})
|
||||||
},
|
},
|
||||||
"back2": {
|
"back2": {
|
||||||
@@ -36,7 +36,6 @@
|
|||||||
"ports": [8080, 50051],
|
"ports": [8080, 50051],
|
||||||
"env": {
|
"env": {
|
||||||
"SECRET_KEY": "tempSecretKeyNeedsToChange",
|
"SECRET_KEY": "tempSecretKeyNeedsToChange",
|
||||||
"ADMIN_API_TOKEN": env.ADMIN_API_TOKEN,
|
|
||||||
"JITSI_ISS": env.JITSI_ISS,
|
"JITSI_ISS": env.JITSI_ISS,
|
||||||
"JITSI_URL": env.JITSI_URL,
|
"JITSI_URL": env.JITSI_URL,
|
||||||
"SECRET_JITSI_KEY": env.SECRET_JITSI_KEY,
|
"SECRET_JITSI_KEY": env.SECRET_JITSI_KEY,
|
||||||
@@ -44,6 +43,7 @@
|
|||||||
"REDIS_HOST": "redis",
|
"REDIS_HOST": "redis",
|
||||||
} + (if adminUrl != null then {
|
} + (if adminUrl != null then {
|
||||||
"ADMIN_API_URL": adminUrl,
|
"ADMIN_API_URL": adminUrl,
|
||||||
|
"ADMIN_API_TOKEN": env.ADMIN_API_TOKEN,
|
||||||
} else {})
|
} else {})
|
||||||
},
|
},
|
||||||
"pusher": {
|
"pusher": {
|
||||||
@@ -55,13 +55,13 @@
|
|||||||
"ports": [8080],
|
"ports": [8080],
|
||||||
"env": {
|
"env": {
|
||||||
"SECRET_KEY": "tempSecretKeyNeedsToChange",
|
"SECRET_KEY": "tempSecretKeyNeedsToChange",
|
||||||
"ADMIN_API_TOKEN": env.ADMIN_API_TOKEN,
|
|
||||||
"JITSI_ISS": env.JITSI_ISS,
|
"JITSI_ISS": env.JITSI_ISS,
|
||||||
"JITSI_URL": env.JITSI_URL,
|
"JITSI_URL": env.JITSI_URL,
|
||||||
"API_URL": "back1:50051,back2:50051",
|
"API_URL": "back1:50051,back2:50051",
|
||||||
"SECRET_JITSI_KEY": env.SECRET_JITSI_KEY,
|
"SECRET_JITSI_KEY": env.SECRET_JITSI_KEY,
|
||||||
} + (if adminUrl != null then {
|
} + (if adminUrl != null then {
|
||||||
"ADMIN_API_URL": adminUrl,
|
"ADMIN_API_URL": adminUrl,
|
||||||
|
"ADMIN_API_TOKEN": env.ADMIN_API_TOKEN,
|
||||||
} else {})
|
} else {})
|
||||||
},
|
},
|
||||||
"front": {
|
"front": {
|
||||||
@@ -81,8 +81,7 @@
|
|||||||
"SECRET_JITSI_KEY": env.SECRET_JITSI_KEY,
|
"SECRET_JITSI_KEY": env.SECRET_JITSI_KEY,
|
||||||
"TURN_SERVER": "turn:coturn.workadventu.re:443,turns:coturn.workadventu.re:443",
|
"TURN_SERVER": "turn:coturn.workadventu.re:443,turns:coturn.workadventu.re:443",
|
||||||
"JITSI_PRIVATE_MODE": if env.SECRET_JITSI_KEY != '' then "true" else "false",
|
"JITSI_PRIVATE_MODE": if env.SECRET_JITSI_KEY != '' then "true" else "false",
|
||||||
"START_ROOM_URL": "/_/global/maps-"+url+"/Floor0/floor0.json"
|
"START_ROOM_URL": "/_/global/maps-"+url+"/starter/map.json"
|
||||||
//"GA_TRACKING_ID": "UA-10196481-11"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uploader": {
|
"uploader": {
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ export class AuthenticateController extends BaseController {
|
|||||||
});
|
});
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const { nonce, state, playUri } = parse(req.getQuery());
|
const { nonce, state, playUri, redirect } = parse(req.getQuery());
|
||||||
if (!state || !nonce) {
|
if (!state || !nonce) {
|
||||||
throw "missing state and nonce URL parameters";
|
throw "missing state and nonce URL parameters";
|
||||||
}
|
}
|
||||||
@@ -39,7 +39,8 @@ export class AuthenticateController extends BaseController {
|
|||||||
const loginUri = await openIDClient.authorizationUrl(
|
const loginUri = await openIDClient.authorizationUrl(
|
||||||
state as string,
|
state as string,
|
||||||
nonce as string,
|
nonce as string,
|
||||||
playUri as string | undefined
|
playUri as string | undefined,
|
||||||
|
redirect as string | undefined
|
||||||
);
|
);
|
||||||
res.writeStatus("302");
|
res.writeStatus("302");
|
||||||
res.writeHeader("Location", loginUri);
|
res.writeHeader("Location", loginUri);
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ class OpenIDClient {
|
|||||||
return this.issuerPromise;
|
return this.issuerPromise;
|
||||||
}
|
}
|
||||||
|
|
||||||
public authorizationUrl(state: string, nonce: string, playUri?: string) {
|
public authorizationUrl(state: string, nonce: string, playUri?: string, redirect?: string) {
|
||||||
return this.initClient().then((client) => {
|
return this.initClient().then((client) => {
|
||||||
return client.authorizationUrl({
|
return client.authorizationUrl({
|
||||||
scope: "openid email",
|
scope: "openid email",
|
||||||
@@ -28,6 +28,7 @@ class OpenIDClient {
|
|||||||
state: state,
|
state: state,
|
||||||
nonce: nonce,
|
nonce: nonce,
|
||||||
playUri: playUri,
|
playUri: playUri,
|
||||||
|
redirect: redirect,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user