mirror of
https://github.com/byo-software/steam-openid-connect-provider.git
synced 2025-01-08 09:36:21 +00:00
Added request logging to see the actual requests to the SteamOpenIdConnectProvider
Fixed config variable names Updated Player with strings instead of ulong
This commit is contained in:
parent
8cbd103532
commit
c12ce382d8
8 changed files with 15 additions and 39 deletions
1
.gitattributes
vendored
1
.gitattributes
vendored
|
@ -2,6 +2,7 @@
|
|||
# Set default behavior to automatically normalize line endings.
|
||||
###############################################################################
|
||||
* text=auto
|
||||
*.sh text eol=lf
|
||||
|
||||
###############################################################################
|
||||
# Set default behavior for command prompt diff.
|
||||
|
|
|
@ -1,22 +1,3 @@
|
|||
# Create the file docker-compose.secrets.yml and add
|
||||
# ```
|
||||
# version: '2'
|
||||
# services:
|
||||
# proxy:
|
||||
# volumes:
|
||||
# - "<your-certs>/dev.local.crt:/tmp/dev.local.crt"
|
||||
# - "<your-certs>/dev.local.key:/tmp/dev.local.key"
|
||||
#
|
||||
# keycloak:
|
||||
# volumes:
|
||||
# - "<your-certs>/dev.local.crt:/tmp/dev.local.crt"
|
||||
#
|
||||
# steamidp:
|
||||
# environment:
|
||||
# Steam__ApplicationKey: <your-app-key>
|
||||
# ```
|
||||
#
|
||||
# Than start with `docker compose -f .\docker-compose.yml -f .\docker-compose.secrets.yml up`
|
||||
version: '2'
|
||||
volumes:
|
||||
postgres_data:
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System.Text.Json;
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace SteamOpenIdConnectProvider.Profile.Models
|
||||
|
@ -6,7 +6,7 @@ namespace SteamOpenIdConnectProvider.Profile.Models
|
|||
public sealed class Player
|
||||
{
|
||||
[JsonPropertyName("steamid")]
|
||||
public ulong SteamId { get; set; }
|
||||
public string SteamId { get; set; }
|
||||
|
||||
[JsonPropertyName("communityvisibilitystate")]
|
||||
public int CommunityVisibilityState { get; set; }
|
||||
|
@ -45,7 +45,7 @@ namespace SteamOpenIdConnectProvider.Profile.Models
|
|||
public string RealName { get; set; }
|
||||
|
||||
[JsonPropertyName("primaryclanid")]
|
||||
public ulong PrimaryClanId { get; set; }
|
||||
public string PrimaryClanId { get; set; }
|
||||
|
||||
[JsonPropertyName("timecreated")]
|
||||
public int TimeCreated { get; set; }
|
||||
|
@ -56,4 +56,4 @@ namespace SteamOpenIdConnectProvider.Profile.Models
|
|||
[JsonPropertyName("loccountrycode")]
|
||||
public string LocCountryCode { get; set; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,6 +9,6 @@ namespace SteamOpenIdConnectProvider.Domains.Steam
|
|||
{
|
||||
public static readonly string Key = "Steam";
|
||||
|
||||
public string ApplicationKey { get; internal set; }
|
||||
public string ApplicationKey { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,8 +15,9 @@ namespace SteamOpenIdConnectProvider
|
|||
.MinimumLevel.Override("Microsoft", LogEventLevel.Warning)
|
||||
.MinimumLevel.Override("System", LogEventLevel.Warning)
|
||||
.MinimumLevel.Override("Microsoft.AspNetCore.Authentication", LogEventLevel.Information)
|
||||
.MinimumLevel.Override("Microsoft.AspNetCore", LogEventLevel.Warning)
|
||||
.Enrich.FromLogContext()
|
||||
.WriteTo.Console(outputTemplate: "[{Timestamp:HH:mm:ss} {Level}] {SourceContext}{NewLine}{Message:lj}{NewLine}{Exception}{NewLine}", theme: AnsiConsoleTheme.Literate)
|
||||
.WriteTo.Console()
|
||||
.CreateLogger();
|
||||
|
||||
CreateWebHostBuilder(args).Build().Run();
|
||||
|
|
|
@ -16,6 +16,9 @@ using SteamOpenIdConnectProvider.Models.IdentityServer;
|
|||
using SteamOpenIdConnectProvider.Domains.Common;
|
||||
using SteamOpenIdConnectProvider.Domains.IdentityServer;
|
||||
using SteamOpenIdConnectProvider.Domains.Steam;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using Serilog;
|
||||
|
||||
namespace SteamOpenIdConnectProvider
|
||||
{
|
||||
|
@ -87,6 +90,8 @@ namespace SteamOpenIdConnectProvider
|
|||
app.UsePathBase(hostingConfig.BasePath);
|
||||
}
|
||||
|
||||
app.UseSerilogRequestLogging();
|
||||
|
||||
app.UseCookiePolicy();
|
||||
app.Use(async (ctx, next) =>
|
||||
{
|
||||
|
|
|
@ -1,12 +1,5 @@
|
|||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Debug",
|
||||
"System": "Information",
|
||||
"Microsoft": "Information"
|
||||
}
|
||||
},
|
||||
"Hosting": {
|
||||
"PathBase": "/steam"
|
||||
"BasePath": "/steam"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Warning"
|
||||
}
|
||||
},
|
||||
"AllowedHosts": "*",
|
||||
"OpenID": {
|
||||
"ClientID": "keycloak",
|
||||
|
@ -13,7 +8,7 @@
|
|||
"PostLogoutRedirectUri": ""
|
||||
},
|
||||
"Hosting": {
|
||||
"PathBase": ""
|
||||
"BasePath": ""
|
||||
},
|
||||
"Steam": {
|
||||
"ApplicationKey": "secret"
|
||||
|
|
Loading…
Reference in a new issue