Skip to content

Commit

Permalink
Merge pull request #4323 from nationalarchives/TDRD-319-upgrade-keycl…
Browse files Browse the repository at this point in the history
…oak-js-v26

Tdrd 319 upgrade keycloak js v26
  • Loading branch information
TomJKing authored Dec 9, 2024
2 parents bf31b60 + 3056c19 commit 673f669
Show file tree
Hide file tree
Showing 21 changed files with 509 additions and 1,521 deletions.
5 changes: 4 additions & 1 deletion app/configuration/ApplicationConfig.scala
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ class ApplicationConfig @Inject() (configuration: Configuration) {
get("consignmentapi.url"),
get("environment"),
get("region"),
get("upload.url")
get("upload.url"),
get("auth.url"),
get("auth.clientId"),
get("auth.realm")
)

val numberOfItemsOnViewTransferPage: Int = configuration.get[Int]("viewTransfers.numberOfItemsPerPage")
Expand Down
3 changes: 3 additions & 0 deletions app/views/partials/frontEndInputs.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,6 @@
<input type="hidden" class="stage" value="@frontEndInfo.stage">
<input type="hidden" class="region" value="@frontEndInfo.region">
<input type="hidden" class="upload-url" value="@frontEndInfo.uploadUrl">
<input type="hidden" class="auth-url" value="@frontEndInfo.authUrl">
<input type="hidden" class="client-id" value="@frontEndInfo.clientId">
<input type="hidden" class="realm" value="@frontEndInfo.realm">
5 changes: 4 additions & 1 deletion app/viewsapi/FrontEndInfo.scala
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,8 @@ case class FrontEndInfo(
apiUrl: String,
stage: String,
region: String,
uploadUrl: String
uploadUrl: String,
authUrl: String,
clientId: String,
realm: String
)
2 changes: 2 additions & 0 deletions conf/application.base.conf
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ pekko.actor.warn-about-java-serializer-usage = "off"
auth.secret = ${AUTH_SECRET}
read.auth.secret = ${READ_AUTH_SECRET}
auth.url=${AUTH_URL}
auth.clientId="tdr-fe"
auth.realm="tdr"

consignmentapi.url = ${consignmentapi.domain}"/graphql"

Expand Down
7 changes: 7 additions & 0 deletions npm/babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module.exports = {
env: {
test: {
plugins: ["@babel/plugin-transform-modules-commonjs"]
}
}
}
4 changes: 4 additions & 0 deletions npm/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,9 @@ module.exports = {
API_URL: true,
STAGE: "stage",
REGION: "region"
},
transformIgnorePatterns: ["<rootDir>/node_modules/(?!keycloak-js)/"],
transform: {
"^.+\\.[j]sx?$": "babel-jest"
}
}
Loading

0 comments on commit 673f669

Please sign in to comment.