diff --git a/.github/workflows/dockerimage.yml b/.github/workflows/dockerimage.yml new file mode 100644 index 0000000..909085f --- /dev/null +++ b/.github/workflows/dockerimage.yml @@ -0,0 +1,29 @@ +name: Docker Image CI + +on: [push] + +jobs: + + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v1 + + - name: Login to docker hub + if: success() + uses: actions-hub/docker/login@master + env: + DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} + DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} + + - name: Build image + if: success() + run: docker build -t neothor/steam-open-id:${IMAGE_TAG} . + + - name: Push to docker registry + if: success() + uses: actions-hub/docker@master + with: + args: push neothor/steam-open-id:${IMAGE_TAG} \ No newline at end of file diff --git a/README.md b/README.md index 0570325..97bad60 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,8 @@ # Steam OpenId Connect Provider Steam OpenID 2.0 -> OpenID Connect Provider Proxy +![](https://github.com/neothor/steam-openid-connect-provider/workflows/Docker%20Image%20CI/badge.svg) + ## About Steam still uses the old OpenID 2.0 authentication protocol. Since ImperialPlugins.com has migrated to KeyCloak we were unable to migrate our old Steam logins as KeyCloak does not support OpenID 2.0. @@ -23,7 +25,7 @@ After that set up your redirect URI, ClientID and ClientSecret in the appsetting This service contains a health check endpoint at `/health`. It checks if the Steam login server is up. ## Docker -[A docker image](https://hub.docker.com/r/imperialplugins/steam-openid-connect-provider) is also available. +[A docker image](https://hub.docker.com/r/neothor/steam-open-id) is also available. ``` docker run -it \ diff --git a/src/Startup.cs b/src/Startup.cs index 146e59d..a562c62 100644 --- a/src/Startup.cs +++ b/src/Startup.cs @@ -41,7 +41,11 @@ namespace SteamOpenIdConnectProvider options.UserInteraction.LoginUrl = "/ExternalLogin"; }) .AddAspNetIdentity() - .AddInMemoryClients(IdentityServerConfig.GetClients(Configuration["OpenID:ClientID"], Configuration["OpenID:ClientSecret"], Configuration["OpenID:RedirectUri"], Configuration["OpenID:PostLogoutRedirectUri"])) + .AddInMemoryClients(IdentityServerConfig.GetClients( + Configuration["OpenID:ClientID"], + Configuration["OpenID:ClientSecret"], + Configuration["OpenID:RedirectUri"], + Configuration["OpenID:PostLogoutRedirectUri"])) .AddInMemoryPersistedGrants() .AddDeveloperSigningCredential(true) .AddInMemoryIdentityResources(IdentityServerConfig.GetIdentityResources()); @@ -63,6 +67,11 @@ namespace SteamOpenIdConnectProvider app.UseDeveloperExceptionPage(); } + if (!string.IsNullOrEmpty(Configuration["Hosting:PathBase"])) + { + app.UsePathBase(Configuration["Hosting:PathBase"]); + } + app.UseRouting(); app.UseIdentityServer(); app.UseEndpoints(endpoints => diff --git a/src/appsettings.Development.json b/src/appsettings.Development.json index e203e94..9988482 100644 --- a/src/appsettings.Development.json +++ b/src/appsettings.Development.json @@ -5,5 +5,8 @@ "System": "Information", "Microsoft": "Information" } + }, + "Hosting": { + "PathBase": "/test" } } diff --git a/src/appsettings.json b/src/appsettings.json index 5ea4b94..5582ca6 100644 --- a/src/appsettings.json +++ b/src/appsettings.json @@ -10,5 +10,8 @@ "RedirectUri": "http://localhost:8080/auth/realms/master/broker/steam/endpoint", "PostLogoutRedirectUri": "" }, - "AllowedHosts": "*" + "AllowedHosts": "*", + "Hosting": { + "PathBase": "" + } } \ No newline at end of file