• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

input-output-hk / atala-prism-building-blocks / 7756594749

02 Feb 2024 01:23PM UTC coverage: 31.526% (+0.2%) from 31.294%
7756594749

Pull #795

web-flow
Merge branch 'main' into epic/ATL-4095-revocation-for-jwt-creds
Pull Request #795: Epic - Revocation for JWT credentials (tmp title)

121 of 411 new or added lines in 25 files covered. (29.44%)

418 existing lines in 106 files now uncovered.

4175 of 13243 relevant lines covered (31.53%)

0.32 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

85.71
/shared/src/main/scala/io/iohk/atala/shared/models/MultiTenancy.scala
1
package io.iohk.atala.shared.models
2

3
import java.util.UUID
4
import scala.language.implicitConversions
5

6
opaque type WalletId = UUID
7

8
object WalletId {
1✔
9
  def fromUUID(uuid: UUID): WalletId = uuid
NEW
10

×
11
  def fromUUIDString(uuidStr: String): WalletId = UUID.fromString(uuidStr)
1✔
12
  def random: WalletId = fromUUID(UUID.randomUUID())
13

1✔
14
  def default: WalletId = fromUUID(UUID.fromString("00000000-0000-0000-0000-000000000000"))
15

1✔
16
  extension (id: WalletId) { def toUUID: UUID = id }
17
}
18

19
final case class WalletAccessContext(walletId: WalletId)
20

21
// This might eventually be unified with WalletAccessContext and introduce some scope / role.
22
// For now this is only intended for wallet admin related operations.
23
sealed trait WalletAdministrationContext {
24
  def isAuthorized(walletId: WalletId): Boolean
25
}
26

27
object WalletAdministrationContext {
28
  final case class Admin() extends WalletAdministrationContext {
1✔
29
    def isAuthorized(walletId: WalletId): Boolean = true
30
  }
31
  final case class SelfService(permittedWallets: Seq[WalletId]) extends WalletAdministrationContext {
1✔
32
    def isAuthorized(walletId: WalletId): Boolean = permittedWallets.contains(walletId)
33
  }
34
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc