Automatic redirection when accepting server certificate

pull/20/head
pabloFuente 2017-06-05 11:13:25 +02:00
parent 1a5dbaba22
commit 3af074fd0c
5 changed files with 33 additions and 3 deletions

File diff suppressed because one or more lines are too long

View File

@ -371,7 +371,7 @@ export class SessionInternal {
if (!this.connected) {
console.warn('Not connected to room: if you are not debugging, this is probably a certificate error');
if (window.confirm('If you are not debugging, this is probably a certificate error at \"' + this.openVidu.getOpenViduServerURL() + '\"\n\nClick OK to navigate and accept it')) {
location.assign(this.openVidu.getOpenViduServerURL());
location.assign(this.openVidu.getOpenViduServerURL() + '/accept-certificate');
};
return;
}

View File

@ -159,6 +159,10 @@
<groupId>com.googlecode.json-simple</groupId>
<artifactId>json-simple</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
</dependencies>
<!-- <profiles> <profile> <id>default</id> <activation> <property> <name>default</name>

View File

@ -0,0 +1,17 @@
package org.openvidu.server.security;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
@Controller
public class CertificateController {
@RequestMapping(value = "/accept-certificate", method = RequestMethod.GET)
public String acceptCert(Model model) throws Exception {
System.out.println("Navigating to accept certificate");
return "accept-cert";
}
}

View File

@ -0,0 +1,9 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8"></meta>
</head>
<body>
</body>
<script>history.back()</script>
</html>