refact and login
This commit is contained in:
parent
acc34aeee4
commit
e042e34bf7
78 changed files with 2492 additions and 50576 deletions
|
|
@ -12,7 +12,7 @@ namespace Yavsc.Helpers
|
|||
string siren, CompanyInfoSettings api)
|
||||
{
|
||||
using (var request = new HttpRequestMessage(HttpMethod.Get,
|
||||
string.Format(ServerConstants.CompanyInfoUrl,siren,api.ApiKey))) {
|
||||
string.Format(ServerConstants.CompanyInfoUrlFormat,siren,api.ApiKey))) {
|
||||
using (var response = await web.SendAsync(request)) {
|
||||
var payload = JObject.Parse(await response.Content.ReadAsStringAsync());
|
||||
return payload.ToObject<CompanyInfoMessage>();
|
||||
|
|
|
|||
21
src/Yavsc.Server/Helpers/Configuration.cs
Normal file
21
src/Yavsc.Server/Helpers/Configuration.cs
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
|
||||
namespace Yavsc.Server.Helpers;
|
||||
|
||||
public static class ConfigurationHelpers
|
||||
|
||||
{
|
||||
public static string GetAuthority(this WebApplicationBuilder builder)
|
||||
{
|
||||
return builder.Configuration.GetSection("Site")
|
||||
.GetValue<string>("Authority");
|
||||
}
|
||||
public static string GetAudience(this WebApplicationBuilder builder)
|
||||
{
|
||||
return builder.Configuration.GetSection("Site")
|
||||
.GetValue<string>("Audience");
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue