From 68836192e1138e2590cbde0c8110507b59ebeed1 Mon Sep 17 00:00:00 2001 From: transtrike Date: Sat, 12 Dec 2020 18:14:08 +0200 Subject: New ValidationString implementation; Simplified PictureProfile --- API/Extensions/ConfigureJWT.cs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'API/Extensions/ConfigureJWT.cs') diff --git a/API/Extensions/ConfigureJWT.cs b/API/Extensions/ConfigureJWT.cs index 1de2aa5..22ada98 100644 --- a/API/Extensions/ConfigureJWT.cs +++ b/API/Extensions/ConfigureJWT.cs @@ -12,11 +12,17 @@ namespace API.Extensions { public static void JWTConfiguration(this IServiceCollection services, IConfiguration configuration) { - services.AddSingleton( - new JWTOptions(configuration.GetSection("AppSettings").GetSection("Secret").Value)); + services.AddSingleton(new JWTOptions(configuration + .GetSection("AppSettings") + .GetSection("Secret") + .Value)); // Get key from appsettings.json - var key = Encoding.ASCII.GetBytes(configuration.GetSection("AppSettings").GetSection("Secret").Value); + var key = Encoding.ASCII.GetBytes(configuration + .GetSection("AppSettings") + .GetSection("Secret") + .Value); + // Setup Jwt Authentication services.AddAuthentication(x => { -- cgit v1.2.3