Merge pull request #13941 from prlanzarin/u24-paris-beads
chore: add legacy checkAuthorization endpoint
This commit is contained in:
commit
0dce2d7bf8
@ -110,6 +110,14 @@
|
||||
proxy_set_header X-Original-URI $request_uri;
|
||||
}
|
||||
|
||||
location = /bigbluebutton/connection/legacyCheckAuthorization {
|
||||
internal;
|
||||
proxy_pass http://127.0.0.1:8090;
|
||||
proxy_pass_request_body off;
|
||||
proxy_set_header Content-Length "";
|
||||
proxy_set_header X-Original-URI $request_uri;
|
||||
}
|
||||
|
||||
location = /bigbluebutton/connection/validatePad {
|
||||
internal;
|
||||
proxy_pass http://127.0.0.1:8090;
|
||||
|
@ -53,6 +53,26 @@ class ConnectionController {
|
||||
}
|
||||
}
|
||||
|
||||
def legacyCheckAuthorization = {
|
||||
try {
|
||||
def uri = request.getHeader("x-original-uri")
|
||||
def sessionToken = ParamsUtil.getSessionToken(uri)
|
||||
UserSession userSession = meetingService.getUserSessionWithAuthToken(sessionToken)
|
||||
|
||||
response.addHeader("Cache-Control", "no-cache")
|
||||
response.contentType = 'plain/text'
|
||||
if (userSession != null) {
|
||||
response.setStatus(200)
|
||||
response.outputStream << 'authorized'
|
||||
} else {
|
||||
response.setStatus(401)
|
||||
response.outputStream << 'unauthorized'
|
||||
}
|
||||
} catch (IOException e) {
|
||||
log.error("Error while authenticating connection.\n" + e.getMessage())
|
||||
}
|
||||
}
|
||||
|
||||
def validatePad = {
|
||||
try {
|
||||
String uri = request.getHeader("x-original-uri")
|
||||
|
Loading…
Reference in New Issue
Block a user