Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
RadovanTomik committed Jan 12, 2024
2 parents e9d53f9 + 3c25c0a commit ade3d53
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 8 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
29 changes: 24 additions & 5 deletions src/components/NegotiationForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -81,16 +81,31 @@
</div>
</div>
</div>
<div v-if="section.description" class="mb-4 d-flex justify-content-end">
<div class="dropdown mx-2">
<i data-bs-toggle="dropdown"
aria-expanded="false" class="bi bi-info-circle"/>
<div class="dropdown-menu p-3 text-body-secondary">
<p> {{section.description}} </p>
</div>
</div>
</div>
<div
v-for="criteria in section.accessCriteria"
:key="criteria.name"
class="mb-4 mx-3"
>
<label
class="form-label"
:class="{ required: criteria.required }"
>{{ criteria.label }}
</label>
<label class="form-label" :class="{ required: criteria.required }">
{{ criteria.label }}
</label>

<span v-if="criteria.description" class="dropdown mx-2">
<i data-bs-toggle="dropdown" aria-expanded="false" class="bi bi-info-circle" />
<div class="dropdown-menu p-3 text-body-secondary">
<p> {{criteria.description}} </p>
</div>
</span>

<textarea
v-if="criteria.type === 'textarea'"
v-model="negotiationCriteria[section.name][criteria.name]"
Expand Down Expand Up @@ -288,4 +303,8 @@ export default {
.form-step {
height: 32rem;
}
.bi:hover {
color: #7c7c7c;
}
</style>
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 ade3d53

Please sign in to comment.