Commit a958674b authored by Josh Ji's avatar Josh Ji

id_from_idp frontend presentation

parent 7421569e
Pipeline #3650 failed with stage
......@@ -134,7 +134,7 @@ public class MakeCredential {
user.getUserName(),
rawId));
return ResponseEntity.ok().body(new Response(true, "Successfully created credential"));
return ResponseEntity.ok().body(new Response(true, "Successfully created credential@@"+identityFromIDP));
}
private String[] extractExtensions(byte[] attestationObjectBytes){
......
package com.example.rpserver.controller;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.*;
@Controller
public class Profile {
@GetMapping("/profile")
public String profile(){
public String profile(Model model, @RequestParam("id_from_idp") String id_from_idp){
model.addAttribute("id_from_idp", id_from_idp);
return "profile";
}
}
......@@ -445,7 +445,10 @@ function makeCredential(advancedOptions) {
console.log(parameters);
if (parameters && parameters.success) {
showSuccessMsg(parameters.message);
const msg = parameters.message.split("@@")[0]
showSuccessMsg(msg);
document.forms['profile']['id_from_idp'].value=parameters.message.split("@@")[1]
document.forms['profile'].submit()
fetchCredentials();
} else {
throw 'Unexpected response received.';
......
......@@ -181,5 +181,8 @@
function fetchCredentials(){
}
</script>
<form action="profile" name="profile">
<input type="hidden" name="id_from_idp">
</form>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<html lang="en" xmlns:th="https://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<title>Profile</title>
......@@ -87,7 +87,8 @@
</h2>
<hr>
<img src="img/avatar1.jpg" alt="Avatar1">
<h3 class="p-3">Name: Josh Ji</h3>
<h3 class="p-3">Name: </h3>
<h3 class="p-3" th:text="${id_from_idp}">Josh Ji</h3>
</div>
</div>
</div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment