main #33
@@ -1,6 +1,6 @@
|
|||||||
.center-frame {
|
.center-frame {
|
||||||
margin: 0 200px;
|
margin: 0 auto;
|
||||||
width: calc(100% - 400px);
|
max-width: 1400px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.center-text {
|
.center-text {
|
||||||
|
|||||||
@@ -46,13 +46,12 @@ h1 {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.resume-section {
|
.resume-section {
|
||||||
break-inside: avoid;
|
|
||||||
background-color: #DDDDDD;
|
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.resume-sub-section {
|
.resume-sub-section {
|
||||||
border: 1px solid #666666;
|
border: 1px solid #666666;
|
||||||
|
break-inside: avoid;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+14
-7
@@ -91,16 +91,23 @@ if (IPayment._PaymentType == PaymentType.StripeIntent) {
|
|||||||
RsaSecurityKey? PublicKey = null;
|
RsaSecurityKey? PublicKey = null;
|
||||||
using (HttpClient client = new HttpClient()) {
|
using (HttpClient client = new HttpClient()) {
|
||||||
while (PublicKey == null) {
|
while (PublicKey == null) {
|
||||||
HttpResponseMessage PublicKeyResponse = await client.GetAsync("https://auth.mistox.com/api/auth/publickey");
|
try {
|
||||||
if (PublicKeyResponse.IsSuccessStatusCode) {
|
HttpResponseMessage PublicKeyResponse = await client.GetAsync("https://auth.mistox.com/api/auth/publickey");
|
||||||
string publicKey = await PublicKeyResponse.Content.ReadAsStringAsync();
|
if (PublicKeyResponse.IsSuccessStatusCode) {
|
||||||
RSA rsa = RSA.Create();
|
string publicKey = await PublicKeyResponse.Content.ReadAsStringAsync();
|
||||||
rsa.ImportFromPem(publicKey);
|
RSA rsa = RSA.Create();
|
||||||
PublicKey = new RsaSecurityKey(rsa);
|
rsa.ImportFromPem(publicKey);
|
||||||
} else {
|
PublicKey = new RsaSecurityKey(rsa);
|
||||||
|
} else {
|
||||||
|
await Task.Delay(2000); // sleep the main thread for 2 seconds before sending another request. Prevent DDOS of my own equiptment
|
||||||
|
Console.WriteLine("auth.mistox.com returned error code: " + PublicKeyResponse.StatusCode);
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
await Task.Delay(2000); // sleep the main thread for 2 seconds before sending another request. Prevent DDOS of my own equiptment
|
await Task.Delay(2000); // sleep the main thread for 2 seconds before sending another request. Prevent DDOS of my own equiptment
|
||||||
|
Console.WriteLine("Error loading public key: " + e.InnerException?.Message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Console.WriteLine("PublicKey loaded");
|
||||||
}
|
}
|
||||||
|
|
||||||
builder.Services.AddAuthentication(options => {
|
builder.Services.AddAuthentication(options => {
|
||||||
|
|||||||
Reference in New Issue
Block a user