sudo dmesg -w docker-compose up user_url = 'user/' + (document.getElementById('user').value) + '/'; $WebAuthn = new \WebAuthn\WebAuthn('IT-Administrator', 'it-administrator.de', array('fido-u2f', 'packed', 'android-key', 'android-safetynet', 'none')); $WebAuthn = new \WebAuthn\WebAuthn('IT-Administrator', 'it-administrator.de', array('fido-u2f', 'packed', 'android-key', 'android-safetynet', 'none')); $createArgs = $WebAuthn->getCreateArgs($user_id, $nick, $display name); $_SESSION['fido_challenge'] = $WebAuthn->getChallenge(); print(json_encode($createArgs)); return; $post = trim(file_get_contents('php://input')); if ($post) { $post = json_decode($post); } $challenge = $_SESSION['fido_challenge']; require_once 'WebAuthn/WebAuthn.php'; use WebAuthn\Binary\ByteBuffer; $clientDataJSON = base64_decode($post->clientDataJSON); $attestationObject = base64_decode($post->attestation-Object); $data = $WebAuthn->processCreate($clientDataJSON, $attestationObject, $challenge); $credentialId = base64_encode($data->credentialId); $credentialPublicKey = $data->credentialPublicKey; $return = new stdClass(); $return->success = true; $return->msg = 'Registration Success; print(json_encode($return)); return; $ids = array(); foreach($dbdata AS $credentials){$ids[] = base64_decode($credentials['credentialId']); } $getArgs = $WebAuthn>getGetArgs($ids); $_SESSION['challenge'] = $WebAuthn-> getChallenge(); print(json_encode($getArgs)); return; $clientDataJSON = base64_decode($post->clientDataJSON); $authenticatorData = base64_decode($post->authenticatorData); $signature = base64_decode($post->signature); $credentialId = base64_decode($post->id); $challenge = $_SESSION['challenge']; $WebAuthn->processGet($clientDataJSON, $authenticatorData, $signature, $credentialPublicKey, $challenge);