File tree 1 file changed +7
-0
lines changed
1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -101,6 +101,8 @@ docker compose up --wait
101
101
"PublicKey" : " PUBLIC_KEY" ,
102
102
"Issuer" : " https://localhost:8001" ,
103
103
"Audience" : " http://localhost:5010" ,
104
+ "DataProtectionApplicationName" : " microidp" ,
105
+ "DataProtectionKeysPath" : " ./DataProtectionKeys" ,
104
106
"CookieName" : " SAME AS IDP .env Jwt__CookieName" ,
105
107
"DataProtectionPurpose" : " SAME AS IDP .env Jwt__DataProtectionPurpose"
106
108
}
@@ -117,6 +119,11 @@ dotnet add package Microsoft.AspNetCore.Authentication.JwtBearer
117
119
### Add Authentication Middleware
118
120
119
121
``` csharp
122
+
123
+ services .AddDataProtection ()
124
+ .PersistKeysToFileSystem (new DirectoryInfo (configuration [" Jwt:DataProtectionKeysPath" ] ?? " " ))
125
+ .SetApplicationName (configuration [" Jwt:DataProtectionApplicationName" ] ?? " " );
126
+
120
127
var rsa = RSA .Create ();
121
128
rsa .ImportRSAPublicKey (Convert .FromBase64String (configuration [" Jwt:PublicKey" ] ?? " " ), out _ );
122
129
You can’t perform that action at this time.
0 commit comments