Skip to content

Commit

Permalink
Merge pull request #427 from bcgov/403-add-sso
Browse files Browse the repository at this point in the history
[FEATURE][BCMI-403] Added keycloak plugin to strapi
  • Loading branch information
raarielgrace authored Oct 24, 2024
2 parents 2ce514a + 7c4c937 commit 6ca5bf3
Show file tree
Hide file tree
Showing 8 changed files with 2,217 additions and 4,193 deletions.
6 changes: 3 additions & 3 deletions cms/.strapi-updater.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"latest": "5.0.2",
"lastUpdateCheck": 1727893933240,
"lastNotification": 1727454524118
"latest": "5.1.0",
"lastUpdateCheck": 1729621435338,
"lastNotification": 1729535011105
}
2 changes: 2 additions & 0 deletions cms/.strapi/client/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* Any modifications made will be discarded.
*/
import ckeditor5 from "@_sh/strapi-plugin-ckeditor/strapi-admin";
import strapiPluginSso from "@chordata-insight/strapi-plugin-sso/strapi-admin";
import strapiCloud from "@strapi/plugin-cloud/strapi-admin";
import graphql from "@strapi/plugin-graphql/strapi-admin";
import i18N from "@strapi/plugin-i18n/strapi-admin";
Expand All @@ -16,6 +17,7 @@ renderAdmin(document.getElementById("strapi"), {

plugins: {
ckeditor5: ckeditor5,
"strapi-plugin-sso": strapiPluginSso,
"strapi-cloud": strapiCloud,
graphql: graphql,
i18n: i18N,
Expand Down
1 change: 1 addition & 0 deletions cms/config/middlewares.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ export default [
'strapi::session',
'strapi::favicon',
'strapi::public',
{resolve: './src/middlewares/admin-redirect'},
];
19 changes: 17 additions & 2 deletions cms/config/plugins.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,24 @@
export default () => ({
export default ({ env }) => ({
graphql: {
enabled: true,
config: {
defaultLimit: 50,
maxLimit: 100
}
}
},
'strapi-plugin-sso': {
enabled: true,
config: {
// Keycloak
KEYCLOAK_DOMAIN: env('KEYCLOAK_URL'),
KEYCLOAK_REALM: env('KEYCLOAK_REALM'),
KEYCLOAK_CLIENT_ID: env('KEYCLOAK_CLIENT_ID'),
KEYCLOAK_CLIENT_SECRET: env('KEYCLOAK_CLIENT_SECRET'),
KEYCLOAK_REDIRECT_URI: 'http://localhost:1337/strapi-plugin-sso/keycloak/callback',
KEYCLOAK_STRAPI_SUPER_ADMIN_ROLE: 'strapi.super_admin',
KEYCLOAK_STRAPI_EDITOR_ROLE: 'strapi.editor',
KEYCLOAK_STRAPI_AUTHOR_ROLE: 'strapi.author',
KEYCLOAK_REQUIRE_EMAIL_VERIFICATION: false,
},
},
});
Loading

0 comments on commit 6ca5bf3

Please sign in to comment.