Skip to content

Commit

Permalink
Merge pull request #73 from BBMRI-ERIC/fix/update_oidc_settings
Browse files Browse the repository at this point in the history
fix: update OIDC settings
  • Loading branch information
RadovanTomik authored Jan 12, 2024
2 parents 7f74088 + 3c40054 commit 3c25c0a
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 3 deletions.
4 changes: 2 additions & 2 deletions oidc_mock/config/clients.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[
{
"ClientId": "client-credentials-mock-client",
"Description": "Client for client credentials flow",
"Description": "Client for authorization code flow",
"ClientSecrets": ["authorization-code-with-pkce-client-secret"],
"AllowedGrantTypes": ["authorization_code"],
"AllowAccessTokensViaBrowser": true,
"RedirectUris": ["http://localhost:8080/logged-in"],
"AllowedScopes": ["openid", "profile", "email", "permissions"],
"AllowedScopes": ["openid", "profile", "email", "permissions", "some-app-scope-1"],
"IdentityTokenLifetime": 36000,
"AccessTokenLifetime": 3600,
"ClientClaimsPrefix": ""
Expand Down
10 changes: 10 additions & 0 deletions oidc_mock/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,16 @@ services:
{
"AutomaticRedirectAfterSignOut": true
}
API_SCOPES_INLINE: |
- Name: some-app-scope-1
- Name: some-app-scope-2
API_RESOURCES_INLINE: |
- Name: https://negotiator.bbmri-eric.eu
Scopes:
- some-app-scope-1
- some-app-scope-2
ApiSecrets:
- negotiator-secret
IDENTITY_RESOURCES_PATH: /config/identity-resources.json
USERS_CONFIGURATION_INLINE: |
[
Expand Down
4 changes: 3 additions & 1 deletion src/config/oidc.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ const devSettings = {
redirectUri: "http://localhost:8080/logged-in",
postLogoutRedirectUri: "http://localhost:8080",
responseType: "code",
scope: "openid profile email permissions",
resource: "https://negotiator.bbmri-eric.eu",
scope: "openid profile email permissions some-app-scope-1",
automaticSilentRenew: true
}

Expand All @@ -14,6 +15,7 @@ const prodSettings = {
clientId: "CLIENT_ID_PLACEHOLDER",
redirectUri: "REDIRECT_URI_PLACEHOLDER",
postLogoutRedirectUri: "LOGOUT_URI_PLACEHOLDER",
resource: "RESOURCES_PLACEHOLDER",
responseType: "code",
scope: "openid profile email offline_access eduperson_entitlement",
automaticSilentRenew: true
Expand Down
1 change: 1 addition & 0 deletions start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ do
sed -i 's|CLIENT_ID_PLACEHOLDER|'${CLIENT_ID}'|g' $file
sed -i 's|REDIRECT_URI_PLACEHOLDER|'${REDIRECT_URI}'|g' $file
sed -i 's|LOGOUT_URI_PLACEHOLDER|'${LOGOUT_URI}'|g' $file
sed -i 's|RESOURCES_PLACEHOLDER|'${API_RESOURCES}'|g' $file

done

Expand Down

0 comments on commit 3c25c0a

Please sign in to comment.