Skip to content

Commit

Permalink
chore: pr cleanup
Browse files Browse the repository at this point in the history
Signed-off-by: Pat Losoponkul <pat.losoponkul@iohk.io>
  • Loading branch information
Pat Losoponkul committed Oct 16, 2023
1 parent f8cc424 commit 992f08b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@ lazy val D = new {
val circeGeneric: ModuleID = "io.circe" %% "circe-generic" % V.circe
val circeParser: ModuleID = "io.circe" %% "circe-parser" % V.circe

val jwtCirce = "com.github.jwt-scala" %% "jwt-circe" % V.jwtCirceVersion

// https://mvnrepository.com/artifact/org.didcommx/didcomm/0.3.2
val didcommx: ModuleID = "org.didcommx" % "didcomm" % "0.3.1"
val peerDidcommx: ModuleID = "org.didcommx" % "peerdid" % "0.3.0"
Expand Down Expand Up @@ -272,8 +274,6 @@ lazy val D_Pollux_VC_JWT = new {
.exclude("io.circe", "circe-generic_2.13")
.exclude("io.circe", "circe-parser_2.13")

val jwtCirce = "com.github.jwt-scala" %% "jwt-circe" % V.jwtCirceVersion

val zio = "dev.zio" %% "zio" % V.zio
val zioPrelude = "dev.zio" %% "zio-prelude" % V.zioPreludeVersion

Expand All @@ -289,7 +289,7 @@ lazy val D_Pollux_VC_JWT = new {
val zioDependencies: Seq[ModuleID] = Seq(zio, zioPrelude, zioTest, zioTestSbt, zioTestMagnolia)
val circeDependencies: Seq[ModuleID] = Seq(D.circeCore, D.circeGeneric, D.circeParser)
val baseDependencies: Seq[ModuleID] =
circeDependencies ++ zioDependencies :+ jwtCirce :+ circeJsonSchema :+ networkntJsonSchemaValidator :+ D.nimbusJwt :+ scalaTest
circeDependencies ++ zioDependencies :+ D.jwtCirce :+ circeJsonSchema :+ networkntJsonSchemaValidator :+ D.nimbusJwt :+ scalaTest

// Project Dependencies
lazy val polluxVcJwtDependencies: Seq[ModuleID] = baseDependencies
Expand Down Expand Up @@ -380,7 +380,7 @@ lazy val D_PrismAgent = new {
lazy val keyManagementDependencies: Seq[ModuleID] =
baseDependencies ++ bouncyDependencies ++ D.doobieDependencies ++ Seq(D.zioCatsInterop, D.zioMock, vaultDriver)

lazy val iamDependencies: Seq[ModuleID] = Seq(keycloakAuthz, D_Pollux_VC_JWT.jwtCirce) // TODO: cleanup
lazy val iamDependencies: Seq[ModuleID] = Seq(keycloakAuthz, D.jwtCirce)

lazy val serverDependencies: Seq[ModuleID] =
baseDependencies ++ tapirDependencies ++ postgresDependencies ++ Seq(D.zioMock, D.mockito)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ final case class AgentConfig(
defaultWallet: DefaultWalletConfig
) {
def validate: Either[String, Unit] = {
if (!defaultWallet.enabled && !authentication.isEnabledExcludingAdmin)
if (!defaultWallet.enabled && !authentication.isEnabledAny)
Left(
"The default wallet must be enabled if all the authentication methods are disabled. Default wallet is required for the single-tenant mode."
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ final case class AuthenticationConfig(
) {

/** Return true if at least 1 authentication method is enabled (exlcuding admin auth method) */
def isEnabledExcludingAdmin: Boolean = apiKey.enabled || keycloak.enabled
def isEnabledAny: Boolean = apiKey.enabled || keycloak.enabled

}

0 comments on commit 992f08b

Please sign in to comment.