March 2018
Beginner to intermediate
410 pages
10h 40m
English
The Waher.Security.JWT.UWP library also contains the JwtAuthentication class that authenticates web requests based on JWT tokens. We first need to define a variable for it:
private JwtAuthentication tokenAuthentication;
When we've established the device identity, which we will use as a realm, we create an instance of this authenticator (the realm allows browsers to isolate credentials between sites):
this.tokenAuthentication = new JwtAuthentication(this.deviceId, this.users, this.tokenFactory);
The authenticator references our users database to check that subjects match users in the database. It also references the token factory to validate that tokens are correctly signed. We then simply add the reference to the authenticator ...
Read now
Unlock full access