Once the server is set up, we need to get entitlements working on the client end.
Miscellany
Addendum A: Server Setup
In this posting, we’ll discuss the server setup for the demo app.
The passkey is used in two places: Registration (creating an account), and logging in. After login, the server works in the same way that most of these types of things work.
Login PassKey Code Walkthrough
Logging in is simpler, but we still have the challenge/response process, as we did with creation.
With logging in, the client doesn’t need the server to prepare to create a new account, so it just needs a challenge.
The Process of Login
Logging into a server, using an existing PassKey, is a lot simpler than creating a new account and PassKey.
Create PassKey Code Walkthrough
In our code walkthrough, we’ll look at both the client code (Swift), and the server code (PHP).
The creation process is the most code-intensive part of using PassKeys.
The Process of Creation
In order to use a PassKey, the client needs to create the key, and coordinate with the server.
We should note that this is a VERY BASIC EXAMPLE. It’s quite possible to get a lot more involved, and a lot more secure.
A Closer Look At PassKeys
This series will focus on demonstrating a simple client (iOS) and server (PHP/MySQL) implementation of the most basic type of PassKey. This app has already been written, so we’ll look at it, and walk through its operation, in order to learn about implementing PassKeys in an iOS app.
Our guide through this journey, will be a very basic, one-screen iOS app that will act as a UX to a simple CRUD server.
Why PassKeys?
Security has always been a difficult balance between usability and safety. PassKeys are a way to “bridge” these seemingly opposed concepts. They allow enhanced security between a server and a client, while also removing the need for the end-user to manage login details. The connection is more secure than that provided by the classic “User ID/Login” model, yet there is no need for the user to worry about the details.
Appendix A: The DataProvider Struct
The real heart of the demonstration app, is something that we didn’t cover at all, in the tutorial. That’s the Data Model for the app, which is in the DataProvider.swift
structural type.
It’s a fairly basic type, that consumes some CSV (Comma-Separated-Values) data, and formats it into a configuration that can drive the chart.
Adding Pinch-To-Zoom to the Chart
In this exercise, we’ll add a “pinch-to-zoom-in/out” feature to the chart. It will be very basic, but should work quite well.