mirror of
https://github.com/byo-software/steam-openid-connect-provider.git
synced 2025-01-09 18:06:22 +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.
|
# Set default behavior to automatically normalize line endings.
|
||||||
###############################################################################
|
###############################################################################
|
||||||
* text=auto
|
* text=auto
|
||||||
|
*.sh text eol=lf
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# Set default behavior for command prompt diff.
|
# 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'
|
version: '2'
|
||||||
volumes:
|
volumes:
|
||||||
postgres_data:
|
postgres_data:
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
using System.Text.Json;
|
using System.Text.Json;
|
||||||
using System.Text.Json.Serialization;
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
namespace SteamOpenIdConnectProvider.Profile.Models
|
namespace SteamOpenIdConnectProvider.Profile.Models
|
||||||
|
@ -6,7 +6,7 @@ namespace SteamOpenIdConnectProvider.Profile.Models
|
||||||
public sealed class Player
|
public sealed class Player
|
||||||
{
|
{
|
||||||
[JsonPropertyName("steamid")]
|
[JsonPropertyName("steamid")]
|
||||||
public ulong SteamId { get; set; }
|
public string SteamId { get; set; }
|
||||||
|
|
||||||
[JsonPropertyName("communityvisibilitystate")]
|
[JsonPropertyName("communityvisibilitystate")]
|
||||||
public int CommunityVisibilityState { get; set; }
|
public int CommunityVisibilityState { get; set; }
|
||||||
|
@ -45,7 +45,7 @@ namespace SteamOpenIdConnectProvider.Profile.Models
|
||||||
public string RealName { get; set; }
|
public string RealName { get; set; }
|
||||||
|
|
||||||
[JsonPropertyName("primaryclanid")]
|
[JsonPropertyName("primaryclanid")]
|
||||||
public ulong PrimaryClanId { get; set; }
|
public string PrimaryClanId { get; set; }
|
||||||
|
|
||||||
[JsonPropertyName("timecreated")]
|
[JsonPropertyName("timecreated")]
|
||||||
public int TimeCreated { get; set; }
|
public int TimeCreated { get; set; }
|
||||||
|
|
|
@ -9,6 +9,6 @@ namespace SteamOpenIdConnectProvider.Domains.Steam
|
||||||
{
|
{
|
||||||
public static readonly string Key = "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("Microsoft", LogEventLevel.Warning)
|
||||||
.MinimumLevel.Override("System", LogEventLevel.Warning)
|
.MinimumLevel.Override("System", LogEventLevel.Warning)
|
||||||
.MinimumLevel.Override("Microsoft.AspNetCore.Authentication", LogEventLevel.Information)
|
.MinimumLevel.Override("Microsoft.AspNetCore.Authentication", LogEventLevel.Information)
|
||||||
|
.MinimumLevel.Override("Microsoft.AspNetCore", LogEventLevel.Warning)
|
||||||
.Enrich.FromLogContext()
|
.Enrich.FromLogContext()
|
||||||
.WriteTo.Console(outputTemplate: "[{Timestamp:HH:mm:ss} {Level}] {SourceContext}{NewLine}{Message:lj}{NewLine}{Exception}{NewLine}", theme: AnsiConsoleTheme.Literate)
|
.WriteTo.Console()
|
||||||
.CreateLogger();
|
.CreateLogger();
|
||||||
|
|
||||||
CreateWebHostBuilder(args).Build().Run();
|
CreateWebHostBuilder(args).Build().Run();
|
||||||
|
|
|
@ -16,6 +16,9 @@ using SteamOpenIdConnectProvider.Models.IdentityServer;
|
||||||
using SteamOpenIdConnectProvider.Domains.Common;
|
using SteamOpenIdConnectProvider.Domains.Common;
|
||||||
using SteamOpenIdConnectProvider.Domains.IdentityServer;
|
using SteamOpenIdConnectProvider.Domains.IdentityServer;
|
||||||
using SteamOpenIdConnectProvider.Domains.Steam;
|
using SteamOpenIdConnectProvider.Domains.Steam;
|
||||||
|
using System.IO;
|
||||||
|
using System.Text;
|
||||||
|
using Serilog;
|
||||||
|
|
||||||
namespace SteamOpenIdConnectProvider
|
namespace SteamOpenIdConnectProvider
|
||||||
{
|
{
|
||||||
|
@ -87,6 +90,8 @@ namespace SteamOpenIdConnectProvider
|
||||||
app.UsePathBase(hostingConfig.BasePath);
|
app.UsePathBase(hostingConfig.BasePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
app.UseSerilogRequestLogging();
|
||||||
|
|
||||||
app.UseCookiePolicy();
|
app.UseCookiePolicy();
|
||||||
app.Use(async (ctx, next) =>
|
app.Use(async (ctx, next) =>
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,12 +1,5 @@
|
||||||
{
|
{
|
||||||
"Logging": {
|
|
||||||
"LogLevel": {
|
|
||||||
"Default": "Debug",
|
|
||||||
"System": "Information",
|
|
||||||
"Microsoft": "Information"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"Hosting": {
|
"Hosting": {
|
||||||
"PathBase": "/steam"
|
"BasePath": "/steam"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,4 @@
|
||||||
{
|
{
|
||||||
"Logging": {
|
|
||||||
"LogLevel": {
|
|
||||||
"Default": "Warning"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"AllowedHosts": "*",
|
"AllowedHosts": "*",
|
||||||
"OpenID": {
|
"OpenID": {
|
||||||
"ClientID": "keycloak",
|
"ClientID": "keycloak",
|
||||||
|
@ -13,7 +8,7 @@
|
||||||
"PostLogoutRedirectUri": ""
|
"PostLogoutRedirectUri": ""
|
||||||
},
|
},
|
||||||
"Hosting": {
|
"Hosting": {
|
||||||
"PathBase": ""
|
"BasePath": ""
|
||||||
},
|
},
|
||||||
"Steam": {
|
"Steam": {
|
||||||
"ApplicationKey": "secret"
|
"ApplicationKey": "secret"
|
||||||
|
|
Loading…
Reference in a new issue