Skip to content

Commit b77fa79

Browse files
authored
Support for the new 2.x LCP Profiles (#510)
1 parent 8fb7ccb commit b77fa79

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ All notable changes to this project will be documented in this file. Take a look
66

77
## [Unreleased]
88

9+
### Added
10+
11+
* [#509](https://github.com/readium/kotlin-toolkit/issues/509) Support for the new 2.x LCP Profiles.
12+
913
### Deprecated
1014

1115
#### Navigator

readium/lcp/src/main/java/org/readium/r2/lcp/license/LicenseValidation.kt

+11-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010
package org.readium.r2.lcp.license
1111

12-
import java.util.*
1312
import kotlin.time.Duration.Companion.seconds
1413
import kotlinx.coroutines.runBlocking
1514
import org.readium.r2.lcp.BuildConfig.DEBUG
@@ -36,7 +35,17 @@ internal sealed class Either<A, B> {
3635

3736
private val supportedProfiles = listOf(
3837
"http://readium.org/lcp/basic-profile",
39-
"http://readium.org/lcp/profile-1.0"
38+
"http://readium.org/lcp/profile-1.0",
39+
"http://readium.org/lcp/profile-2.0",
40+
"http://readium.org/lcp/profile-2.1",
41+
"http://readium.org/lcp/profile-2.2",
42+
"http://readium.org/lcp/profile-2.3",
43+
"http://readium.org/lcp/profile-2.4",
44+
"http://readium.org/lcp/profile-2.5",
45+
"http://readium.org/lcp/profile-2.6",
46+
"http://readium.org/lcp/profile-2.7",
47+
"http://readium.org/lcp/profile-2.8",
48+
"http://readium.org/lcp/profile-2.9"
4049
)
4150

4251
internal typealias Context = Either<LcpClient.Context, LcpError.LicenseStatus>

0 commit comments

Comments
 (0)