PasskiDemoServer
Client for the hosted PassKi demo relying party, so you can try passkeys in your app before you have a domain or a WebAuthn server. For evaluation only: demo users expire after 24 hours and the domain is shared.
The server creates every challenge and verifies every response with SimpleWebAuthn. This class only moves JSON between it and PassKi, exactly as your own server API would:
val demo = PasskiDemoServer()
passkeys.register(demo.registrationOptions("alice"))
.onSuccess { println(demo.verifyRegistration(it.json)) } // "verified by server ✓ signCount 0 …"
passkeys.signIn(demo.authenticationOptions())
.onSuccess { println(demo.verifyAuthentication(it.json)) }The app must be associated with RP_ID: apply the Gradle plugin with passki { useDemoServer() } and run ./gradlew passkiSetup, which registers your package, signing key and iOS app ID with the demo server.
Every call throws DemoServerException when the server is unreachable or answers with an error.
Properties
Functions
POST /api/demo/login/options: WebAuthn request options, ready for Passkeys.signIn. With userHandle the server lists that user's passkeys in allowCredentials; without it any discoverable passkey is accepted.
POST /api/demo/register/options: WebAuthn creation options for a new demo user, ready for Passkeys.register.
GET /api/demo/server-config: the RP ID and every origin the demo server accepts, registered apps included.
POST /api/demo/login/verify with PasskeyAssertion.json; returns the verdict with the new sign count.
POST /api/demo/register/verify with PasskeyRegistration.json; returns the server's verdict and remembers the account. With shareFixtureAs (android, ios, web or other) the raw response is also stored on the demo server for 7 days as a PassKi contract-test fixture; leave it null unless you want to share it.