Merge pull request #3 from neothor/master

Merge from neothor for better reverse proxy support
This commit is contained in:
Enes Sadık Özbek 2020-07-12 14:44:41 +03:00 committed by GitHub
commit 4e61ce3a61
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 49 additions and 3 deletions

29
.github/workflows/dockerimage.yml vendored Normal file
View file

@ -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}

View file

@ -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 \

View file

@ -41,7 +41,11 @@ namespace SteamOpenIdConnectProvider
options.UserInteraction.LoginUrl = "/ExternalLogin";
})
.AddAspNetIdentity<IdentityUser>()
.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 =>

View file

@ -5,5 +5,8 @@
"System": "Information",
"Microsoft": "Information"
}
},
"Hosting": {
"PathBase": "/test"
}
}

View file

@ -10,5 +10,8 @@
"RedirectUri": "http://localhost:8080/auth/realms/master/broker/steam/endpoint",
"PostLogoutRedirectUri": ""
},
"AllowedHosts": "*"
"AllowedHosts": "*",
"Hosting": {
"PathBase": ""
}
}