aboutsummaryrefslogtreecommitdiff
path: root/API/Extensions/ConfigureJWT.cs
diff options
context:
space:
mode:
authortranstrike <transtrike@gmail.com>2020-12-12 18:14:08 +0200
committertranstrike <transtrike@gmail.com>2020-12-12 18:14:08 +0200
commit68836192e1138e2590cbde0c8110507b59ebeed1 (patch)
tree1385c625d5c2b4991044817f7d906433f31f1fd5 /API/Extensions/ConfigureJWT.cs
parent64e02c270d2911e85ea82b601e2aa251400fbcd0 (diff)
downloadDevHive-68836192e1138e2590cbde0c8110507b59ebeed1.tar
DevHive-68836192e1138e2590cbde0c8110507b59ebeed1.tar.gz
DevHive-68836192e1138e2590cbde0c8110507b59ebeed1.zip
New ValidationString implementation; Simplified PictureProfile
Diffstat (limited to 'API/Extensions/ConfigureJWT.cs')
-rw-r--r--API/Extensions/ConfigureJWT.cs12
1 files changed, 9 insertions, 3 deletions
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<JWTOptions>(
- 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 =>
{