Commit 14752a87 authored by Josh Ji's avatar Josh Ji

加入詢問IDP的流程

parent 6801ea37
......@@ -12,4 +12,7 @@
</option>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8.0_221" project-jdk-type="JavaSDK" />
<component name="ProjectType">
<option name="id" value="jpab" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<module version="4">
<component name="FacetManager">
<facet type="google-app-engine" name="Google App Engine">
<configuration />
</facet>
<facet type="app-engine-standard" name="Google App Engine Standard">
<configuration />
</facet>
</component>
</module>
\ No newline at end of file
......@@ -7,7 +7,7 @@
<version>1.0-SNAPSHOT</version>
<groupId>com.google.webauthn</groupId>
<artifactId>gaedemo</artifactId>
<artifactId>webauthn-demo-josh</artifactId>
<!-- [START set_versions] -->
<properties>
......@@ -26,6 +26,13 @@
<!-- [END set_versions] -->
<dependencies>
<!--Unirest-->
<dependency>
<groupId>com.konghq</groupId>
<artifactId>unirest-java</artifactId>
<version>3.13.6</version>
<classifier>standalone</classifier>
</dependency>
<!-- Compile/runtime dependencies -->
<dependency>
<groupId>com.google.cloud</groupId>
......
......@@ -74,7 +74,6 @@ public class AttestationObject {
case "attStmt":
attStmt = attObjMap.get(key);
break;
}
}
}
......
......@@ -86,6 +86,13 @@ public class AuthenticationExtensionsClientInputs {
return keyPair;
}
public void addPrlabExtension(){
if (registrationExtensions == null) {
registrationExtensions = new JsonObject();
}
registrationExtensions.addProperty("PRLab", true);
}
/**
* @return registration extensions.
*/
......
......@@ -108,6 +108,10 @@ public class BeginMakeCredential extends HttpServlet {
storedKeyPair.save(session.getId());
} catch (Exception e) {}
/* josh start */
extensions.addPrlabExtension();
/* josh end */
optionsJson.add("extensions", extensions.getRegistrationExtensions());
response.setContentType("application/json");
......
This diff is collapsed.
......@@ -96,6 +96,7 @@ function _fetch(url, obj) {
function fetchCredentials() {
_fetch('/RegisteredKeys').then(response => {
let credentials = '';
console.log(response);
for (let i in response) {
let { handle, base64handle, publicKey, name, date, id, transports, userVerificationMethod } = response[i];
const trimmedHandle = base64handle.replace(/=/g, '');
......@@ -448,6 +449,8 @@ function getAssertion() {
const requestOptions = {};
_parameters = parameters;
console.log(parameters)
requestOptions.challenge = strToBin(parameters.challenge);
if ($('#customTimeout').value != '') {
requestOptions.timeout = $('#customTimeout').value;
......
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