From 50c257ea8397b3ee77b9c080f9351abcd7eb3acb Mon Sep 17 00:00:00 2001 From: Aman Date: Sat, 18 Nov 2017 22:27:10 +0000 Subject: [PATCH] Updated readme --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 3c6fee0..d63cba6 100644 --- a/README.md +++ b/README.md @@ -20,9 +20,9 @@ The signing key can be any sufficiently unique minimum 23-character long string DO NOT expose this key outside of the server, best practice would be to store this key securely (for e.g. in Azure Key Vault or a similar service) -Startup.cs: +## Startup.cs: -## Enable authentication +### Enable authentication public void Configure(IApplicationBuilder app, IHostingEnvironment env) { @@ -38,7 +38,7 @@ public void Configure(IApplicationBuilder app, IHostingEnvironment env) }); } -## Add required services: +### Add required services: public void ConfigureServices(IServiceCollection services) { @@ -88,7 +88,7 @@ public void ConfigureServices(IServiceCollection services) services.AddMvc(); } -## Add the appropriate dependencies in the auth controller: +### Add the appropriate dependencies in the auth controller: Please see the AccountController.cs file in the reference project to see how the token generator is used to issue access tokens after a successful authentication attempt. The issued JWT will contain all the claims about the user in addition to the default JWT claims. For subsequent requests, you will be able to extract the user info (like username, first name and last name) from this token and that information will be available via the HttpContext.User