From 29a84d50b704a432afc379827b4b4b5049c2a3b4 Mon Sep 17 00:00:00 2001
From: "bilal.ashraf"
Date: Sat, 25 Oct 2025 00:44:47 +0500
Subject: [PATCH 01/19] tsl support in progress
---
.idea/.gitignore | 3 +
.idea/compiler.xml | 13 ++
.idea/encodings.xml | 7 +
.idea/jarRepositories.xml | 20 +++
.idea/misc.xml | 12 ++
.idea/vcs.xml | 6 +
pom.xml | 48 ++++---
.../dto/CredentialDeferredIssueRequest.java | 35 +++++
.../dto/CredentialDeferredIssueResponse.java | 6 +
.../java/com/authlete/common/dto/Service.java | 62 +++++++-
.../authlete/common/dto/TslConfigData.java | 133 ++++++++++++++++++
.../common/types/TslPublishFormat.java | 113 +++++++++++++++
12 files changed, 432 insertions(+), 26 deletions(-)
create mode 100644 .idea/.gitignore
create mode 100644 .idea/compiler.xml
create mode 100644 .idea/encodings.xml
create mode 100644 .idea/jarRepositories.xml
create mode 100644 .idea/misc.xml
create mode 100644 .idea/vcs.xml
create mode 100644 src/main/java/com/authlete/common/dto/TslConfigData.java
create mode 100644 src/main/java/com/authlete/common/types/TslPublishFormat.java
diff --git a/.idea/.gitignore b/.idea/.gitignore
new file mode 100644
index 0000000000..26d33521af
--- /dev/null
+++ b/.idea/.gitignore
@@ -0,0 +1,3 @@
+# Default ignored files
+/shelf/
+/workspace.xml
diff --git a/.idea/compiler.xml b/.idea/compiler.xml
new file mode 100644
index 0000000000..cca8335003
--- /dev/null
+++ b/.idea/compiler.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/encodings.xml b/.idea/encodings.xml
new file mode 100644
index 0000000000..aa00ffab78
--- /dev/null
+++ b/.idea/encodings.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/jarRepositories.xml b/.idea/jarRepositories.xml
new file mode 100644
index 0000000000..712ab9d985
--- /dev/null
+++ b/.idea/jarRepositories.xml
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
new file mode 100644
index 0000000000..d31b37ac7b
--- /dev/null
+++ b/.idea/misc.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
new file mode 100644
index 0000000000..35eb1ddfbb
--- /dev/null
+++ b/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index 24682b2364..eb186dee48 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,11 @@
com.authleteauthlete-java-common
+<<<<<<< HEAD
4.33-SNAPSHOT
+=======
+ 4.21
+>>>>>>> b3dde3000 (tsl support in progress)
jar${project.groupId}:${project.artifactId}
@@ -308,28 +312,28 @@
-
- org.apache.maven.plugins
- maven-gpg-plugin
- 3.1.0
-
-
- sign-artifacts
- verify
-
- sign
-
-
- E834481D
- ${env.GPG_PASSPHRASE}
-
- --pinentry-mode
- loopback
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
org.codehaus.mojo
diff --git a/src/main/java/com/authlete/common/dto/CredentialDeferredIssueRequest.java b/src/main/java/com/authlete/common/dto/CredentialDeferredIssueRequest.java
index 586316c0d6..669685ed92 100644
--- a/src/main/java/com/authlete/common/dto/CredentialDeferredIssueRequest.java
+++ b/src/main/java/com/authlete/common/dto/CredentialDeferredIssueRequest.java
@@ -78,6 +78,12 @@ public class CredentialDeferredIssueRequest implements Serializable
private CredentialIssuanceOrder order;
+ /**
+ * The access token that came along with the deferred credential request.
+ */
+ private String accessToken;
+
+
/**
* Get the credential order that provides an instruction for issuing a
* credential.
@@ -107,4 +113,33 @@ public CredentialDeferredIssueRequest setOrder(CredentialIssuanceOrder order)
return this;
}
+
+ /**
+ * Get the access token that came along with the deferred credential request.
+ *
+ * @return
+ * The access token that the deferred credential endpoint received.
+ */
+ public String getAccessToken()
+ {
+ return accessToken;
+ }
+
+
+ /**
+ * Set the access token that came along with the deferred credential request.
+ *
+ * @param accessToken
+ * The access token that the deferred credential endpoint received.
+ *
+ * @return
+ * {@code this} object.
+ */
+ public CredentialDeferredIssueRequest setAccessToken(String accessToken)
+ {
+ this.accessToken = accessToken;
+
+ return this;
+ }
+
}
diff --git a/src/main/java/com/authlete/common/dto/CredentialDeferredIssueResponse.java b/src/main/java/com/authlete/common/dto/CredentialDeferredIssueResponse.java
index e22a1efb37..9f48159e53 100644
--- a/src/main/java/com/authlete/common/dto/CredentialDeferredIssueResponse.java
+++ b/src/main/java/com/authlete/common/dto/CredentialDeferredIssueResponse.java
@@ -222,6 +222,12 @@ public enum Action
* The API call is invalid.
*/
CALLER_ERROR,
+
+ /**
+ * The deferred credential request does not contain the access token or
+ * the access token is invalid.
+ */
+ UNAUTHORIZED,
}
diff --git a/src/main/java/com/authlete/common/dto/Service.java b/src/main/java/com/authlete/common/dto/Service.java
index 2af8139bad..3c1da56887 100644
--- a/src/main/java/com/authlete/common/dto/Service.java
+++ b/src/main/java/com/authlete/common/dto/Service.java
@@ -1960,6 +1960,26 @@ public class Service implements Serializable
*/
private boolean httpAliasProhibited;
+ /**
+ * The flag indicating whether the feature of Trust status list publishing for
+ * this service is enabled or not.
+ *
+ * @since TODO
+ * @since Authlete TODO
+ */
+ private boolean tslPublishingEnabled;
+
+
+ /**
+ * Trust status list configuration data.
+ *
+ * @since TODO
+ * @since Authlete TODO
+ *
+ * @see
+ * Trust Status List
+ */
+ private TslConfigData tslConfigData;
/**
* Get the service number.
@@ -12097,7 +12117,6 @@ public Service setNativeSsoSupported(boolean supported)
return this;
}
-
/**
* Get the version of the OpenID for Verifiable Credential Issuance
* specification to support.
@@ -12208,6 +12227,17 @@ public Service setOid4vciVersion(String version)
return this;
}
+ public Service setTslPublishingEnabled(boolean tslPublishingEnabled)
+ {
+ this.tslPublishingEnabled = tslPublishingEnabled;
+
+ return this;
+ }
+
+ public boolean isTslPublishingEnabled()
+ {
+ return tslPublishingEnabled;
+ }
/**
* Get the flag to determine to support
+ * Trust Status List
+ */
+ public Service setTslConfigData(TslConfigData tslConfigData)
+ {
+ this.tslConfigData = tslConfigData;
+
+ return this;
+ }
/**
* Get the flag that indicates whether the allowlist for client IDs
@@ -12795,10 +12839,20 @@ public boolean isHttpAliasProhibited()
* @see
* OAuth Client ID Metadata Document
*/
- public Service setHttpAliasProhibited(boolean prohibited)
- {
+ public Service setHttpAliasProhibited(boolean prohibited) {
this.httpAliasProhibited = prohibited;
return this;
}
+
+ /**
+ * Retrieves the {@link TslConfigData} associated with this service.
+ *
+ * @return the current {@link TslConfigData}
+ */
+ public TslConfigData getTslConfigData()
+ {
+ return tslConfigData;
+
+ }
}
diff --git a/src/main/java/com/authlete/common/dto/TslConfigData.java b/src/main/java/com/authlete/common/dto/TslConfigData.java
new file mode 100644
index 0000000000..94cb390d8f
--- /dev/null
+++ b/src/main/java/com/authlete/common/dto/TslConfigData.java
@@ -0,0 +1,133 @@
+package com.authlete.common.dto;
+
+import com.authlete.common.types.TslPublishFormat;
+
+import java.io.Serializable;
+import java.net.URI;
+
+/**
+ * A class that represents trust status list configurations data
+ * The set consists of the following.
+ *
+ *
+ *
{@code format}
+ *
{@code validity}
+ *
{@code publishFrequency}
+ *
{@code timeToLive}
+ *
{@code publishEndpoint}
+ *
+ *
+ * @since TODO
+ * @since Authlete TODO
+ *
+ * @see Token Status List (TSL)
+ */
+public class TslConfigData implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * The format of the TSL. Possible values are JWT and CWT. Currently only JWT is supported
+ *
+ * @since TODO
+ */
+ private TslPublishFormat format;
+
+ /**
+ * The validity of the TSL in hours
+ *
+ * @since TODO
+ */
+ private int validity;
+
+ /**
+ * Publish TSL after every X hours
+ *
+ * @since TODO
+ */
+ private int publishFrequency;
+
+ /**
+ * Time to live in hours which provides indication to verifiers to cache this TSL
+ *
+ * @since TODO
+ */
+ private int timeToLive;
+
+ /**
+ * Endpoint where to publish this TSL
+ *
+ * @since TODO
+ */
+ private URI publishEndpoint;
+
+ /**
+ * The default constructor.
+ */
+ public TslConfigData() {
+ }
+
+ /**
+ * Copy constructor.
+ *
+ * @param tslConfigData
+ * Source to copy data from. {@code null} won't raise any exception.
+ */
+ public TslConfigData(TslConfigData tslConfigData) {
+ if (tslConfigData == null) {
+ return;
+ }
+ format = tslConfigData.getFormat();
+ validity = tslConfigData.getValidity();
+ publishFrequency = tslConfigData.getPublishFrequency();
+ timeToLive = tslConfigData.getTimeToLive();
+ publishEndpoint = tslConfigData.getPublishEndpoint();
+ }
+
+ public TslConfigData setFormat(TslPublishFormat format) {
+ this.format = format;
+
+ return this;
+ }
+ public TslPublishFormat getFormat() {
+ return format;
+ }
+
+ public TslConfigData setValidity(int validity) {
+ this.validity = validity;
+
+ return this;
+ }
+ public int getValidity() {
+ return validity;
+ }
+
+ public TslConfigData setPublishFrequency(int publishFrequency) {
+ this.publishFrequency = publishFrequency;
+
+ return this;
+ }
+ public int getPublishFrequency() {
+ return publishFrequency;
+ }
+
+ public TslConfigData setTimeToLive(int timeToLive) {
+ this.timeToLive = timeToLive;
+
+ return this;
+ }
+ public int getTimeToLive() {
+ return timeToLive;
+ }
+
+ public TslConfigData setPublishEndpoint(URI publishEndpoint) {
+ this.publishEndpoint = publishEndpoint;
+
+ return this;
+ }
+ public URI getPublishEndpoint() {
+ return publishEndpoint;
+ }
+}
+
diff --git a/src/main/java/com/authlete/common/types/TslPublishFormat.java b/src/main/java/com/authlete/common/types/TslPublishFormat.java
new file mode 100644
index 0000000000..d493a3ba5e
--- /dev/null
+++ b/src/main/java/com/authlete/common/types/TslPublishFormat.java
@@ -0,0 +1,113 @@
+package com.authlete.common.types;
+
+import java.util.EnumSet;
+
+public enum TslPublishFormat {
+
+ /**
+ * Currently jwt is supported. TSL publishing cwt format will be supported in the next iteration
+ */
+ JWT((short)1, "jwt");
+
+
+ private static final TslPublishFormat[] sValues = values();
+ private static final TslPublishFormat.Helper sHelper = new TslPublishFormat.Helper(sValues);
+ private final short mValue;
+ private final String mString;
+
+
+ private TslPublishFormat(short value, String string)
+ {
+ mValue = value;
+ mString = string;
+ }
+
+
+ /**
+ * Get the integer representation of this enum instance.
+ */
+ public short getValue()
+ {
+ return mValue;
+ }
+
+
+ /**
+ * Find an instance of this enum by a value.
+ *
+ * @param value
+ * The integer representation of the instance to find.
+ *
+ * @return
+ * An instance of this enum, or {@code null} if not found.
+ */
+ public static TslPublishFormat getByValue(short value)
+ {
+ if (value < 1 || sValues.length < value)
+ {
+ // Not found.
+ return null;
+ }
+
+ return sValues[value - 1];
+ }
+
+
+ /**
+ * Get the string value of TSL publish format.
+ *
+ * @return
+ * A string that contains TSL publish format.
+ */
+ public String getString()
+ {
+ return mString;
+ }
+
+
+ public static int toBits(EnumSet set)
+ {
+ return sHelper.toBits(set);
+ }
+
+
+ public static TslPublishFormat[] toArray(int bits)
+ {
+ return sHelper.toArray(bits);
+ }
+
+
+ public static EnumSet toSet(int bits)
+ {
+ return sHelper.toSet(bits);
+ }
+
+
+ public static EnumSet toSet(TslPublishFormat[] array)
+ {
+ return sHelper.toSet(array);
+ }
+
+
+ private static class Helper extends EnumHelper
+ {
+ public Helper(TslPublishFormat[] values)
+ {
+ super(TslPublishFormat.class, values);
+ }
+
+
+ @Override
+ protected short getValue(TslPublishFormat entry)
+ {
+ return entry.getValue();
+ }
+
+
+ @Override
+ protected TslPublishFormat[] newArray(int size)
+ {
+ return new TslPublishFormat[size];
+ }
+ }
+}
From 6ff5faab57e0884546047fe51105aeb1eaa58747 Mon Sep 17 00:00:00 2001
From: bilalashraf123
Date: Fri, 28 Nov 2025 17:59:44 +0500
Subject: [PATCH 02/19] tsl support
---
pom.xml | 4 +
.../java/com/authlete/common/dto/Service.java | 39 +++-
.../authlete/common/dto/TslConfigData.java | 166 ++++++++++++++----
.../common/dto/TslEntriesResponse.java | 54 ++++++
.../com/authlete/common/dto/TslEntry.java | 57 ++++++
.../authlete/common/dto/TslGetRequest.java | 19 ++
.../authlete/common/dto/TslGetResponse.java | 28 +++
.../dto/TslPopulateUnusedIndexesRequest.java | 23 +++
.../authlete/common/dto/TslPublishConfig.java | 36 ++++
.../common/dto/TslPublishConfigsResponse.java | 21 +++
.../common/dto/TslPublishRequest.java | 19 ++
.../dto/TslTokenStatusUpdateRequest.java | 41 +++++
.../authlete/common/types/TslTokenStatus.java | 110 ++++++++++++
13 files changed, 580 insertions(+), 37 deletions(-)
create mode 100644 src/main/java/com/authlete/common/dto/TslEntriesResponse.java
create mode 100644 src/main/java/com/authlete/common/dto/TslEntry.java
create mode 100644 src/main/java/com/authlete/common/dto/TslGetRequest.java
create mode 100644 src/main/java/com/authlete/common/dto/TslGetResponse.java
create mode 100644 src/main/java/com/authlete/common/dto/TslPopulateUnusedIndexesRequest.java
create mode 100644 src/main/java/com/authlete/common/dto/TslPublishConfig.java
create mode 100644 src/main/java/com/authlete/common/dto/TslPublishConfigsResponse.java
create mode 100644 src/main/java/com/authlete/common/dto/TslPublishRequest.java
create mode 100644 src/main/java/com/authlete/common/dto/TslTokenStatusUpdateRequest.java
create mode 100644 src/main/java/com/authlete/common/types/TslTokenStatus.java
diff --git a/pom.xml b/pom.xml
index eb186dee48..a058e7664b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,11 +4,15 @@
com.authleteauthlete-java-common
+<<<<<<< HEAD
<<<<<<< HEAD
4.33-SNAPSHOT
=======
4.21
>>>>>>> b3dde3000 (tsl support in progress)
+=======
+ 4.31
+>>>>>>> ef348607f (tsl support)
jar${project.groupId}:${project.artifactId}
diff --git a/src/main/java/com/authlete/common/dto/Service.java b/src/main/java/com/authlete/common/dto/Service.java
index 3c1da56887..efb12275dd 100644
--- a/src/main/java/com/authlete/common/dto/Service.java
+++ b/src/main/java/com/authlete/common/dto/Service.java
@@ -1964,19 +1964,19 @@ public class Service implements Serializable
* The flag indicating whether the feature of Trust status list publishing for
* this service is enabled or not.
*
- * @since TODO
- * @since Authlete TODO
+ * @since 4.30
+ * @since Authlete 3.1
*/
private boolean tslPublishingEnabled;
/**
- * Trust status list configuration data.
+ * TSL configuration data.
*
- * @since TODO
- * @since Authlete TODO
+ * @since 4.30
+ * @since Authlete 3.1
*
- * @see
+ * @see
* Trust Status List
*/
private TslConfigData tslConfigData;
@@ -12227,6 +12227,16 @@ public Service setOid4vciVersion(String version)
return this;
}
+ /*
+ * Sets whether TSL publishing is enabled for this service.
+ *
+ * @param tslPublishingEnabled {@code true} to enable TSL publishing;
+ * {@code false} to disable it.
+ * @return this {@link Service} instance for method chaining
+ *
+ * @since 4.30
+ * @since Authlete 3.1
+ */
public Service setTslPublishingEnabled(boolean tslPublishingEnabled)
{
this.tslPublishingEnabled = tslPublishingEnabled;
@@ -12234,6 +12244,15 @@ public Service setTslPublishingEnabled(boolean tslPublishingEnabled)
return this;
}
+ /**
+ * Get the flag indicating whether the feature of TSL publishing
+ * for this service is enabled or not.
+ *
+ * @return {@code true} if the feature of TSL publishing is enabled.
+ *
+ * @since 4.30
+ * @since Authlete 3.1
+ */
public boolean isTslPublishingEnabled()
{
return tslPublishingEnabled;
@@ -12298,7 +12317,10 @@ public Service setClientIdMetadataDocumentSupported(boolean supported)
* @param tslConfigData the configuration data to be applied
* @return this {@code Service} instance for method chaining
*
- * @see
+ * @since 4.30
+ * @since Authlete 3.1
+ *
+ * @see
* Trust Status List
*/
public Service setTslConfigData(TslConfigData tslConfigData)
@@ -12849,6 +12871,9 @@ public Service setHttpAliasProhibited(boolean prohibited) {
* Retrieves the {@link TslConfigData} associated with this service.
*
* @return the current {@link TslConfigData}
+ *
+ * @since 4.30
+ * @since Authlete 3.1
*/
public TslConfigData getTslConfigData()
{
diff --git a/src/main/java/com/authlete/common/dto/TslConfigData.java b/src/main/java/com/authlete/common/dto/TslConfigData.java
index 94cb390d8f..1bf9b4dcf7 100644
--- a/src/main/java/com/authlete/common/dto/TslConfigData.java
+++ b/src/main/java/com/authlete/common/dto/TslConfigData.java
@@ -6,7 +6,7 @@
import java.net.URI;
/**
- * A class that represents trust status list configurations data
+ * A class that represents TSL configurations data
* The set consists of the following.
*
*
@@ -17,48 +17,54 @@
*
{@code publishEndpoint}
*
*
- * @since TODO
- * @since Authlete TODO
+ * @since 4.30
+ * @since Authlete 3.1
*
- * @see Token Status List (TSL)
*/
-public class TslConfigData implements Serializable {
+public class TslConfigData implements Serializable
+{
private static final long serialVersionUID = 1L;
/**
* The format of the TSL. Possible values are JWT and CWT. Currently only JWT is supported
*
- * @since TODO
+ * @since 4.30
+ * @since Authlete 3.1
*/
private TslPublishFormat format;
/**
* The validity of the TSL in hours
*
- * @since TODO
+ * @since 4.30
+ * @since Authlete 3.1
*/
- private int validity;
+ private long validity;
/**
* Publish TSL after every X hours
*
- * @since TODO
+ * @since 4.30
+ * @since Authlete 3.1
*/
- private int publishFrequency;
+ private long publishFrequency;
/**
* Time to live in hours which provides indication to verifiers to cache this TSL
*
- * @since TODO
+ * @since 4.30
+ * @since Authlete 3.1
*/
- private int timeToLive;
+ private long timeToLive;
/**
* Endpoint where to publish this TSL
*
- * @since TODO
+ * @since 4.30
+ * @since Authlete 3.1
*/
private URI publishEndpoint;
@@ -70,12 +76,11 @@ public TslConfigData() {
/**
* Copy constructor.
- *
- * @param tslConfigData
- * Source to copy data from. {@code null} won't raise any exception.
*/
- public TslConfigData(TslConfigData tslConfigData) {
- if (tslConfigData == null) {
+ public TslConfigData(TslConfigData tslConfigData)
+ {
+ if (tslConfigData == null)
+ {
return;
}
format = tslConfigData.getFormat();
@@ -85,49 +90,150 @@ public TslConfigData(TslConfigData tslConfigData) {
publishEndpoint = tslConfigData.getPublishEndpoint();
}
- public TslConfigData setFormat(TslPublishFormat format) {
+ /**
+ * Sets the TSL publish format.
+ *
+ * @param format the {@link TslPublishFormat} to use for publishing.
+ *
+ * @return this {@link TslConfigData} instance for method chaining
+ *
+ * @since 4.30
+ * @since Authlete 3.1
+ */
+ public TslConfigData setFormat(TslPublishFormat format)
+ {
this.format = format;
return this;
}
- public TslPublishFormat getFormat() {
+
+ /**
+ * Returns the configured TSL publish format.
+ *
+ * @return the {@link TslPublishFormat} in use.
+ *
+ * @since 4.30
+ * @since Authlete 3.1
+ */
+ public TslPublishFormat getFormat()
+ {
return format;
}
- public TslConfigData setValidity(int validity) {
+ /**
+ * Sets the validity period for the TSL in hours.
+ *
+ * @param validity the validity duration
+ * @return this {@link TslConfigData} instance for method chaining
+ *
+ * @since 4.30
+ * @since Authlete 3.1
+ */
+ public TslConfigData setValidity(long validity) {
this.validity = validity;
return this;
}
- public int getValidity() {
+
+ /**
+ * Returns the validity period of the TSL.
+ *
+ * @return the validity duration
+ *
+ * @since 4.30
+ * @since Authlete 3.1
+ */
+ public long getValidity()
+ {
return validity;
}
- public TslConfigData setPublishFrequency(int publishFrequency) {
+ /**
+ * Sets the frequency in hours at which the TSL should be published.
+ *
+ * @param publishFrequency the publishing frequency
+ * @return this {@link TslConfigData} instance for method chaining
+ *
+ * @since 4.30
+ * @since Authlete 3.1
+ *
+ */
+ public TslConfigData setPublishFrequency(long publishFrequency)
+ {
this.publishFrequency = publishFrequency;
return this;
}
- public int getPublishFrequency() {
+
+ /**
+ * Returns the publish frequency of the TSL.
+ *
+ * @return the publishing frequency
+ *
+ * @since 4.30
+ * @since Authlete 3.1
+ */
+ public long getPublishFrequency()
+ {
return publishFrequency;
}
- public TslConfigData setTimeToLive(int timeToLive) {
+ /**
+ * Sets the time to live in hours which provides indication to verifiers to cache this TSL
+ *
+ * @param timeToLive the TTL value
+ * @return this {@link TslConfigData} instance for method chaining
+ *
+ * @since 4.30
+ * @since Authlete 3.1
+ */
+ public TslConfigData setTimeToLive(long timeToLive)
+ {
this.timeToLive = timeToLive;
return this;
}
- public int getTimeToLive() {
+
+ /**
+ * Returns the time-to-live (TTL) in hours value for the TSL.
+ *
+ * @return the TTL value
+ *
+ * @since 4.30
+ * @since Authlete 3.1
+ */
+ public long getTimeToLive()
+ {
return timeToLive;
}
- public TslConfigData setPublishEndpoint(URI publishEndpoint) {
+ /**
+ * Sets the endpoint URI where the TSL will be published.
+ *
+ * @param publishEndpoint the publish endpoint URI.
+ *
+ * @return this {@link TslConfigData} instance for method chaining
+ *
+ * @since 4.30
+ * @since Authlete 3.1
+ */
+ public TslConfigData setPublishEndpoint(URI publishEndpoint)
+ {
this.publishEndpoint = publishEndpoint;
return this;
}
- public URI getPublishEndpoint() {
+
+ /**
+ * Returns the endpoint URI where the TSL is published.
+ *
+ * @return the publish endpoint URI.
+ *
+ * @since 4.30
+ * @since Authlete 3.1
+ */
+ public URI getPublishEndpoint()
+ {
return publishEndpoint;
}
-}
-
+}
\ No newline at end of file
diff --git a/src/main/java/com/authlete/common/dto/TslEntriesResponse.java b/src/main/java/com/authlete/common/dto/TslEntriesResponse.java
new file mode 100644
index 0000000000..3409d1e159
--- /dev/null
+++ b/src/main/java/com/authlete/common/dto/TslEntriesResponse.java
@@ -0,0 +1,54 @@
+package com.authlete.common.dto;
+
+public class TslEntriesResponse {
+
+ private static final long serialVersionUID = 1L;
+
+ private int start;
+
+ private int end;
+
+ private int totalCount;
+
+ private TslEntry[] tslEntries;
+
+ public TslEntriesResponse setStart(int start) {
+ this.start = start;
+
+ return this;
+ }
+
+ public int getStart() {
+ return start;
+ }
+
+ public TslEntriesResponse setEnd(int end) {
+ this.end = end;
+
+ return this;
+ }
+
+ public int getEnd() {
+ return end;
+ }
+
+ public TslEntriesResponse setTotalCount(int totalCount) {
+ this.totalCount = totalCount;
+
+ return this;
+ }
+
+ public int getTotalCount() {
+ return totalCount;
+ }
+
+ public TslEntriesResponse setTslEntries(TslEntry[] tslEntries) {
+ this.tslEntries = tslEntries;
+
+ return this;
+ }
+
+ public TslEntry[] getTslEntries() {
+ return tslEntries;
+ }
+}
diff --git a/src/main/java/com/authlete/common/dto/TslEntry.java b/src/main/java/com/authlete/common/dto/TslEntry.java
new file mode 100644
index 0000000000..ee4c95cbc2
--- /dev/null
+++ b/src/main/java/com/authlete/common/dto/TslEntry.java
@@ -0,0 +1,57 @@
+package com.authlete.common.dto;
+
+import com.authlete.common.types.TslTokenStatus;
+
+public class TslEntry {
+
+ private static final long serialVersionUID = 1L;
+
+ private int tokenIndex;
+
+ private String tokenId;
+
+ private TslTokenStatus tokenStatus;
+
+ private boolean isUsed;
+
+ public TslEntry setTokenIndex(int tokenIndex) {
+ this.tokenIndex = tokenIndex;
+
+ return this;
+ }
+
+ public int getTokenIndex() {
+ return tokenIndex;
+ }
+
+ public TslEntry setTokenId(String tokenId) {
+ this.tokenId = tokenId;
+
+ return this;
+ }
+
+ public String getTokenId() {
+ return tokenId;
+ }
+
+ public TslEntry setTokenStatus(TslTokenStatus tokenStatus) {
+ this.tokenStatus = tokenStatus;
+
+ return this;
+ }
+
+ public TslTokenStatus getTokenStatus() {
+ return tokenStatus;
+ }
+
+ public TslEntry setIsUsed(boolean isUsed) {
+ this.isUsed = isUsed;
+
+ return this;
+ }
+
+ public boolean isUsed() {
+ return isUsed;
+ }
+
+}
diff --git a/src/main/java/com/authlete/common/dto/TslGetRequest.java b/src/main/java/com/authlete/common/dto/TslGetRequest.java
new file mode 100644
index 0000000000..4695efdf99
--- /dev/null
+++ b/src/main/java/com/authlete/common/dto/TslGetRequest.java
@@ -0,0 +1,19 @@
+package com.authlete.common.dto;
+
+import java.io.Serializable;
+
+public class TslGetRequest implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ private int serviceNumber;
+
+ public void setServiceNumber(int serviceNumber) {
+ this.serviceNumber = serviceNumber;
+ }
+
+ public int getServiceNumber() {
+ return serviceNumber;
+ }
+}
+
diff --git a/src/main/java/com/authlete/common/dto/TslGetResponse.java b/src/main/java/com/authlete/common/dto/TslGetResponse.java
new file mode 100644
index 0000000000..a86d614fbf
--- /dev/null
+++ b/src/main/java/com/authlete/common/dto/TslGetResponse.java
@@ -0,0 +1,28 @@
+package com.authlete.common.dto;
+
+import java.io.Serializable;
+
+public class TslGetResponse implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ private String format;
+
+ private String tsl;
+
+ public void setFormat(String format) {
+ this.format = format;
+ }
+
+ public String getFormat() {
+ return format;
+ }
+
+ public void setTsl(String tsl) {
+ this.tsl = tsl;
+ }
+
+ public String getTsl() {
+ return tsl;
+ }
+ }
diff --git a/src/main/java/com/authlete/common/dto/TslPopulateUnusedIndexesRequest.java b/src/main/java/com/authlete/common/dto/TslPopulateUnusedIndexesRequest.java
new file mode 100644
index 0000000000..71bc711fed
--- /dev/null
+++ b/src/main/java/com/authlete/common/dto/TslPopulateUnusedIndexesRequest.java
@@ -0,0 +1,23 @@
+package com.authlete.common.dto;
+
+import java.io.Serializable;
+
+/**
+ * A request to Authlete's {@code /service/populate/unused/indexes} API.
+ *
+ * @since TODO
+ */
+public class TslPopulateUnusedIndexesRequest implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ private int serviceNumber;
+
+ public void setServiceNumber(int serviceNumber) {
+ this.serviceNumber = serviceNumber;
+ }
+
+ public int getServiceNumber() {
+ return serviceNumber;
+ }
+}
diff --git a/src/main/java/com/authlete/common/dto/TslPublishConfig.java b/src/main/java/com/authlete/common/dto/TslPublishConfig.java
new file mode 100644
index 0000000000..dcc38195c1
--- /dev/null
+++ b/src/main/java/com/authlete/common/dto/TslPublishConfig.java
@@ -0,0 +1,36 @@
+package com.authlete.common.dto;
+
+/**
+ * This DTO holds the information when next TSL will be published
+ * per service.
+ *
+ * @since TODO
+ */
+public class TslPublishConfig {
+
+ private static final long serialVersionUID = 1L;
+
+ private int serviceNumber;
+
+ /**
+ * It specifies the time when next TSL will be published. It is in seconds
+ */
+ private long nextTslPublishTime;
+
+ public void setServiceNumber(int serviceNumber) {
+ this.serviceNumber = serviceNumber;
+ }
+
+ public int getServiceNumber() {
+ return serviceNumber;
+ }
+
+ public void setNextTslPublishTime(long nextTslPublishTime) {
+ this.nextTslPublishTime = nextTslPublishTime;
+ }
+
+ public long getNextTslPublishTime() {
+ return nextTslPublishTime;
+ }
+
+}
diff --git a/src/main/java/com/authlete/common/dto/TslPublishConfigsResponse.java b/src/main/java/com/authlete/common/dto/TslPublishConfigsResponse.java
new file mode 100644
index 0000000000..ef0e554456
--- /dev/null
+++ b/src/main/java/com/authlete/common/dto/TslPublishConfigsResponse.java
@@ -0,0 +1,21 @@
+package com.authlete.common.dto;
+
+/**
+ * Response from Authlete's {@code service/tsl/publish/configs} API.
+ *
+ * @since TODO
+ */
+public class TslPublishConfigsResponse extends ApiResponse {
+
+ private static final long serialVersionUID = 1L;
+
+ private TslPublishConfig[] tslPublishConfigs;
+
+ public void setTslPublishConfigs(TslPublishConfig[] tslPublishConfigs) {
+ this.tslPublishConfigs = tslPublishConfigs;
+ }
+
+ public TslPublishConfig[] getTslPublishConfigs() {
+ return tslPublishConfigs;
+ }
+}
diff --git a/src/main/java/com/authlete/common/dto/TslPublishRequest.java b/src/main/java/com/authlete/common/dto/TslPublishRequest.java
new file mode 100644
index 0000000000..616845aad5
--- /dev/null
+++ b/src/main/java/com/authlete/common/dto/TslPublishRequest.java
@@ -0,0 +1,19 @@
+package com.authlete.common.dto;
+
+import java.io.Serializable;
+
+public class TslPublishRequest implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ private int serviceNumber;
+
+ public void setServiceNumber(int serviceNumber) {
+ this.serviceNumber = serviceNumber;
+ }
+
+ public int getServiceNumber() {
+ return serviceNumber;
+ }
+}
+
diff --git a/src/main/java/com/authlete/common/dto/TslTokenStatusUpdateRequest.java b/src/main/java/com/authlete/common/dto/TslTokenStatusUpdateRequest.java
new file mode 100644
index 0000000000..af836505ac
--- /dev/null
+++ b/src/main/java/com/authlete/common/dto/TslTokenStatusUpdateRequest.java
@@ -0,0 +1,41 @@
+package com.authlete.common.dto;
+
+import com.authlete.common.types.TslTokenStatus;
+
+import java.io.Serializable;
+
+public class TslTokenStatusUpdateRequest implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ private String tokenId;
+
+ private TslTokenStatus tokenStatus;
+
+ private int tokenIndex;
+
+ public void setTokenId(String tokenId) {
+ this.tokenId = tokenId;
+ }
+
+ public String getSubject() {
+ return tokenId;
+ }
+
+ public void setTokenStatus(TslTokenStatus tokenStatus) {
+ this.tokenStatus = tokenStatus;
+ }
+
+ public TslTokenStatus getTokenStatus() {
+ return tokenStatus;
+ }
+
+ public void setTokenIndex(int tokenIndex) {
+ this.tokenIndex = tokenIndex;
+ }
+
+ public int getIndex() {
+ return tokenIndex;
+ }
+
+}
diff --git a/src/main/java/com/authlete/common/types/TslTokenStatus.java b/src/main/java/com/authlete/common/types/TslTokenStatus.java
new file mode 100644
index 0000000000..ff8d63867e
--- /dev/null
+++ b/src/main/java/com/authlete/common/types/TslTokenStatus.java
@@ -0,0 +1,110 @@
+package com.authlete.common.types;
+
+import java.util.EnumSet;
+
+public enum TslTokenStatus {
+
+ VALID((short)0, "valid"),
+ INVALID((short)1, "invalid"),
+ SUSPENDED((short)2, "suspended");
+
+
+ private static final TslTokenStatus[] sValues = values();
+ private static final TslTokenStatus.Helper sHelper = new TslTokenStatus.Helper(sValues);
+ private final short mValue;
+ private final String mString;
+
+
+ private TslTokenStatus(short value, String string) {
+ mValue = value;
+ mString = string;
+ }
+
+
+ /**
+ * Get the integer representation of this enum instance.
+ */
+ public short getValue() {
+ return mValue;
+ }
+
+
+ /**
+ * Find an instance of this enum by a value.
+ *
+ * @param value
+ * The integer representation of the instance to find.
+ *
+ * @return
+ * An instance of this enum, or {@code null} if not found.
+ */
+ public static TslTokenStatus getByValue(short value)
+ {
+ if (value < 1 || sValues.length < value)
+ {
+ // Not found.
+ return null;
+ }
+
+ return sValues[value - 1];
+ }
+
+
+ /**
+ * Get the string value of TSL token status.
+ *
+ * @return
+ * A string that contains TSL token status.
+ */
+ public String getString()
+ {
+ return mString;
+ }
+
+
+ public static int toBits(EnumSet set)
+ {
+ return sHelper.toBits(set);
+ }
+
+
+ public static TslTokenStatus[] toArray(int bits)
+ {
+ return sHelper.toArray(bits);
+ }
+
+
+ public static EnumSet toSet(int bits)
+ {
+ return sHelper.toSet(bits);
+ }
+
+
+ public static EnumSet toSet(TslTokenStatus[] array)
+ {
+ return sHelper.toSet(array);
+ }
+
+
+ private static class Helper extends EnumHelper
+ {
+ public Helper(TslTokenStatus[] values)
+ {
+ super(TslTokenStatus.class, values);
+ }
+
+
+ @Override
+ protected short getValue(TslTokenStatus entry)
+ {
+ return entry.getValue();
+ }
+
+
+ @Override
+ protected TslTokenStatus[] newArray(int size)
+ {
+ return new TslTokenStatus[size];
+ }
+ }
+}
From 78bfb2629b8e98b35152569c4b8e68ccc0be5042 Mon Sep 17 00:00:00 2001
From: bilalashraf123
Date: Mon, 1 Dec 2025 17:05:13 +0500
Subject: [PATCH 03/19] property name update
---
.../com/authlete/common/dto/TslTokenStatusUpdateRequest.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/main/java/com/authlete/common/dto/TslTokenStatusUpdateRequest.java b/src/main/java/com/authlete/common/dto/TslTokenStatusUpdateRequest.java
index af836505ac..344a41bca3 100644
--- a/src/main/java/com/authlete/common/dto/TslTokenStatusUpdateRequest.java
+++ b/src/main/java/com/authlete/common/dto/TslTokenStatusUpdateRequest.java
@@ -18,7 +18,7 @@ public void setTokenId(String tokenId) {
this.tokenId = tokenId;
}
- public String getSubject() {
+ public String getTokenId() {
return tokenId;
}
From 4522eef114b548f764f9788c328adac956fcf358 Mon Sep 17 00:00:00 2001
From: bilalashraf123
Date: Tue, 2 Dec 2025 17:00:05 +0500
Subject: [PATCH 04/19] version update
---
pom.xml | 10 +---------
1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/pom.xml b/pom.xml
index a058e7664b..5f67f6cef3 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,15 +4,7 @@
com.authleteauthlete-java-common
-<<<<<<< HEAD
-<<<<<<< HEAD
- 4.33-SNAPSHOT
-=======
- 4.21
->>>>>>> b3dde3000 (tsl support in progress)
-=======
- 4.31
->>>>>>> ef348607f (tsl support)
+ 4.34-SNAPSHOTjar${project.groupId}:${project.artifactId}
From 7a8d3055a26c9fd23cba2dedd8f90fd6a9f34efb Mon Sep 17 00:00:00 2001
From: bilalashraf123
Date: Tue, 2 Dec 2025 17:14:09 +0500
Subject: [PATCH 05/19] version update
---
.../java/com/authlete/common/dto/Service.java | 8 +--
.../authlete/common/dto/TslConfigData.java | 64 +++++++++----------
2 files changed, 36 insertions(+), 36 deletions(-)
diff --git a/src/main/java/com/authlete/common/dto/Service.java b/src/main/java/com/authlete/common/dto/Service.java
index efb12275dd..a17ddfcdb0 100644
--- a/src/main/java/com/authlete/common/dto/Service.java
+++ b/src/main/java/com/authlete/common/dto/Service.java
@@ -1964,8 +1964,8 @@ public class Service implements Serializable
* The flag indicating whether the feature of Trust status list publishing for
* this service is enabled or not.
*
- * @since 4.30
- * @since Authlete 3.1
+ * @since 4.31
+ * @since Authlete 3.0.22
*/
private boolean tslPublishingEnabled;
@@ -1973,8 +1973,8 @@ public class Service implements Serializable
/**
* TSL configuration data.
*
- * @since 4.30
- * @since Authlete 3.1
+ * @since 4.31
+ * @since Authlete 3.0.22
*
* @see
* Trust Status List
diff --git a/src/main/java/com/authlete/common/dto/TslConfigData.java b/src/main/java/com/authlete/common/dto/TslConfigData.java
index 1bf9b4dcf7..9d5a06328f 100644
--- a/src/main/java/com/authlete/common/dto/TslConfigData.java
+++ b/src/main/java/com/authlete/common/dto/TslConfigData.java
@@ -17,8 +17,8 @@
*
{@code publishEndpoint}
*
*
- * @since 4.30
- * @since Authlete 3.1
+ * @since 4.31
+ * @since Authlete 3.0.22
*
* @see Token Status List (TSL)
@@ -31,40 +31,40 @@ public class TslConfigData implements Serializable
/**
* The format of the TSL. Possible values are JWT and CWT. Currently only JWT is supported
*
- * @since 4.30
- * @since Authlete 3.1
+ * @since 4.31
+ * @since Authlete 3.0.22
*/
private TslPublishFormat format;
/**
* The validity of the TSL in hours
*
- * @since 4.30
- * @since Authlete 3.1
+ * @since 4.31
+ * @since Authlete 3.0.22
*/
private long validity;
/**
* Publish TSL after every X hours
*
- * @since 4.30
- * @since Authlete 3.1
+ * @since 4.31
+ * @since Authlete 3.0.22
*/
private long publishFrequency;
/**
* Time to live in hours which provides indication to verifiers to cache this TSL
*
- * @since 4.30
- * @since Authlete 3.1
+ * @since 4.31
+ * @since Authlete 3.0.22
*/
private long timeToLive;
/**
* Endpoint where to publish this TSL
*
- * @since 4.30
- * @since Authlete 3.1
+ * @since 4.31
+ * @since Authlete 3.0.22
*/
private URI publishEndpoint;
@@ -97,8 +97,8 @@ public TslConfigData(TslConfigData tslConfigData)
*
* @return this {@link TslConfigData} instance for method chaining
*
- * @since 4.30
- * @since Authlete 3.1
+ * @since 4.31
+ * @since Authlete 3.0.22
*/
public TslConfigData setFormat(TslPublishFormat format)
{
@@ -112,8 +112,8 @@ public TslConfigData setFormat(TslPublishFormat format)
*
* @return the {@link TslPublishFormat} in use.
*
- * @since 4.30
- * @since Authlete 3.1
+ * @since 4.31
+ * @since Authlete 3.0.22
*/
public TslPublishFormat getFormat()
{
@@ -126,8 +126,8 @@ public TslPublishFormat getFormat()
* @param validity the validity duration
* @return this {@link TslConfigData} instance for method chaining
*
- * @since 4.30
- * @since Authlete 3.1
+ * @since 4.31
+ * @since Authlete 3.0.22
*/
public TslConfigData setValidity(long validity) {
this.validity = validity;
@@ -140,8 +140,8 @@ public TslConfigData setValidity(long validity) {
*
* @return the validity duration
*
- * @since 4.30
- * @since Authlete 3.1
+ * @since 4.31
+ * @since Authlete 3.0.22
*/
public long getValidity()
{
@@ -154,8 +154,8 @@ public long getValidity()
* @param publishFrequency the publishing frequency
* @return this {@link TslConfigData} instance for method chaining
*
- * @since 4.30
- * @since Authlete 3.1
+ * @since 4.31
+ * @since Authlete 3.0.22
*
*/
public TslConfigData setPublishFrequency(long publishFrequency)
@@ -170,8 +170,8 @@ public TslConfigData setPublishFrequency(long publishFrequency)
*
* @return the publishing frequency
*
- * @since 4.30
- * @since Authlete 3.1
+ * @since 4.31
+ * @since Authlete 3.0.22
*/
public long getPublishFrequency()
{
@@ -184,8 +184,8 @@ public long getPublishFrequency()
* @param timeToLive the TTL value
* @return this {@link TslConfigData} instance for method chaining
*
- * @since 4.30
- * @since Authlete 3.1
+ * @since 4.31
+ * @since Authlete 3.0.22
*/
public TslConfigData setTimeToLive(long timeToLive)
{
@@ -199,8 +199,8 @@ public TslConfigData setTimeToLive(long timeToLive)
*
* @return the TTL value
*
- * @since 4.30
- * @since Authlete 3.1
+ * @since 4.31
+ * @since Authlete 3.0.22
*/
public long getTimeToLive()
{
@@ -214,8 +214,8 @@ public long getTimeToLive()
*
* @return this {@link TslConfigData} instance for method chaining
*
- * @since 4.30
- * @since Authlete 3.1
+ * @since 4.31
+ * @since Authlete 3.0.22
*/
public TslConfigData setPublishEndpoint(URI publishEndpoint)
{
@@ -229,8 +229,8 @@ public TslConfigData setPublishEndpoint(URI publishEndpoint)
*
* @return the publish endpoint URI.
*
- * @since 4.30
- * @since Authlete 3.1
+ * @since 4.31
+ * @since Authlete 3.0.22
*/
public URI getPublishEndpoint()
{
From 3f12fa8237d81e368f7f4036398e302bb7922542 Mon Sep 17 00:00:00 2001
From: bilalashraf123
Date: Tue, 2 Dec 2025 19:30:25 +0500
Subject: [PATCH 06/19] improved code commenting and refactoring
---
.idea/compiler.xml | 4 +-
.../java/com/authlete/common/dto/Service.java | 16 ++--
.../authlete/common/dto/TslConfigData.java | 88 -------------------
.../common/dto/TslEntriesResponse.java | 34 +++++++
.../com/authlete/common/dto/TslEntry.java | 55 +++++++++---
.../authlete/common/dto/TslGetRequest.java | 31 ++++++-
.../authlete/common/dto/TslGetResponse.java | 34 +++++--
.../dto/TslPopulateUnusedIndexesRequest.java | 23 +++--
.../authlete/common/dto/TslPublishConfig.java | 16 +++-
.../common/dto/TslPublishConfigsResponse.java | 31 +++++--
.../common/dto/TslPublishRequest.java | 31 ++++++-
.../dto/TslTokenStatusUpdateRequest.java | 60 +++++++++++--
12 files changed, 282 insertions(+), 141 deletions(-)
diff --git a/.idea/compiler.xml b/.idea/compiler.xml
index cca8335003..df3ef2ec63 100644
--- a/.idea/compiler.xml
+++ b/.idea/compiler.xml
@@ -6,8 +6,10 @@
-
+
+
+
\ No newline at end of file
diff --git a/src/main/java/com/authlete/common/dto/Service.java b/src/main/java/com/authlete/common/dto/Service.java
index a17ddfcdb0..bc2a179de3 100644
--- a/src/main/java/com/authlete/common/dto/Service.java
+++ b/src/main/java/com/authlete/common/dto/Service.java
@@ -12234,8 +12234,8 @@ public Service setOid4vciVersion(String version)
* {@code false} to disable it.
* @return this {@link Service} instance for method chaining
*
- * @since 4.30
- * @since Authlete 3.1
+ * @since 4.31
+ * @since Authlete 3.0.22
*/
public Service setTslPublishingEnabled(boolean tslPublishingEnabled)
{
@@ -12250,8 +12250,8 @@ public Service setTslPublishingEnabled(boolean tslPublishingEnabled)
*
* @return {@code true} if the feature of TSL publishing is enabled.
*
- * @since 4.30
- * @since Authlete 3.1
+ * @since 4.31
+ * @since Authlete 3.0.22
*/
public boolean isTslPublishingEnabled()
{
@@ -12317,8 +12317,8 @@ public Service setClientIdMetadataDocumentSupported(boolean supported)
* @param tslConfigData the configuration data to be applied
* @return this {@code Service} instance for method chaining
*
- * @since 4.30
- * @since Authlete 3.1
+ * @since 4.31
+ * @since Authlete 3.0.22
*
* @see
* Trust Status List
@@ -12872,8 +12872,8 @@ public Service setHttpAliasProhibited(boolean prohibited) {
*
* @return the current {@link TslConfigData}
*
- * @since 4.30
- * @since Authlete 3.1
+ * @since 4.31
+ * @since Authlete 3.0.22
*/
public TslConfigData getTslConfigData()
{
diff --git a/src/main/java/com/authlete/common/dto/TslConfigData.java b/src/main/java/com/authlete/common/dto/TslConfigData.java
index 9d5a06328f..e47a54abd8 100644
--- a/src/main/java/com/authlete/common/dto/TslConfigData.java
+++ b/src/main/java/com/authlete/common/dto/TslConfigData.java
@@ -90,16 +90,6 @@ public TslConfigData(TslConfigData tslConfigData)
publishEndpoint = tslConfigData.getPublishEndpoint();
}
- /**
- * Sets the TSL publish format.
- *
- * @param format the {@link TslPublishFormat} to use for publishing.
- *
- * @return this {@link TslConfigData} instance for method chaining
- *
- * @since 4.31
- * @since Authlete 3.0.22
- */
public TslConfigData setFormat(TslPublishFormat format)
{
this.format = format;
@@ -107,57 +97,22 @@ public TslConfigData setFormat(TslPublishFormat format)
return this;
}
- /**
- * Returns the configured TSL publish format.
- *
- * @return the {@link TslPublishFormat} in use.
- *
- * @since 4.31
- * @since Authlete 3.0.22
- */
public TslPublishFormat getFormat()
{
return format;
}
- /**
- * Sets the validity period for the TSL in hours.
- *
- * @param validity the validity duration
- * @return this {@link TslConfigData} instance for method chaining
- *
- * @since 4.31
- * @since Authlete 3.0.22
- */
public TslConfigData setValidity(long validity) {
this.validity = validity;
return this;
}
- /**
- * Returns the validity period of the TSL.
- *
- * @return the validity duration
- *
- * @since 4.31
- * @since Authlete 3.0.22
- */
public long getValidity()
{
return validity;
}
- /**
- * Sets the frequency in hours at which the TSL should be published.
- *
- * @param publishFrequency the publishing frequency
- * @return this {@link TslConfigData} instance for method chaining
- *
- * @since 4.31
- * @since Authlete 3.0.22
- *
- */
public TslConfigData setPublishFrequency(long publishFrequency)
{
this.publishFrequency = publishFrequency;
@@ -165,28 +120,11 @@ public TslConfigData setPublishFrequency(long publishFrequency)
return this;
}
- /**
- * Returns the publish frequency of the TSL.
- *
- * @return the publishing frequency
- *
- * @since 4.31
- * @since Authlete 3.0.22
- */
public long getPublishFrequency()
{
return publishFrequency;
}
- /**
- * Sets the time to live in hours which provides indication to verifiers to cache this TSL
- *
- * @param timeToLive the TTL value
- * @return this {@link TslConfigData} instance for method chaining
- *
- * @since 4.31
- * @since Authlete 3.0.22
- */
public TslConfigData setTimeToLive(long timeToLive)
{
this.timeToLive = timeToLive;
@@ -194,29 +132,11 @@ public TslConfigData setTimeToLive(long timeToLive)
return this;
}
- /**
- * Returns the time-to-live (TTL) in hours value for the TSL.
- *
- * @return the TTL value
- *
- * @since 4.31
- * @since Authlete 3.0.22
- */
public long getTimeToLive()
{
return timeToLive;
}
- /**
- * Sets the endpoint URI where the TSL will be published.
- *
- * @param publishEndpoint the publish endpoint URI.
- *
- * @return this {@link TslConfigData} instance for method chaining
- *
- * @since 4.31
- * @since Authlete 3.0.22
- */
public TslConfigData setPublishEndpoint(URI publishEndpoint)
{
this.publishEndpoint = publishEndpoint;
@@ -224,14 +144,6 @@ public TslConfigData setPublishEndpoint(URI publishEndpoint)
return this;
}
- /**
- * Returns the endpoint URI where the TSL is published.
- *
- * @return the publish endpoint URI.
- *
- * @since 4.31
- * @since Authlete 3.0.22
- */
public URI getPublishEndpoint()
{
return publishEndpoint;
diff --git a/src/main/java/com/authlete/common/dto/TslEntriesResponse.java b/src/main/java/com/authlete/common/dto/TslEntriesResponse.java
index 3409d1e159..d968da6915 100644
--- a/src/main/java/com/authlete/common/dto/TslEntriesResponse.java
+++ b/src/main/java/com/authlete/common/dto/TslEntriesResponse.java
@@ -1,15 +1,49 @@
package com.authlete.common.dto;
+/**
+ * Response from Authlete's {@code /tsl/entries/list} API.
+ *
+ * This class contains list of TSL token entries.
+ *
+ * @since 4.31
+ * @since Authlete 3.0.22
+ *
+ */
public class TslEntriesResponse {
private static final long serialVersionUID = 1L;
+ /**
+ * The start index (inclusive) for the result set of the query.
+ *
+ * @since 4.31
+ * @since Authlete 3.0.22
+ */
private int start;
+ /**
+ * The end index (exclusive) for the result set of the query.
+ *
+ * @since 4.31
+ * @since Authlete 3.0.22
+ */
private int end;
+ /**
+ * Total count of the entries
+ *
+ * @since 4.31
+ * @since Authlete 3.0.22
+ */
private int totalCount;
+ /**
+ * TSL token entries
+ *
+ * @since 4.31
+ * @since Authlete 3.0.22
+ */
+
private TslEntry[] tslEntries;
public TslEntriesResponse setStart(int start) {
diff --git a/src/main/java/com/authlete/common/dto/TslEntry.java b/src/main/java/com/authlete/common/dto/TslEntry.java
index ee4c95cbc2..7ba2446aa6 100644
--- a/src/main/java/com/authlete/common/dto/TslEntry.java
+++ b/src/main/java/com/authlete/common/dto/TslEntry.java
@@ -2,56 +2,89 @@
import com.authlete.common.types.TslTokenStatus;
-public class TslEntry {
-
+/**
+ * This class contains token entries on which to build the TSL
+ *
+ * @since 4.31
+ * @since Authlete 3.0.22
+ *
+ */
+public class TslEntry
+{
private static final long serialVersionUID = 1L;
+ /**
+ * Token index that represents the token in the issued VC/token.
+ *
+ * @since 4.31
+ * @since Authlete 3.0.22
+ */
private int tokenIndex;
+ /**
+ * Unique ID assigned to each issued VC/token.
+ *
+ * @since 4.31
+ * @since Authlete 3.0.22
+ */
private String tokenId;
+ /**
+ * Current status of the issued VC/token.
+ *
+ * @since 4.31
+ * @since Authlete 3.0.22
+ */
+
private TslTokenStatus tokenStatus;
private boolean isUsed;
- public TslEntry setTokenIndex(int tokenIndex) {
+ public TslEntry setTokenIndex(int tokenIndex)
+ {
this.tokenIndex = tokenIndex;
return this;
}
- public int getTokenIndex() {
+ public int getTokenIndex()
+ {
return tokenIndex;
}
- public TslEntry setTokenId(String tokenId) {
+ public TslEntry setTokenId(String tokenId)
+ {
this.tokenId = tokenId;
return this;
}
- public String getTokenId() {
+ public String getTokenId()
+ {
return tokenId;
}
- public TslEntry setTokenStatus(TslTokenStatus tokenStatus) {
+ public TslEntry setTokenStatus(TslTokenStatus tokenStatus)
+ {
this.tokenStatus = tokenStatus;
return this;
}
- public TslTokenStatus getTokenStatus() {
+ public TslTokenStatus getTokenStatus()
+ {
return tokenStatus;
}
- public TslEntry setIsUsed(boolean isUsed) {
+ public TslEntry setIsUsed(boolean isUsed)
+ {
this.isUsed = isUsed;
return this;
}
- public boolean isUsed() {
+ public boolean isUsed()
+ {
return isUsed;
}
-
}
diff --git a/src/main/java/com/authlete/common/dto/TslGetRequest.java b/src/main/java/com/authlete/common/dto/TslGetRequest.java
index 4695efdf99..7360d09efb 100644
--- a/src/main/java/com/authlete/common/dto/TslGetRequest.java
+++ b/src/main/java/com/authlete/common/dto/TslGetRequest.java
@@ -2,17 +2,42 @@
import java.io.Serializable;
-public class TslGetRequest implements Serializable {
+/**
+ * Request to Authlete's {@code /tsl/publish} API.
+ *
+ * This class is used to get the published TSL.
+ * The set consists of the following.
+ *
+ *
+ *
{@code serviceNumber}
+ *
+ *
+ * @since 4.31
+ * @since Authlete 3.0.22
+ *
+ * @see Token Status List (TSL)
+ */
+public class TslGetRequest implements Serializable
+{
private static final long serialVersionUID = 1L;
+ /**
+ * Service number whose TSL is to be retrieved.
+ *
+ * @since 4.31
+ * @since Authlete 3.0.22
+ */
private int serviceNumber;
- public void setServiceNumber(int serviceNumber) {
+ public void setServiceNumber(int serviceNumber)
+ {
this.serviceNumber = serviceNumber;
}
- public int getServiceNumber() {
+ public int getServiceNumber()
+ {
return serviceNumber;
}
}
diff --git a/src/main/java/com/authlete/common/dto/TslGetResponse.java b/src/main/java/com/authlete/common/dto/TslGetResponse.java
index a86d614fbf..95461eca5d 100644
--- a/src/main/java/com/authlete/common/dto/TslGetResponse.java
+++ b/src/main/java/com/authlete/common/dto/TslGetResponse.java
@@ -2,27 +2,51 @@
import java.io.Serializable;
-public class TslGetResponse implements Serializable {
+/**
+ * Response from Authlete's {@code /service/tsl} API.
+ *
+ * @since 4.31
+ * @since Authlete 3.0.22
+ *
+ */
+public class TslGetResponse implements Serializable
+{
private static final long serialVersionUID = 1L;
+ /**
+ * TSL format e.g. jwt.
+ *
+ * @since 4.31
+ * @since Authlete 3.0.22
+ */
private String format;
+ /**
+ * TSL
+ *
+ * @since 4.31
+ * @since Authlete 3.0.22
+ */
private String tsl;
- public void setFormat(String format) {
+ public void setFormat(String format)
+ {
this.format = format;
}
- public String getFormat() {
+ public String getFormat()
+ {
return format;
}
- public void setTsl(String tsl) {
+ public void setTsl(String tsl)
+ {
this.tsl = tsl;
}
- public String getTsl() {
+ public String getTsl()
+ {
return tsl;
}
}
diff --git a/src/main/java/com/authlete/common/dto/TslPopulateUnusedIndexesRequest.java b/src/main/java/com/authlete/common/dto/TslPopulateUnusedIndexesRequest.java
index 71bc711fed..00f524cc0a 100644
--- a/src/main/java/com/authlete/common/dto/TslPopulateUnusedIndexesRequest.java
+++ b/src/main/java/com/authlete/common/dto/TslPopulateUnusedIndexesRequest.java
@@ -3,21 +3,34 @@
import java.io.Serializable;
/**
+ * This class is used to pre-populate the unused indexes which later will be used in the
+ * issued VCs/tokens.
+ *
* A request to Authlete's {@code /service/populate/unused/indexes} API.
*
- * @since TODO
- */
-public class TslPopulateUnusedIndexesRequest implements Serializable {
+ * @since 4.31
+ * @since Authlete 3.0.22
+ */
+public class TslPopulateUnusedIndexesRequest implements Serializable
+{
private static final long serialVersionUID = 1L;
+ /**
+ * Service number against which unused indexes is populated.
+ *
+ * @since 4.31
+ * @since Authlete 3.0.22
+ */
private int serviceNumber;
- public void setServiceNumber(int serviceNumber) {
+ public void setServiceNumber(int serviceNumber)
+ {
this.serviceNumber = serviceNumber;
}
- public int getServiceNumber() {
+ public int getServiceNumber()
+ {
return serviceNumber;
}
}
diff --git a/src/main/java/com/authlete/common/dto/TslPublishConfig.java b/src/main/java/com/authlete/common/dto/TslPublishConfig.java
index dcc38195c1..22c260097c 100644
--- a/src/main/java/com/authlete/common/dto/TslPublishConfig.java
+++ b/src/main/java/com/authlete/common/dto/TslPublishConfig.java
@@ -1,19 +1,29 @@
package com.authlete.common.dto;
/**
- * This DTO holds the information when next TSL will be published
- * per service.
+ * This class contains per service TSL publish configurations.
+ *
+ * @since 4.31
+ * @since Authlete 3.0.22
*
- * @since TODO
*/
public class TslPublishConfig {
private static final long serialVersionUID = 1L;
+ /**
+ * Service number whose TSL will be published at next publish time.
+ *
+ * @since 4.31
+ * @since Authlete 3.0.22
+ */
private int serviceNumber;
/**
* It specifies the time when next TSL will be published. It is in seconds
+ *
+ * @since 4.31
+ * @since Authlete 3.0.22
*/
private long nextTslPublishTime;
diff --git a/src/main/java/com/authlete/common/dto/TslPublishConfigsResponse.java b/src/main/java/com/authlete/common/dto/TslPublishConfigsResponse.java
index ef0e554456..316721556c 100644
--- a/src/main/java/com/authlete/common/dto/TslPublishConfigsResponse.java
+++ b/src/main/java/com/authlete/common/dto/TslPublishConfigsResponse.java
@@ -1,21 +1,40 @@
package com.authlete.common.dto;
/**
- * Response from Authlete's {@code service/tsl/publish/configs} API.
+ * Response from Authlete's {@code /tsl/publish/configs} API.
+ *
+ * This class contains TSL publish configuration response which decided when next TSL
+ * is going to be published.
+ *
+ * @since 4.31
+ * @since Authlete 3.0.22
*
- * @since TODO
*/
-public class TslPublishConfigsResponse extends ApiResponse {
-
+public class TslPublishConfigsResponse extends ApiResponse
+{
private static final long serialVersionUID = 1L;
+ /**
+ * TSL publish configurations reponse.
+ * It contains an array of the following information.
+ *
+ *
+ *
{@code serviceNumber}
+ *
{@code nextTslPublishTime}
+ *
+ *
+ * @since 4.31
+ * @since Authlete 3.0.22
+ */
private TslPublishConfig[] tslPublishConfigs;
- public void setTslPublishConfigs(TslPublishConfig[] tslPublishConfigs) {
+ public void setTslPublishConfigs(TslPublishConfig[] tslPublishConfigs)
+ {
this.tslPublishConfigs = tslPublishConfigs;
}
- public TslPublishConfig[] getTslPublishConfigs() {
+ public TslPublishConfig[] getTslPublishConfigs()
+ {
return tslPublishConfigs;
}
}
diff --git a/src/main/java/com/authlete/common/dto/TslPublishRequest.java b/src/main/java/com/authlete/common/dto/TslPublishRequest.java
index 616845aad5..e6147f0fd5 100644
--- a/src/main/java/com/authlete/common/dto/TslPublishRequest.java
+++ b/src/main/java/com/authlete/common/dto/TslPublishRequest.java
@@ -2,17 +2,42 @@
import java.io.Serializable;
-public class TslPublishRequest implements Serializable {
+/**
+ * Request to Authlete's {@code /tsl/publish} API.
+ *
+ * This class is used to publish the TSL.
+ * The set consists of the following.
+ *
+ *
+ *
{@code serviceNumber}
+ *
+ *
+ * @since 4.31
+ * @since Authlete 3.0.22
+ *
+ * @see Token Status List (TSL)
+ */
+public class TslPublishRequest implements Serializable
+{
private static final long serialVersionUID = 1L;
+ /**
+ * Service number whose TSL is to be published
+ *
+ * @since 4.31
+ * @since Authlete 3.0.22
+ */
private int serviceNumber;
- public void setServiceNumber(int serviceNumber) {
+ public void setServiceNumber(int serviceNumber)
+ {
this.serviceNumber = serviceNumber;
}
- public int getServiceNumber() {
+ public int getServiceNumber()
+ {
return serviceNumber;
}
}
diff --git a/src/main/java/com/authlete/common/dto/TslTokenStatusUpdateRequest.java b/src/main/java/com/authlete/common/dto/TslTokenStatusUpdateRequest.java
index 344a41bca3..c1337c0216 100644
--- a/src/main/java/com/authlete/common/dto/TslTokenStatusUpdateRequest.java
+++ b/src/main/java/com/authlete/common/dto/TslTokenStatusUpdateRequest.java
@@ -4,38 +4,82 @@
import java.io.Serializable;
-public class TslTokenStatusUpdateRequest implements Serializable {
+/**
+ *
+ * Request to Authlete's {@code /tsl/token/status} API.
+ *
+ * A class that updates the status of the issued VCs/tokens which later added in the issued TSL.
+ * The set consists of the following.
+ *
+ *
+ *
{@code tokenId}
+ *
{@code tokenStatus}
+ *
{@code tokenIndex}
+ *
+ *
+ * @since 4.31
+ * @since Authlete 3.0.22
+ *
+ * @see Token Status List (TSL)
+ */
+public class TslTokenStatusUpdateRequest implements Serializable
+{
private static final long serialVersionUID = 1L;
+ /**
+ * Token ID used to identity the issued VC/token whose status can be changed.
+ *
+ * @since 4.31
+ * @since Authlete 3.0.22
+ */
private String tokenId;
+ /**
+ * Token status to change.
+ *
+ * @since 4.31
+ * @since Authlete 3.0.22
+ */
+
private TslTokenStatus tokenStatus;
+ /**
+ * Token index in the issued TSL.
+ *
+ * @since 4.31
+ * @since Authlete 3.0.22
+ */
private int tokenIndex;
- public void setTokenId(String tokenId) {
+ public void setTokenId(String tokenId)
+ {
this.tokenId = tokenId;
}
- public String getTokenId() {
+ public String getTokenId()
+ {
return tokenId;
}
- public void setTokenStatus(TslTokenStatus tokenStatus) {
+ public void setTokenStatus(TslTokenStatus tokenStatus)
+ {
this.tokenStatus = tokenStatus;
}
- public TslTokenStatus getTokenStatus() {
+ public TslTokenStatus getTokenStatus()
+ {
return tokenStatus;
}
- public void setTokenIndex(int tokenIndex) {
+ public void setTokenIndex(int tokenIndex)
+ {
this.tokenIndex = tokenIndex;
}
- public int getIndex() {
+ public int getIndex()
+ {
return tokenIndex;
}
-
}
From ac3ea13435513cd9e03317366cacf1195f176732 Mon Sep 17 00:00:00 2001
From: bilalashraf123
Date: Tue, 2 Dec 2025 19:35:57 +0500
Subject: [PATCH 07/19] improved code commenting and refactoring
---
.../dto/CredentialDeferredIssueRequest.java | 36 -------------------
.../dto/CredentialDeferredIssueResponse.java | 6 ----
2 files changed, 42 deletions(-)
diff --git a/src/main/java/com/authlete/common/dto/CredentialDeferredIssueRequest.java b/src/main/java/com/authlete/common/dto/CredentialDeferredIssueRequest.java
index 669685ed92..aeb705ff36 100644
--- a/src/main/java/com/authlete/common/dto/CredentialDeferredIssueRequest.java
+++ b/src/main/java/com/authlete/common/dto/CredentialDeferredIssueRequest.java
@@ -77,13 +77,6 @@ public class CredentialDeferredIssueRequest implements Serializable
*/
private CredentialIssuanceOrder order;
-
- /**
- * The access token that came along with the deferred credential request.
- */
- private String accessToken;
-
-
/**
* Get the credential order that provides an instruction for issuing a
* credential.
@@ -113,33 +106,4 @@ public CredentialDeferredIssueRequest setOrder(CredentialIssuanceOrder order)
return this;
}
-
- /**
- * Get the access token that came along with the deferred credential request.
- *
- * @return
- * The access token that the deferred credential endpoint received.
- */
- public String getAccessToken()
- {
- return accessToken;
- }
-
-
- /**
- * Set the access token that came along with the deferred credential request.
- *
- * @param accessToken
- * The access token that the deferred credential endpoint received.
- *
- * @return
- * {@code this} object.
- */
- public CredentialDeferredIssueRequest setAccessToken(String accessToken)
- {
- this.accessToken = accessToken;
-
- return this;
- }
-
}
diff --git a/src/main/java/com/authlete/common/dto/CredentialDeferredIssueResponse.java b/src/main/java/com/authlete/common/dto/CredentialDeferredIssueResponse.java
index 9f48159e53..e22a1efb37 100644
--- a/src/main/java/com/authlete/common/dto/CredentialDeferredIssueResponse.java
+++ b/src/main/java/com/authlete/common/dto/CredentialDeferredIssueResponse.java
@@ -222,12 +222,6 @@ public enum Action
* The API call is invalid.
*/
CALLER_ERROR,
-
- /**
- * The deferred credential request does not contain the access token or
- * the access token is invalid.
- */
- UNAUTHORIZED,
}
From 945b5095d3a2454ed7fa1daa711d519e71a68a63 Mon Sep 17 00:00:00 2001
From: bilalashraf123
Date: Tue, 2 Dec 2025 19:41:59 +0500
Subject: [PATCH 08/19] untracked .idea folder
---
.gitignore | 1 +
.idea/.gitignore | 3 ---
.idea/compiler.xml | 15 ---------------
.idea/encodings.xml | 7 -------
.idea/jarRepositories.xml | 20 --------------------
.idea/misc.xml | 12 ------------
.idea/vcs.xml | 6 ------
7 files changed, 1 insertion(+), 63 deletions(-)
delete mode 100644 .idea/.gitignore
delete mode 100644 .idea/compiler.xml
delete mode 100644 .idea/encodings.xml
delete mode 100644 .idea/jarRepositories.xml
delete mode 100644 .idea/misc.xml
delete mode 100644 .idea/vcs.xml
diff --git a/.gitignore b/.gitignore
index 9c65be4569..b73cecb8fe 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,5 @@
target/
+.idea/
authlete.properties
.settings
.project
diff --git a/.idea/.gitignore b/.idea/.gitignore
deleted file mode 100644
index 26d33521af..0000000000
--- a/.idea/.gitignore
+++ /dev/null
@@ -1,3 +0,0 @@
-# Default ignored files
-/shelf/
-/workspace.xml
diff --git a/.idea/compiler.xml b/.idea/compiler.xml
deleted file mode 100644
index df3ef2ec63..0000000000
--- a/.idea/compiler.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/encodings.xml b/.idea/encodings.xml
deleted file mode 100644
index aa00ffab78..0000000000
--- a/.idea/encodings.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/jarRepositories.xml b/.idea/jarRepositories.xml
deleted file mode 100644
index 712ab9d985..0000000000
--- a/.idea/jarRepositories.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
deleted file mode 100644
index d31b37ac7b..0000000000
--- a/.idea/misc.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
deleted file mode 100644
index 35eb1ddfbb..0000000000
--- a/.idea/vcs.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
From 59127b4c00245d9c70a7639ba70b24af39dd8493 Mon Sep 17 00:00:00 2001
From: bilalashraf123
Date: Tue, 2 Dec 2025 19:45:22 +0500
Subject: [PATCH 09/19] untracked .idea folder
---
src/main/java/com/authlete/common/dto/Service.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/main/java/com/authlete/common/dto/Service.java b/src/main/java/com/authlete/common/dto/Service.java
index bc2a179de3..5ba690db54 100644
--- a/src/main/java/com/authlete/common/dto/Service.java
+++ b/src/main/java/com/authlete/common/dto/Service.java
@@ -12861,7 +12861,8 @@ public boolean isHttpAliasProhibited()
* @see
* OAuth Client ID Metadata Document
*/
- public Service setHttpAliasProhibited(boolean prohibited) {
+ public Service setHttpAliasProhibited(boolean prohibited)
+ {
this.httpAliasProhibited = prohibited;
return this;
From 220232760ac27ca7a0094bdab55a5cfc36a55078 Mon Sep 17 00:00:00 2001
From: bilalashraf123
Date: Tue, 2 Dec 2025 21:06:11 +0500
Subject: [PATCH 10/19] added code docs
---
.../authlete/common/dto/TslConfigData.java | 89 +++++++++++++++++++
.../common/dto/TslEntriesResponse.java | 27 ++++--
2 files changed, 107 insertions(+), 9 deletions(-)
diff --git a/src/main/java/com/authlete/common/dto/TslConfigData.java b/src/main/java/com/authlete/common/dto/TslConfigData.java
index e47a54abd8..e8ca2f8c22 100644
--- a/src/main/java/com/authlete/common/dto/TslConfigData.java
+++ b/src/main/java/com/authlete/common/dto/TslConfigData.java
@@ -90,6 +90,15 @@ public TslConfigData(TslConfigData tslConfigData)
publishEndpoint = tslConfigData.getPublishEndpoint();
}
+ /**
+ * Sets the publish format for the TSL configuration.
+ *
+ * @param format the {@link TslPublishFormat} value to set
+ * @return this {@code TslConfigData} instance for method chaining
+ *
+ * @since 4.31
+ * @since Authlete 3.0.22
+ */
public TslConfigData setFormat(TslPublishFormat format)
{
this.format = format;
@@ -97,22 +106,58 @@ public TslConfigData setFormat(TslPublishFormat format)
return this;
}
+ /**
+ * Returns the publish format of the TSL configuration.
+ *
+ * @return the {@link TslPublishFormat} value currently configured
+ *
+ * @since 4.31
+ * @since Authlete 3.0.22
+ */
public TslPublishFormat getFormat()
{
return format;
}
+ /**
+ * Sets the TSL validity in hours.
+ *
+ * @param TSL validity in hours
+ *
+ * @return this {@code TslConfigData} instance for method chaining
+ *
+ * @since 4.31
+ * @since Authlete 3.0.22
+ */
public TslConfigData setValidity(long validity) {
this.validity = validity;
return this;
}
+ /**
+ * Returns the TSL validity in hours.
+ *
+ * @return TSL validity
+ *
+ * @since 4.31
+ * @since Authlete 3.0.22
+ */
public long getValidity()
{
return validity;
}
+ /**
+ * Sets the TSL publishing frequency in every X hours.
+ *
+ * @param TSL publish frequency
+ *
+ * @return this {@code TslConfigData} instance for method chaining
+ *
+ * @since 4.31
+ * @since Authlete 3.0.22
+ */
public TslConfigData setPublishFrequency(long publishFrequency)
{
this.publishFrequency = publishFrequency;
@@ -120,11 +165,29 @@ public TslConfigData setPublishFrequency(long publishFrequency)
return this;
}
+ /**
+ * Returns the TSL publishing frequency.
+ *
+ * @return TSL publishing frequency
+ *
+ * @since 4.31
+ * @since Authlete 3.0.22
+ */
public long getPublishFrequency()
{
return publishFrequency;
}
+ /**
+ * Sets the ttl value of TSL in hours.
+ *
+ * @param ttl value
+ *
+ * @return this {@code TslConfigData} instance for method chaining
+ *
+ * @since 4.31
+ * @since Authlete 3.0.22
+ */
public TslConfigData setTimeToLive(long timeToLive)
{
this.timeToLive = timeToLive;
@@ -132,11 +195,29 @@ public TslConfigData setTimeToLive(long timeToLive)
return this;
}
+ /**
+ * Returns the ttl value.
+ *
+ * @return ttl value
+ *
+ * @since 4.31
+ * @since Authlete 3.0.22
+ */
public long getTimeToLive()
{
return timeToLive;
}
+ /**
+ * Sets the TSL publishing endpoint.
+ *
+ * @param publish endpoint
+ *
+ * @return this {@code TslConfigData} instance for method chaining
+ *
+ * @since 4.31
+ * @since Authlete 3.0.22
+ */
public TslConfigData setPublishEndpoint(URI publishEndpoint)
{
this.publishEndpoint = publishEndpoint;
@@ -144,6 +225,14 @@ public TslConfigData setPublishEndpoint(URI publishEndpoint)
return this;
}
+ /**
+ * Returns the TSL publishing endpoint.
+ *
+ * @return publishing endpoint
+ *
+ * @since 4.31
+ * @since Authlete 3.0.22
+ */
public URI getPublishEndpoint()
{
return publishEndpoint;
diff --git a/src/main/java/com/authlete/common/dto/TslEntriesResponse.java b/src/main/java/com/authlete/common/dto/TslEntriesResponse.java
index d968da6915..f4eeb5f885 100644
--- a/src/main/java/com/authlete/common/dto/TslEntriesResponse.java
+++ b/src/main/java/com/authlete/common/dto/TslEntriesResponse.java
@@ -9,7 +9,8 @@
* @since Authlete 3.0.22
*
*/
-public class TslEntriesResponse {
+public class TslEntriesResponse
+{
private static final long serialVersionUID = 1L;
@@ -46,43 +47,51 @@ public class TslEntriesResponse {
private TslEntry[] tslEntries;
- public TslEntriesResponse setStart(int start) {
+ public TslEntriesResponse setStart(int start)
+ {
this.start = start;
return this;
}
- public int getStart() {
+ public int getStart()
+ {
return start;
}
- public TslEntriesResponse setEnd(int end) {
+ public TslEntriesResponse setEnd(int end)
+ {
this.end = end;
return this;
}
- public int getEnd() {
+ public int getEnd()
+ {
return end;
}
- public TslEntriesResponse setTotalCount(int totalCount) {
+ public TslEntriesResponse setTotalCount(int totalCount)
+ {
this.totalCount = totalCount;
return this;
}
- public int getTotalCount() {
+ public int getTotalCount()
+ {
return totalCount;
}
- public TslEntriesResponse setTslEntries(TslEntry[] tslEntries) {
+ public TslEntriesResponse setTslEntries(TslEntry[] tslEntries)
+ {
this.tslEntries = tslEntries;
return this;
}
- public TslEntry[] getTslEntries() {
+ public TslEntry[] getTslEntries()
+ {
return tslEntries;
}
}
From 88132ea08b7e58ab78102848eb3e23dc31e1eb95 Mon Sep 17 00:00:00 2001
From: bilalashraf123
Date: Wed, 3 Dec 2025 15:49:49 +0500
Subject: [PATCH 11/19] improved javadocs
---
.../java/com/authlete/common/dto/Service.java | 2 +-
.../authlete/common/dto/TslConfigData.java | 12 +--
.../common/dto/TslEntriesResponse.java | 79 ++++++++++++++++---
.../com/authlete/common/dto/TslEntry.java | 79 ++++++++++++++++---
.../authlete/common/dto/TslGetRequest.java | 41 +++++++---
.../authlete/common/dto/TslGetResponse.java | 44 +++++++++--
.../dto/TslPopulateUnusedIndexesRequest.java | 29 +++++--
.../authlete/common/dto/TslPublishConfig.java | 46 +++++++++--
.../common/dto/TslPublishConfigsResponse.java | 40 +++++++---
.../common/dto/TslPublishRequest.java | 39 ++++++---
.../dto/TslTokenStatusUpdateRequest.java | 68 ++++++++++++----
11 files changed, 393 insertions(+), 86 deletions(-)
diff --git a/src/main/java/com/authlete/common/dto/Service.java b/src/main/java/com/authlete/common/dto/Service.java
index 5ba690db54..2c00372ef6 100644
--- a/src/main/java/com/authlete/common/dto/Service.java
+++ b/src/main/java/com/authlete/common/dto/Service.java
@@ -1961,7 +1961,7 @@ public class Service implements Serializable
private boolean httpAliasProhibited;
/**
- * The flag indicating whether the feature of Trust status list publishing for
+ * The flag indicating whether the feature of TSL publishing for
* this service is enabled or not.
*
* @since 4.31
diff --git a/src/main/java/com/authlete/common/dto/TslConfigData.java b/src/main/java/com/authlete/common/dto/TslConfigData.java
index e8ca2f8c22..d3796ae6fb 100644
--- a/src/main/java/com/authlete/common/dto/TslConfigData.java
+++ b/src/main/java/com/authlete/common/dto/TslConfigData.java
@@ -29,7 +29,7 @@ public class TslConfigData implements Serializable
private static final long serialVersionUID = 1L;
/**
- * The format of the TSL. Possible values are JWT and CWT. Currently only JWT is supported
+ * The format of the TSL. Possible values are jwt and cwt. Currently only jwt is supported
*
* @since 4.31
* @since Authlete 3.0.22
@@ -37,7 +37,7 @@ public class TslConfigData implements Serializable
private TslPublishFormat format;
/**
- * The validity of the TSL in hours
+ * The validity of the TSL in hours.
*
* @since 4.31
* @since Authlete 3.0.22
@@ -45,7 +45,7 @@ public class TslConfigData implements Serializable
private long validity;
/**
- * Publish TSL after every X hours
+ * Publish TSL after every X hours.
*
* @since 4.31
* @since Authlete 3.0.22
@@ -71,7 +71,8 @@ public class TslConfigData implements Serializable
/**
* The default constructor.
*/
- public TslConfigData() {
+ public TslConfigData()
+ {
}
/**
@@ -129,7 +130,8 @@ public TslPublishFormat getFormat()
* @since 4.31
* @since Authlete 3.0.22
*/
- public TslConfigData setValidity(long validity) {
+ public TslConfigData setValidity(long validity)
+ {
this.validity = validity;
return this;
diff --git a/src/main/java/com/authlete/common/dto/TslEntriesResponse.java b/src/main/java/com/authlete/common/dto/TslEntriesResponse.java
index f4eeb5f885..157f312b07 100644
--- a/src/main/java/com/authlete/common/dto/TslEntriesResponse.java
+++ b/src/main/java/com/authlete/common/dto/TslEntriesResponse.java
@@ -3,20 +3,25 @@
/**
* Response from Authlete's {@code /tsl/entries/list} API.
*
- * This class contains list of TSL token entries.
+ *
+ * This class represents the result of a query that retrieves
+ * a list of TSL (Token Status List) token entries. It contains
+ * information about pagination (start and end indexes), total
+ * entry count, and the actual list of {@link TslEntry} objects.
+ *
*
* @since 4.31
* @since Authlete 3.0.22
- *
*/
public class TslEntriesResponse
{
-
private static final long serialVersionUID = 1L;
/**
* The start index (inclusive) for the result set of the query.
*
+ * @return The start index.
+ *
* @since 4.31
* @since Authlete 3.0.22
*/
@@ -25,13 +30,17 @@ public class TslEntriesResponse
/**
* The end index (exclusive) for the result set of the query.
*
+ * @return The end index.
+ *
* @since 4.31
* @since Authlete 3.0.22
*/
private int end;
/**
- * Total count of the entries
+ * The total number of entries available for the query, regardless of pagination.
+ *
+ * @return The total count of entries.
*
* @since 4.31
* @since Authlete 3.0.22
@@ -39,57 +48,107 @@ public class TslEntriesResponse
private int totalCount;
/**
- * TSL token entries
+ * The array of TSL token entries returned by the query.
+ *
+ * @return An array of {@link TslEntry} objects.
*
* @since 4.31
* @since Authlete 3.0.22
*/
-
private TslEntry[] tslEntries;
+
+ /**
+ * Set the start index (inclusive) for the result set.
+ *
+ * @param start
+ * The start index.
+ *
+ * @return {@code this} object for method chaining.
+ */
public TslEntriesResponse setStart(int start)
{
this.start = start;
-
return this;
}
+ /**
+ * Get the start index (inclusive) for the result set.
+ *
+ * @return The start index.
+ */
public int getStart()
{
return start;
}
+ /**
+ * Set the end index (exclusive) for the result set.
+ *
+ * @param end
+ * The end index.
+ *
+ * @return {@code this} object for method chaining.
+ */
public TslEntriesResponse setEnd(int end)
{
this.end = end;
-
return this;
}
+ /**
+ * Get the end index (exclusive) for the result set.
+ *
+ * @return The end index.
+ */
public int getEnd()
{
return end;
}
+ /**
+ * Set the total count of all entries matching the query.
+ *
+ * @param totalCount
+ * The total number of matching entries.
+ *
+ * @return {@code this} object for method chaining.
+ */
public TslEntriesResponse setTotalCount(int totalCount)
{
this.totalCount = totalCount;
-
return this;
}
+ /**
+ * Get the total number of entries matching the query.
+ *
+ * @return The total count.
+ */
public int getTotalCount()
{
return totalCount;
}
+ /**
+ * Set the list of TSL token entries.
+ *
+ * @param tslEntries
+ * An array of {@link TslEntry} objects.
+ *
+ * @return {@code this} object for method chaining.
+ */
public TslEntriesResponse setTslEntries(TslEntry[] tslEntries)
{
this.tslEntries = tslEntries;
-
return this;
}
+ /**
+ * Get the list of TSL token entries returned by the query.
+ *
+ * @return An array of {@link TslEntry} objects, or {@code null} if none.
+ */
public TslEntry[] getTslEntries()
{
return tslEntries;
diff --git a/src/main/java/com/authlete/common/dto/TslEntry.java b/src/main/java/com/authlete/common/dto/TslEntry.java
index 7ba2446aa6..96e47fb8d4 100644
--- a/src/main/java/com/authlete/common/dto/TslEntry.java
+++ b/src/main/java/com/authlete/common/dto/TslEntry.java
@@ -3,18 +3,24 @@
import com.authlete.common.types.TslTokenStatus;
/**
- * This class contains token entries on which to build the TSL
+ * Represents a single token entry used in constructing a Token Status List (TSL).
+ *
+ *
+ * Each entry corresponds to an issued VC/token and includes its index, unique
+ * token ID, current status, and usage flag. These objects are typically returned
+ * as part of a list in {@code /tsl/entries/list} responses.
+ *
*
* @since 4.31
* @since Authlete 3.0.22
- *
*/
public class TslEntry
{
private static final long serialVersionUID = 1L;
/**
- * Token index that represents the token in the issued VC/token.
+ * The token index associated with the issued VC/token.
+ * This index helps uniquely identify the token within a service.
*
* @since 4.31
* @since Authlete 3.0.22
@@ -22,7 +28,8 @@ public class TslEntry
private int tokenIndex;
/**
- * Unique ID assigned to each issued VC/token.
+ * The unique token ID assigned at issuance time.
+ * This value is globally unique per token/VC.
*
* @since 4.31
* @since Authlete 3.0.22
@@ -30,59 +37,111 @@ public class TslEntry
private String tokenId;
/**
- * Current status of the issued VC/token.
+ * The current status of the issued VC/token.
+ *
+ * @see TslTokenStatus
*
* @since 4.31
* @since Authlete 3.0.22
*/
-
private TslTokenStatus tokenStatus;
+ /**
+ * Indicates whether this token entry has been marked as used.
+ */
private boolean isUsed;
+ /**
+ * Set the token index associated with this entry.
+ *
+ * @param tokenIndex
+ * The token index.
+ *
+ * @return {@code this} object for method chaining.
+ */
public TslEntry setTokenIndex(int tokenIndex)
{
this.tokenIndex = tokenIndex;
-
return this;
}
+ /**
+ * Get the token index associated with this entry.
+ *
+ * @return The token index.
+ */
public int getTokenIndex()
{
return tokenIndex;
}
+ /**
+ * Set the unique token ID for this entry.
+ *
+ * @param tokenId
+ * The unique token identifier.
+ *
+ * @return {@code this} object for method chaining.
+ */
public TslEntry setTokenId(String tokenId)
{
this.tokenId = tokenId;
-
return this;
}
+ /**
+ * Get the unique token ID associated with this entry.
+ *
+ * @return The token ID.
+ */
public String getTokenId()
{
return tokenId;
}
+ /**
+ * Set the current token status.
+ *
+ * @param tokenStatus
+ * The status of the token.
+ *
+ * @return {@code this} object for method chaining.
+ */
public TslEntry setTokenStatus(TslTokenStatus tokenStatus)
{
this.tokenStatus = tokenStatus;
-
return this;
}
+ /**
+ * Get the current status of the issued token.
+ *
+ * @return The token status.
+ */
public TslTokenStatus getTokenStatus()
{
return tokenStatus;
}
+ /**
+ * Set the usage flag for this token entry.
+ *
+ * @param isUsed
+ * {@code true} if the entry is already used; {@code false} otherwise.
+ *
+ * @return {@code this} object for method chaining.
+ */
public TslEntry setIsUsed(boolean isUsed)
{
this.isUsed = isUsed;
-
return this;
}
+ /**
+ * Check whether this token entry has been marked as used.
+ *
+ * @return {@code true} if the entry is used; {@code false} otherwise.
+ */
public boolean isUsed()
{
return isUsed;
diff --git a/src/main/java/com/authlete/common/dto/TslGetRequest.java b/src/main/java/com/authlete/common/dto/TslGetRequest.java
index 7360d09efb..85b7d973d2 100644
--- a/src/main/java/com/authlete/common/dto/TslGetRequest.java
+++ b/src/main/java/com/authlete/common/dto/TslGetRequest.java
@@ -5,40 +5,59 @@
/**
* Request to Authlete's {@code /tsl/publish} API.
*
- * This class is used to get the published TSL.
- * The set consists of the following.
+ *
+ * This class represents a request to retrieve a published Token Status List (TSL)
+ * for a specific service. The request requires the caller to specify the
+ * {@code serviceNumber}, which uniquely identifies the service whose TSL is
+ * being requested.
+ *
*
- *
- *
{@code serviceNumber}
- *
+ *
+ * For more details about Token Status Lists (TSL), see:
+ *
+ *
+ * @see
+ * Token Status List (TSL) Specification
*
* @since 4.31
* @since Authlete 3.0.22
- *
- * @see Token Status List (TSL)
*/
public class TslGetRequest implements Serializable
{
-
private static final long serialVersionUID = 1L;
/**
- * Service number whose TSL is to be retrieved.
+ * The service number for which the TSL is requested.
+ *
+ *
+ * This value uniquely identifies a service within Authlete's environment.
+ * The TSL associated with this service number will be retrieved when the
+ * request is processed.
+ *
*
* @since 4.31
* @since Authlete 3.0.22
*/
private int serviceNumber;
+ /**
+ * Set the service number whose Token Status List (TSL) should be retrieved.
+ *
+ * @param serviceNumber
+ * The service number to query.
+ */
public void setServiceNumber(int serviceNumber)
{
this.serviceNumber = serviceNumber;
}
+ /**
+ * Get the service number whose Token Status List (TSL) is being requested.
+ *
+ * @return The service number.
+ */
public int getServiceNumber()
{
return serviceNumber;
}
}
-
diff --git a/src/main/java/com/authlete/common/dto/TslGetResponse.java b/src/main/java/com/authlete/common/dto/TslGetResponse.java
index 95461eca5d..6509269007 100644
--- a/src/main/java/com/authlete/common/dto/TslGetResponse.java
+++ b/src/main/java/com/authlete/common/dto/TslGetResponse.java
@@ -5,17 +5,25 @@
/**
* Response from Authlete's {@code /service/tsl} API.
*
+ *
+ * This class represents the response returned when retrieving a Token Status
+ * List (TSL) from Authlete. The response includes the TSL format (e.g., JWT)
+ * and the TSL content itself.
+ *
+ *
* @since 4.31
* @since Authlete 3.0.22
- *
*/
public class TslGetResponse implements Serializable
{
-
private static final long serialVersionUID = 1L;
/**
- * TSL format e.g. jwt.
+ * The format of the TSL, such as {@code "jwt"}.
+ *
+ *
+ * This value indicates how the TSL is encoded or represented.
+ *
*
* @since 4.31
* @since Authlete 3.0.22
@@ -23,30 +31,56 @@ public class TslGetResponse implements Serializable
private String format;
/**
- * TSL
+ * The Token Status List (TSL) in the format specified by {@link #format}.
+ *
+ *
+ * The TSL is typically represented as a JWT or another supported encoding.
+ *
*
* @since 4.31
* @since Authlete 3.0.22
*/
private String tsl;
+ /**
+ * Set the format of the Token Status List (TSL).
+ *
+ * @param format
+ * The TSL format (e.g., {@code "jwt"}).
+ */
public void setFormat(String format)
{
this.format = format;
}
+ /**
+ * Get the format of the Token Status List (TSL).
+ *
+ * @return The TSL format.
+ */
public String getFormat()
{
return format;
}
+ /**
+ * Set the Token Status List (TSL).
+ *
+ * @param tsl
+ * The TSL content in the format specified by {@link #format}.
+ */
public void setTsl(String tsl)
{
this.tsl = tsl;
}
+ /**
+ * Get the Token Status List (TSL).
+ *
+ * @return The TSL content.
+ */
public String getTsl()
{
return tsl;
}
- }
+}
diff --git a/src/main/java/com/authlete/common/dto/TslPopulateUnusedIndexesRequest.java b/src/main/java/com/authlete/common/dto/TslPopulateUnusedIndexesRequest.java
index 00f524cc0a..1015cbc458 100644
--- a/src/main/java/com/authlete/common/dto/TslPopulateUnusedIndexesRequest.java
+++ b/src/main/java/com/authlete/common/dto/TslPopulateUnusedIndexesRequest.java
@@ -3,32 +3,51 @@
import java.io.Serializable;
/**
- * This class is used to pre-populate the unused indexes which later will be used in the
- * issued VCs/tokens.
+ * Request to Authlete's {@code /service/populate/unused/indexes} API.
*
- * A request to Authlete's {@code /service/populate/unused/indexes} API.
+ *
+ * This class represents a request to pre-populate unused token indexes for a
+ * particular service. These unused indexes are later consumed when issuing
+ * Verifiable Credentials (VCs) or access tokens, allowing efficient allocation
+ * of token indices within a Token Status List (TSL) environment.
+ *
*
* @since 4.31
* @since Authlete 3.0.22
-
*/
public class TslPopulateUnusedIndexesRequest implements Serializable
{
private static final long serialVersionUID = 1L;
/**
- * Service number against which unused indexes is populated.
+ * The service number for which unused token indexes should be populated.
+ *
+ *
+ * This value uniquely identifies the service under which the unused
+ * indexes will be created.
+ *
*
* @since 4.31
* @since Authlete 3.0.22
*/
private int serviceNumber;
+ /**
+ * Set the service number for which unused token indexes should be populated.
+ *
+ * @param serviceNumber
+ * The service number to populate indexes for.
+ */
public void setServiceNumber(int serviceNumber)
{
this.serviceNumber = serviceNumber;
}
+ /**
+ * Get the service number for which unused token indexes should be populated.
+ *
+ * @return The service number.
+ */
public int getServiceNumber()
{
return serviceNumber;
diff --git a/src/main/java/com/authlete/common/dto/TslPublishConfig.java b/src/main/java/com/authlete/common/dto/TslPublishConfig.java
index 22c260097c..8038ec6903 100644
--- a/src/main/java/com/authlete/common/dto/TslPublishConfig.java
+++ b/src/main/java/com/authlete/common/dto/TslPublishConfig.java
@@ -1,18 +1,28 @@
package com.authlete.common.dto;
/**
- * This class contains per service TSL publish configurations.
+ * Represents the Token Status List (TSL) publish configuration for a service.
+ *
+ *
+ * This class contains per-service settings related to TSL publication, including
+ * the service identifier and the Unix timestamp (in seconds) indicating when the
+ * next TSL will be published.
+ *
*
* @since 4.31
* @since Authlete 3.0.22
- *
*/
public class TslPublishConfig {
private static final long serialVersionUID = 1L;
/**
- * Service number whose TSL will be published at next publish time.
+ * The service number for which the TSL publication schedule applies.
+ *
+ *
+ * This uniquely identifies the service whose TSL will be published at
+ * the configured next publish time.
+ *
*
* @since 4.31
* @since Authlete 3.0.22
@@ -20,27 +30,53 @@ public class TslPublishConfig {
private int serviceNumber;
/**
- * It specifies the time when next TSL will be published. It is in seconds
+ * The Unix timestamp (in seconds) indicating when the next TSL
+ * will be published for this service.
+ *
+ *
+ * This value allows services to schedule periodic TSL publication.
+ *
*
* @since 4.31
* @since Authlete 3.0.22
*/
private long nextTslPublishTime;
+ /**
+ * Set the service number associated with this TSL publish configuration.
+ *
+ * @param serviceNumber
+ * The service number.
+ */
public void setServiceNumber(int serviceNumber) {
this.serviceNumber = serviceNumber;
}
+ /**
+ * Get the service number associated with this TSL publish configuration.
+ *
+ * @return The service number.
+ */
public int getServiceNumber() {
return serviceNumber;
}
+ /**
+ * Set the Unix timestamp (in seconds) for the next TSL publication time.
+ *
+ * @param nextTslPublishTime
+ * The next publish time, in seconds.
+ */
public void setNextTslPublishTime(long nextTslPublishTime) {
this.nextTslPublishTime = nextTslPublishTime;
}
+ /**
+ * Get the Unix timestamp (in seconds) for the next TSL publication time.
+ *
+ * @return The next publish time, in seconds.
+ */
public long getNextTslPublishTime() {
return nextTslPublishTime;
}
-
}
diff --git a/src/main/java/com/authlete/common/dto/TslPublishConfigsResponse.java b/src/main/java/com/authlete/common/dto/TslPublishConfigsResponse.java
index 316721556c..3d3cba7a13 100644
--- a/src/main/java/com/authlete/common/dto/TslPublishConfigsResponse.java
+++ b/src/main/java/com/authlete/common/dto/TslPublishConfigsResponse.java
@@ -3,36 +3,58 @@
/**
* Response from Authlete's {@code /tsl/publish/configs} API.
*
- * This class contains TSL publish configuration response which decided when next TSL
- * is going to be published.
+ *
+ * This class represents the response containing Token Status List (TSL)
+ * publication configuration information for one or more services. Each entry
+ * indicates when the next TSL will be published for the corresponding service.
+ *
+ *
+ *
+ * The response includes an array of {@link TslPublishConfig} objects, each
+ * describing:
+ *
+ *
+ *
+ *
{@code serviceNumber} – The service identifier.
+ *
{@code nextTslPublishTime} – The scheduled Unix timestamp (seconds) for the next TSL publication.
+ *
*
* @since 4.31
* @since Authlete 3.0.22
- *
*/
public class TslPublishConfigsResponse extends ApiResponse
{
private static final long serialVersionUID = 1L;
/**
- * TSL publish configurations reponse.
- * It contains an array of the following information.
+ * The list of TSL publish configurations.
*
- *
- *
{@code serviceNumber}
- *
{@code nextTslPublishTime}
- *
+ *
+ * Each element in the array contains the publish schedule for a service,
+ * including the service number and the next scheduled publish time.
+ *
*
* @since 4.31
* @since Authlete 3.0.22
*/
private TslPublishConfig[] tslPublishConfigs;
+ /**
+ * Set the list of TSL publish configurations.
+ *
+ * @param tslPublishConfigs
+ * An array of {@link TslPublishConfig} objects.
+ */
public void setTslPublishConfigs(TslPublishConfig[] tslPublishConfigs)
{
this.tslPublishConfigs = tslPublishConfigs;
}
+ /**
+ * Get the list of TSL publish configurations.
+ *
+ * @return An array of {@link TslPublishConfig} objects.
+ */
public TslPublishConfig[] getTslPublishConfigs()
{
return tslPublishConfigs;
diff --git a/src/main/java/com/authlete/common/dto/TslPublishRequest.java b/src/main/java/com/authlete/common/dto/TslPublishRequest.java
index e6147f0fd5..d3e6858c00 100644
--- a/src/main/java/com/authlete/common/dto/TslPublishRequest.java
+++ b/src/main/java/com/authlete/common/dto/TslPublishRequest.java
@@ -5,40 +5,57 @@
/**
* Request to Authlete's {@code /tsl/publish} API.
*
- * This class is used to publish the TSL.
- * The set consists of the following.
+ *
+ * This class represents a request to publish a Token Status List (TSL) for
+ * a specific service. The request contains the {@code serviceNumber}, which
+ * uniquely identifies the service whose TSL is to be published.
+ *
*
- *
- *
{@code serviceNumber}
- *
+ *
+ * For more details about Token Status Lists (TSL), see:
+ *
+ *
+ * @see
+ * Token Status List (TSL) Specification
*
* @since 4.31
* @since Authlete 3.0.22
- *
- * @see Token Status List (TSL)
*/
public class TslPublishRequest implements Serializable
{
-
private static final long serialVersionUID = 1L;
/**
- * Service number whose TSL is to be published
+ * The service number whose TSL is to be published.
+ *
+ *
+ * This uniquely identifies the service within Authlete's environment. When
+ * this request is processed, the TSL for this service will be published.
+ *
*
* @since 4.31
* @since Authlete 3.0.22
*/
private int serviceNumber;
+ /**
+ * Set the service number whose TSL is to be published.
+ *
+ * @param serviceNumber
+ * The service number to publish the TSL for.
+ */
public void setServiceNumber(int serviceNumber)
{
this.serviceNumber = serviceNumber;
}
+ /**
+ * Get the service number whose TSL is to be published.
+ *
+ * @return The service number.
+ */
public int getServiceNumber()
{
return serviceNumber;
}
}
-
diff --git a/src/main/java/com/authlete/common/dto/TslTokenStatusUpdateRequest.java b/src/main/java/com/authlete/common/dto/TslTokenStatusUpdateRequest.java
index c1337c0216..11548a0adf 100644
--- a/src/main/java/com/authlete/common/dto/TslTokenStatusUpdateRequest.java
+++ b/src/main/java/com/authlete/common/dto/TslTokenStatusUpdateRequest.java
@@ -5,31 +5,37 @@
import java.io.Serializable;
/**
- *
* Request to Authlete's {@code /tsl/token/status} API.
*
- * A class that updates the status of the issued VCs/tokens which later added in the issued TSL.
- * The set consists of the following.
+ *
+ * This class represents a request to update the status of an issued
+ * Verifiable Credential (VC) or token. The updated status will later
+ * be included in the issued Token Status List (TSL). The request contains
+ * the following information:
+ *
*
*
- *
{@code tokenId}
- *
{@code tokenStatus}
- *
{@code tokenIndex}
+ *
{@code tokenId} – The unique identifier of the issued token/VC.
+ *
{@code tokenStatus} – The new status to assign to the token.
+ *
{@code tokenIndex} – The index of the token in the issued TSL.
*
*
+ *
+ * For more details about Token Status Lists (TSL), see:
+ *
+ *
+ * @see
+ * Token Status List (TSL) Specification
+ *
* @since 4.31
* @since Authlete 3.0.22
- *
- * @see Token Status List (TSL)
*/
public class TslTokenStatusUpdateRequest implements Serializable
{
-
private static final long serialVersionUID = 1L;
/**
- * Token ID used to identity the issued VC/token whose status can be changed.
+ * The token ID used to identify the issued VC/token whose status is to be changed.
*
* @since 4.31
* @since Authlete 3.0.22
@@ -37,47 +43,81 @@ public class TslTokenStatusUpdateRequest implements Serializable
private String tokenId;
/**
- * Token status to change.
+ * The token status to be set.
+ *
+ * @see TslTokenStatus
*
* @since 4.31
* @since Authlete 3.0.22
*/
-
private TslTokenStatus tokenStatus;
/**
- * Token index in the issued TSL.
+ * The index of the token in the issued TSL.
*
* @since 4.31
* @since Authlete 3.0.22
*/
private int tokenIndex;
+ /**
+ * Set the token ID of the issued VC/token whose status is to be updated.
+ *
+ * @param tokenId
+ * The unique token identifier.
+ */
public void setTokenId(String tokenId)
{
this.tokenId = tokenId;
}
+ /**
+ * Get the token ID of the issued VC/token whose status is being updated.
+ *
+ * @return The token ID.
+ */
public String getTokenId()
{
return tokenId;
}
+ /**
+ * Set the token status to assign to the issued token/VC.
+ *
+ * @param tokenStatus
+ * The new token status.
+ */
public void setTokenStatus(TslTokenStatus tokenStatus)
{
this.tokenStatus = tokenStatus;
}
+ /**
+ * Get the token status currently set for this update request.
+ *
+ * @return The token status.
+ */
public TslTokenStatus getTokenStatus()
{
return tokenStatus;
}
+ /**
+ * Set the token index in the issued TSL.
+ *
+ * @param tokenIndex
+ * The index of the token.
+ */
public void setTokenIndex(int tokenIndex)
{
this.tokenIndex = tokenIndex;
}
+ /**
+ * Get the token index in the issued TSL.
+ *
+ * @return The token index.
+ */
public int getIndex()
{
return tokenIndex;
From 3a318bdeb58af1e693653e927951f90e442ef79e Mon Sep 17 00:00:00 2001
From: bilalashraf123
Date: Wed, 3 Dec 2025 15:55:09 +0500
Subject: [PATCH 12/19] improved javadocs
---
pom.xml | 44 +++++++++----------
.../authlete/common/dto/TslPublishConfig.java | 15 ++++---
.../common/types/TslPublishFormat.java | 3 +-
.../authlete/common/types/TslTokenStatus.java | 9 ++--
4 files changed, 40 insertions(+), 31 deletions(-)
diff --git a/pom.xml b/pom.xml
index 5f67f6cef3..4b8ea39976 100644
--- a/pom.xml
+++ b/pom.xml
@@ -308,28 +308,28 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+ org.apache.maven.plugins
+ maven-gpg-plugin
+ 3.1.0
+
+
+ sign-artifacts
+ verify
+
+ sign
+
+
+ E834481D
+ ${env.GPG_PASSPHRASE}
+
+ --pinentry-mode
+ loopback
+
+
+
+
+ org.codehaus.mojo
diff --git a/src/main/java/com/authlete/common/dto/TslPublishConfig.java b/src/main/java/com/authlete/common/dto/TslPublishConfig.java
index 8038ec6903..5321491dc2 100644
--- a/src/main/java/com/authlete/common/dto/TslPublishConfig.java
+++ b/src/main/java/com/authlete/common/dto/TslPublishConfig.java
@@ -12,7 +12,8 @@
* @since 4.31
* @since Authlete 3.0.22
*/
-public class TslPublishConfig {
+public class TslPublishConfig
+{
private static final long serialVersionUID = 1L;
@@ -48,7 +49,8 @@ public class TslPublishConfig {
* @param serviceNumber
* The service number.
*/
- public void setServiceNumber(int serviceNumber) {
+ public void setServiceNumber(int serviceNumber)
+ {
this.serviceNumber = serviceNumber;
}
@@ -57,7 +59,8 @@ public void setServiceNumber(int serviceNumber) {
*
* @return The service number.
*/
- public int getServiceNumber() {
+ public int getServiceNumber()
+ {
return serviceNumber;
}
@@ -67,7 +70,8 @@ public int getServiceNumber() {
* @param nextTslPublishTime
* The next publish time, in seconds.
*/
- public void setNextTslPublishTime(long nextTslPublishTime) {
+ public void setNextTslPublishTime(long nextTslPublishTime)
+ {
this.nextTslPublishTime = nextTslPublishTime;
}
@@ -76,7 +80,8 @@ public void setNextTslPublishTime(long nextTslPublishTime) {
*
* @return The next publish time, in seconds.
*/
- public long getNextTslPublishTime() {
+ public long getNextTslPublishTime()
+ {
return nextTslPublishTime;
}
}
diff --git a/src/main/java/com/authlete/common/types/TslPublishFormat.java b/src/main/java/com/authlete/common/types/TslPublishFormat.java
index d493a3ba5e..e483d3d2aa 100644
--- a/src/main/java/com/authlete/common/types/TslPublishFormat.java
+++ b/src/main/java/com/authlete/common/types/TslPublishFormat.java
@@ -2,7 +2,8 @@
import java.util.EnumSet;
-public enum TslPublishFormat {
+public enum TslPublishFormat
+{
/**
* Currently jwt is supported. TSL publishing cwt format will be supported in the next iteration
diff --git a/src/main/java/com/authlete/common/types/TslTokenStatus.java b/src/main/java/com/authlete/common/types/TslTokenStatus.java
index ff8d63867e..c102ea9136 100644
--- a/src/main/java/com/authlete/common/types/TslTokenStatus.java
+++ b/src/main/java/com/authlete/common/types/TslTokenStatus.java
@@ -2,7 +2,8 @@
import java.util.EnumSet;
-public enum TslTokenStatus {
+public enum TslTokenStatus
+{
VALID((short)0, "valid"),
INVALID((short)1, "invalid"),
@@ -15,7 +16,8 @@ public enum TslTokenStatus {
private final String mString;
- private TslTokenStatus(short value, String string) {
+ private TslTokenStatus(short value, String string)
+ {
mValue = value;
mString = string;
}
@@ -24,7 +26,8 @@ private TslTokenStatus(short value, String string) {
/**
* Get the integer representation of this enum instance.
*/
- public short getValue() {
+ public short getValue()
+ {
return mValue;
}
From 388297d4aa1f8a0994acc530b31c0bf7826d9c33 Mon Sep 17 00:00:00 2001
From: bilalashraf123
Date: Mon, 8 Dec 2025 17:37:54 +0500
Subject: [PATCH 13/19] worked on PR comments
---
pom.xml | 46 ++++-----
...quest.java => GetPublishedTslRequest.java} | 23 +++--
...onse.java => GetPublishedTslResponse.java} | 42 ++++----
...sponse.java => GetTslEntriesResponse.java} | 68 ++++++-------
.../java/com/authlete/common/dto/Service.java | 39 +++++---
.../authlete/common/dto/TslConfigData.java | 97 +++++++------------
.../com/authlete/common/dto/TslEntry.java | 61 ++++++------
.../authlete/common/dto/TslPublishConfig.java | 25 +++--
.../common/dto/TslPublishConfigsResponse.java | 19 ++--
.../common/dto/TslPublishRequest.java | 19 ++--
.../dto/TslTokenStatusUpdateRequest.java | 45 +++++----
...uest.java => TslUnusedIndexesRequest.java} | 19 ++--
12 files changed, 249 insertions(+), 254 deletions(-)
rename src/main/java/com/authlete/common/dto/{TslGetRequest.java => GetPublishedTslRequest.java} (77%)
rename src/main/java/com/authlete/common/dto/{TslGetResponse.java => GetPublishedTslResponse.java} (63%)
rename src/main/java/com/authlete/common/dto/{TslEntriesResponse.java => GetTslEntriesResponse.java} (64%)
rename src/main/java/com/authlete/common/dto/{TslPopulateUnusedIndexesRequest.java => TslUnusedIndexesRequest.java} (77%)
diff --git a/pom.xml b/pom.xml
index 4b8ea39976..038d6e4fe2 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
com.authleteauthlete-java-common
- 4.34-SNAPSHOT
+ 4.33-SNAPSHOTjar${project.groupId}:${project.artifactId}
@@ -308,28 +308,28 @@
-
- org.apache.maven.plugins
- maven-gpg-plugin
- 3.1.0
-
-
- sign-artifacts
- verify
-
- sign
-
-
- E834481D
- ${env.GPG_PASSPHRASE}
-
- --pinentry-mode
- loopback
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
org.codehaus.mojo
diff --git a/src/main/java/com/authlete/common/dto/TslGetRequest.java b/src/main/java/com/authlete/common/dto/GetPublishedTslRequest.java
similarity index 77%
rename from src/main/java/com/authlete/common/dto/TslGetRequest.java
rename to src/main/java/com/authlete/common/dto/GetPublishedTslRequest.java
index 85b7d973d2..b4fb4fdb3e 100644
--- a/src/main/java/com/authlete/common/dto/TslGetRequest.java
+++ b/src/main/java/com/authlete/common/dto/GetPublishedTslRequest.java
@@ -3,7 +3,7 @@
import java.io.Serializable;
/**
- * Request to Authlete's {@code /tsl/publish} API.
+ * Request to Authlete's {@code /service/tsl} API.
*
*
* This class represents a request to retrieve a published Token Status List (TSL)
@@ -16,13 +16,13 @@
* For more details about Token Status Lists (TSL), see:
*
*
- * @see
+ * @see
* Token Status List (TSL) Specification
*
- * @since 4.31
+ * @since 4.33
* @since Authlete 3.0.22
*/
-public class TslGetRequest implements Serializable
+public class GetPublishedTslRequest implements Serializable
{
private static final long serialVersionUID = 1L;
@@ -34,9 +34,6 @@ public class TslGetRequest implements Serializable
* The TSL associated with this service number will be retrieved when the
* request is processed.
*
- *
- * @since 4.31
- * @since Authlete 3.0.22
*/
private int serviceNumber;
@@ -44,17 +41,23 @@ public class TslGetRequest implements Serializable
* Set the service number whose Token Status List (TSL) should be retrieved.
*
* @param serviceNumber
- * The service number to query.
+ * The service number to query.
+ *
+ * @return
+ * {@code this} object.
*/
- public void setServiceNumber(int serviceNumber)
+ public GetPublishedTslRequest setServiceNumber(int serviceNumber)
{
this.serviceNumber = serviceNumber;
+
+ return this;
}
/**
* Get the service number whose Token Status List (TSL) is being requested.
*
- * @return The service number.
+ * @return
+ * The service number.
*/
public int getServiceNumber()
{
diff --git a/src/main/java/com/authlete/common/dto/TslGetResponse.java b/src/main/java/com/authlete/common/dto/GetPublishedTslResponse.java
similarity index 63%
rename from src/main/java/com/authlete/common/dto/TslGetResponse.java
rename to src/main/java/com/authlete/common/dto/GetPublishedTslResponse.java
index 6509269007..9d8231f48d 100644
--- a/src/main/java/com/authlete/common/dto/TslGetResponse.java
+++ b/src/main/java/com/authlete/common/dto/GetPublishedTslResponse.java
@@ -7,38 +7,24 @@
*
*
* This class represents the response returned when retrieving a Token Status
- * List (TSL) from Authlete. The response includes the TSL format (e.g., JWT)
+ * List (TSL) from Authlete API. The response includes the TSL format (e.g., JWT)
* and the TSL content itself.
*
*
- * @since 4.31
+ * @since 4.33
* @since Authlete 3.0.22
*/
-public class TslGetResponse implements Serializable
+public class GetPublishedTslResponse implements Serializable
{
private static final long serialVersionUID = 1L;
/**
* The format of the TSL, such as {@code "jwt"}.
- *
- *
- * This value indicates how the TSL is encoded or represented.
- *
- *
- * @since 4.31
- * @since Authlete 3.0.22
*/
private String format;
/**
- * The Token Status List (TSL) in the format specified by {@link #format}.
- *
- *
- * The TSL is typically represented as a JWT or another supported encoding.
- *
- *
- * @since 4.31
- * @since Authlete 3.0.22
+ * The Token Status List (TSL).
*/
private String tsl;
@@ -47,16 +33,22 @@ public class TslGetResponse implements Serializable
*
* @param format
* The TSL format (e.g., {@code "jwt"}).
+ *
+ * @return
+ * {@code this} object.
*/
- public void setFormat(String format)
+ public GetPublishedTslResponse setFormat(String format)
{
this.format = format;
+
+ return this;
}
/**
* Get the format of the Token Status List (TSL).
*
- * @return The TSL format.
+ * @return
+ * The TSL format.
*/
public String getFormat()
{
@@ -68,16 +60,22 @@ public String getFormat()
*
* @param tsl
* The TSL content in the format specified by {@link #format}.
+ *
+ * @return
+ * {@code this} object.
*/
- public void setTsl(String tsl)
+ public GetPublishedTslResponse setTsl(String tsl)
{
this.tsl = tsl;
+
+ return this;
}
/**
* Get the Token Status List (TSL).
*
- * @return The TSL content.
+ * @return
+ * The TSL content.
*/
public String getTsl()
{
diff --git a/src/main/java/com/authlete/common/dto/TslEntriesResponse.java b/src/main/java/com/authlete/common/dto/GetTslEntriesResponse.java
similarity index 64%
rename from src/main/java/com/authlete/common/dto/TslEntriesResponse.java
rename to src/main/java/com/authlete/common/dto/GetTslEntriesResponse.java
index 157f312b07..40769b2578 100644
--- a/src/main/java/com/authlete/common/dto/TslEntriesResponse.java
+++ b/src/main/java/com/authlete/common/dto/GetTslEntriesResponse.java
@@ -1,5 +1,7 @@
package com.authlete.common.dto;
+import java.io.Serializable;
+
/**
* Response from Authlete's {@code /tsl/entries/list} API.
*
@@ -10,50 +12,30 @@
* entry count, and the actual list of {@link TslEntry} objects.
*
*
- * @since 4.31
+ * @since 4.33
* @since Authlete 3.0.22
*/
-public class TslEntriesResponse
+public class GetTslEntriesResponse implements Serializable
{
private static final long serialVersionUID = 1L;
/**
* The start index (inclusive) for the result set of the query.
- *
- * @return The start index.
- *
- * @since 4.31
- * @since Authlete 3.0.22
*/
private int start;
/**
* The end index (exclusive) for the result set of the query.
- *
- * @return The end index.
- *
- * @since 4.31
- * @since Authlete 3.0.22
*/
private int end;
/**
* The total number of entries available for the query, regardless of pagination.
- *
- * @return The total count of entries.
- *
- * @since 4.31
- * @since Authlete 3.0.22
*/
private int totalCount;
/**
* The array of TSL token entries returned by the query.
- *
- * @return An array of {@link TslEntry} objects.
- *
- * @since 4.31
- * @since Authlete 3.0.22
*/
private TslEntry[] tslEntries;
@@ -64,18 +46,21 @@ public class TslEntriesResponse
* @param start
* The start index.
*
- * @return {@code this} object for method chaining.
+ * @return
+ * {@code this} object for method chaining.
*/
- public TslEntriesResponse setStart(int start)
+ public GetTslEntriesResponse setStart(int start)
{
this.start = start;
+
return this;
}
/**
* Get the start index (inclusive) for the result set.
*
- * @return The start index.
+ * @return
+ * The start index.
*/
public int getStart()
{
@@ -86,20 +71,23 @@ public int getStart()
* Set the end index (exclusive) for the result set.
*
* @param end
- * The end index.
+ * The end index.
*
- * @return {@code this} object for method chaining.
+ * @return
+ * {@code this} object for method chaining.
*/
- public TslEntriesResponse setEnd(int end)
+ public GetTslEntriesResponse setEnd(int end)
{
this.end = end;
+
return this;
}
/**
* Get the end index (exclusive) for the result set.
*
- * @return The end index.
+ * @return
+ * The end index.
*/
public int getEnd()
{
@@ -110,20 +98,23 @@ public int getEnd()
* Set the total count of all entries matching the query.
*
* @param totalCount
- * The total number of matching entries.
+ * The total number of matching entries.
*
- * @return {@code this} object for method chaining.
+ * @return
+ * {@code this} object for method chaining.
*/
- public TslEntriesResponse setTotalCount(int totalCount)
+ public GetTslEntriesResponse setTotalCount(int totalCount)
{
this.totalCount = totalCount;
+
return this;
}
/**
* Get the total number of entries matching the query.
*
- * @return The total count.
+ * @return
+ * The total count.
*/
public int getTotalCount()
{
@@ -134,20 +125,23 @@ public int getTotalCount()
* Set the list of TSL token entries.
*
* @param tslEntries
- * An array of {@link TslEntry} objects.
+ * An array of {@link TslEntry} objects.
*
- * @return {@code this} object for method chaining.
+ * @return
+ * {@code this} object for method chaining.
*/
- public TslEntriesResponse setTslEntries(TslEntry[] tslEntries)
+ public GetTslEntriesResponse setTslEntries(TslEntry[] tslEntries)
{
this.tslEntries = tslEntries;
+
return this;
}
/**
* Get the list of TSL token entries returned by the query.
*
- * @return An array of {@link TslEntry} objects, or {@code null} if none.
+ * @return
+ * An array of {@link TslEntry} objects, or {@code null} if none.
*/
public TslEntry[] getTslEntries()
{
diff --git a/src/main/java/com/authlete/common/dto/Service.java b/src/main/java/com/authlete/common/dto/Service.java
index 2c00372ef6..efa499e974 100644
--- a/src/main/java/com/authlete/common/dto/Service.java
+++ b/src/main/java/com/authlete/common/dto/Service.java
@@ -1955,7 +1955,7 @@ public class Service implements Serializable
* Whether to prohibit client ID aliases that start with {@code https://}
* or {@code http://}.
*
- * @since 4.32
+ * @since 4.33
* @since Authlete 3.0.22
*/
private boolean httpAliasProhibited;
@@ -1964,7 +1964,7 @@ public class Service implements Serializable
* The flag indicating whether the feature of TSL publishing for
* this service is enabled or not.
*
- * @since 4.31
+ * @since 4.33
* @since Authlete 3.0.22
*/
private boolean tslPublishingEnabled;
@@ -1973,10 +1973,10 @@ public class Service implements Serializable
/**
* TSL configuration data.
*
- * @since 4.31
+ * @since 4.33
* @since Authlete 3.0.22
*
- * @see
+ * @see
* Trust Status List
*/
private TslConfigData tslConfigData;
@@ -12230,11 +12230,13 @@ public Service setOid4vciVersion(String version)
/*
* Sets whether TSL publishing is enabled for this service.
*
- * @param tslPublishingEnabled {@code true} to enable TSL publishing;
- * {@code false} to disable it.
- * @return this {@link Service} instance for method chaining
+ * @param tslPublishingEnabled
+ * {@code true} to enable TSL publishing. {@code false} to disable it.
*
- * @since 4.31
+ * @return
+ * this {@link Service} instance for method chaining
+ *
+ * @since 4.33
* @since Authlete 3.0.22
*/
public Service setTslPublishingEnabled(boolean tslPublishingEnabled)
@@ -12248,9 +12250,10 @@ public Service setTslPublishingEnabled(boolean tslPublishingEnabled)
* Get the flag indicating whether the feature of TSL publishing
* for this service is enabled or not.
*
- * @return {@code true} if the feature of TSL publishing is enabled.
+ * @return
+ * {@code true} if the feature of TSL publishing is enabled.
*
- * @since 4.31
+ * @since 4.33
* @since Authlete 3.0.22
*/
public boolean isTslPublishingEnabled()
@@ -12314,13 +12317,16 @@ public Service setClientIdMetadataDocumentSupported(boolean supported)
/**
* Sets the {@link TslConfigData} for this service.
*
- * @param tslConfigData the configuration data to be applied
- * @return this {@code Service} instance for method chaining
+ * @param tslConfigData
+ * the configuration data to be applied
*
- * @since 4.31
+ * @return
+ * this {@code Service} instance for method chaining
+ *
+ * @since 4.33
* @since Authlete 3.0.22
*
- * @see
+ * @see
* Trust Status List
*/
public Service setTslConfigData(TslConfigData tslConfigData)
@@ -12871,9 +12877,10 @@ public Service setHttpAliasProhibited(boolean prohibited)
/**
* Retrieves the {@link TslConfigData} associated with this service.
*
- * @return the current {@link TslConfigData}
+ * @return
+ * the current {@link TslConfigData}
*
- * @since 4.31
+ * @since 4.33
* @since Authlete 3.0.22
*/
public TslConfigData getTslConfigData()
diff --git a/src/main/java/com/authlete/common/dto/TslConfigData.java b/src/main/java/com/authlete/common/dto/TslConfigData.java
index d3796ae6fb..96e119e306 100644
--- a/src/main/java/com/authlete/common/dto/TslConfigData.java
+++ b/src/main/java/com/authlete/common/dto/TslConfigData.java
@@ -17,10 +17,10 @@
*
{@code publishEndpoint}
*
*
- * @since 4.31
+ * @since 4.33
* @since Authlete 3.0.22
*
- * @see Token Status List (TSL)
*/
public class TslConfigData implements Serializable
@@ -30,41 +30,26 @@ public class TslConfigData implements Serializable
/**
* The format of the TSL. Possible values are jwt and cwt. Currently only jwt is supported
- *
- * @since 4.31
- * @since Authlete 3.0.22
*/
private TslPublishFormat format;
/**
* The validity of the TSL in hours.
- *
- * @since 4.31
- * @since Authlete 3.0.22
*/
private long validity;
/**
* Publish TSL after every X hours.
- *
- * @since 4.31
- * @since Authlete 3.0.22
*/
private long publishFrequency;
/**
* Time to live in hours which provides indication to verifiers to cache this TSL
- *
- * @since 4.31
- * @since Authlete 3.0.22
*/
private long timeToLive;
/**
* Endpoint where to publish this TSL
- *
- * @since 4.31
- * @since Authlete 3.0.22
*/
private URI publishEndpoint;
@@ -92,13 +77,13 @@ public TslConfigData(TslConfigData tslConfigData)
}
/**
- * Sets the publish format for the TSL configuration.
+ * Sets the publishing format for the TSL configuration.
*
- * @param format the {@link TslPublishFormat} value to set
- * @return this {@code TslConfigData} instance for method chaining
+ * @param format
+ * the {@link TslPublishFormat} value to set
*
- * @since 4.31
- * @since Authlete 3.0.22
+ * @return
+ * this {@code TslConfigData} instance for method chaining
*/
public TslConfigData setFormat(TslPublishFormat format)
{
@@ -108,12 +93,10 @@ public TslConfigData setFormat(TslPublishFormat format)
}
/**
- * Returns the publish format of the TSL configuration.
- *
- * @return the {@link TslPublishFormat} value currently configured
+ * Returns the publishing format of the TSL configuration.
*
- * @since 4.31
- * @since Authlete 3.0.22
+ * @return
+ * the {@link TslPublishFormat} value currently configured
*/
public TslPublishFormat getFormat()
{
@@ -123,12 +106,11 @@ public TslPublishFormat getFormat()
/**
* Sets the TSL validity in hours.
*
- * @param TSL validity in hours
- *
- * @return this {@code TslConfigData} instance for method chaining
+ * @param validity
+ * validity in hours
*
- * @since 4.31
- * @since Authlete 3.0.22
+ * @return
+ * this {@code TslConfigData} instance for method chaining
*/
public TslConfigData setValidity(long validity)
{
@@ -140,10 +122,8 @@ public TslConfigData setValidity(long validity)
/**
* Returns the TSL validity in hours.
*
- * @return TSL validity
- *
- * @since 4.31
- * @since Authlete 3.0.22
+ * @return
+ * TSL validity
*/
public long getValidity()
{
@@ -153,12 +133,11 @@ public long getValidity()
/**
* Sets the TSL publishing frequency in every X hours.
*
- * @param TSL publish frequency
- *
- * @return this {@code TslConfigData} instance for method chaining
+ * @param publishFrequency
+ * TSL publish frequency
*
- * @since 4.31
- * @since Authlete 3.0.22
+ * @return
+ * this {@code TslConfigData} instance for method chaining
*/
public TslConfigData setPublishFrequency(long publishFrequency)
{
@@ -170,10 +149,8 @@ public TslConfigData setPublishFrequency(long publishFrequency)
/**
* Returns the TSL publishing frequency.
*
- * @return TSL publishing frequency
- *
- * @since 4.31
- * @since Authlete 3.0.22
+ * @return
+ * TSL publishing frequency
*/
public long getPublishFrequency()
{
@@ -183,12 +160,11 @@ public long getPublishFrequency()
/**
* Sets the ttl value of TSL in hours.
*
- * @param ttl value
- *
- * @return this {@code TslConfigData} instance for method chaining
+ * @param timeToLive
+ * the ttl value
*
- * @since 4.31
- * @since Authlete 3.0.22
+ * @return
+ * this {@code TslConfigData} instance for method chaining
*/
public TslConfigData setTimeToLive(long timeToLive)
{
@@ -200,10 +176,8 @@ public TslConfigData setTimeToLive(long timeToLive)
/**
* Returns the ttl value.
*
- * @return ttl value
- *
- * @since 4.31
- * @since Authlete 3.0.22
+ * @return
+ * ttl value
*/
public long getTimeToLive()
{
@@ -213,12 +187,11 @@ public long getTimeToLive()
/**
* Sets the TSL publishing endpoint.
*
- * @param publish endpoint
- *
- * @return this {@code TslConfigData} instance for method chaining
+ * @param publishEndpoint
+ * TSL publish endpoint
*
- * @since 4.31
- * @since Authlete 3.0.22
+ * @return
+ * this {@code TslConfigData} instance for method chaining
*/
public TslConfigData setPublishEndpoint(URI publishEndpoint)
{
@@ -230,10 +203,8 @@ public TslConfigData setPublishEndpoint(URI publishEndpoint)
/**
* Returns the TSL publishing endpoint.
*
- * @return publishing endpoint
- *
- * @since 4.31
- * @since Authlete 3.0.22
+ * @return
+ * TSL publishing endpoint
*/
public URI getPublishEndpoint()
{
diff --git a/src/main/java/com/authlete/common/dto/TslEntry.java b/src/main/java/com/authlete/common/dto/TslEntry.java
index 96e47fb8d4..8c037c8957 100644
--- a/src/main/java/com/authlete/common/dto/TslEntry.java
+++ b/src/main/java/com/authlete/common/dto/TslEntry.java
@@ -11,7 +11,7 @@
* as part of a list in {@code /tsl/entries/list} responses.
*
*
- * @since 4.31
+ * @since 4.33
* @since Authlete 3.0.22
*/
public class TslEntry
@@ -21,54 +21,46 @@ public class TslEntry
/**
* The token index associated with the issued VC/token.
* This index helps uniquely identify the token within a service.
- *
- * @since 4.31
- * @since Authlete 3.0.22
*/
private int tokenIndex;
/**
* The unique token ID assigned at issuance time.
* This value is globally unique per token/VC.
- *
- * @since 4.31
- * @since Authlete 3.0.22
*/
private String tokenId;
/**
* The current status of the issued VC/token.
- *
- * @see TslTokenStatus
- *
- * @since 4.31
- * @since Authlete 3.0.22
*/
private TslTokenStatus tokenStatus;
/**
* Indicates whether this token entry has been marked as used.
*/
- private boolean isUsed;
+ private boolean used;
/**
* Set the token index associated with this entry.
*
* @param tokenIndex
- * The token index.
+ * The token index.
*
- * @return {@code this} object for method chaining.
+ * @return
+ * {@code this} object for method chaining.
*/
public TslEntry setTokenIndex(int tokenIndex)
{
this.tokenIndex = tokenIndex;
+
return this;
}
/**
* Get the token index associated with this entry.
*
- * @return The token index.
+ * @return
+ * The token index.
*/
public int getTokenIndex()
{
@@ -79,20 +71,23 @@ public int getTokenIndex()
* Set the unique token ID for this entry.
*
* @param tokenId
- * The unique token identifier.
+ * The unique token identifier.
*
- * @return {@code this} object for method chaining.
+ * @return
+ * {@code this} object for method chaining.
*/
public TslEntry setTokenId(String tokenId)
{
this.tokenId = tokenId;
+
return this;
}
/**
* Get the unique token ID associated with this entry.
*
- * @return The token ID.
+ * @return
+ * The token ID.
*/
public String getTokenId()
{
@@ -103,20 +98,23 @@ public String getTokenId()
* Set the current token status.
*
* @param tokenStatus
- * The status of the token.
+ * The status of the token.
*
- * @return {@code this} object for method chaining.
+ * @return
+ * {@code this} object for method chaining.
*/
public TslEntry setTokenStatus(TslTokenStatus tokenStatus)
{
this.tokenStatus = tokenStatus;
+
return this;
}
/**
* Get the current status of the issued token.
*
- * @return The token status.
+ * @return
+ * The token status.
*/
public TslTokenStatus getTokenStatus()
{
@@ -126,24 +124,27 @@ public TslTokenStatus getTokenStatus()
/**
* Set the usage flag for this token entry.
*
- * @param isUsed
- * {@code true} if the entry is already used; {@code false} otherwise.
+ * @param used
+ * {@code true} if the entry is already used; {@code false} otherwise.
*
- * @return {@code this} object for method chaining.
+ * @return
+ * {@code this} object for method chaining.
*/
- public TslEntry setIsUsed(boolean isUsed)
+ public TslEntry setUsed(boolean used)
{
- this.isUsed = isUsed;
+ this.used = used;
+
return this;
}
/**
* Check whether this token entry has been marked as used.
*
- * @return {@code true} if the entry is used; {@code false} otherwise.
+ * @return
+ * {@code true} if the entry is used; {@code false} otherwise.
*/
- public boolean isUsed()
+ public boolean getUsed()
{
- return isUsed;
+ return used;
}
}
diff --git a/src/main/java/com/authlete/common/dto/TslPublishConfig.java b/src/main/java/com/authlete/common/dto/TslPublishConfig.java
index 5321491dc2..50aa462d8f 100644
--- a/src/main/java/com/authlete/common/dto/TslPublishConfig.java
+++ b/src/main/java/com/authlete/common/dto/TslPublishConfig.java
@@ -9,7 +9,7 @@
* next TSL will be published.
*
*
- * @since 4.31
+ * @since 4.33
* @since Authlete 3.0.22
*/
public class TslPublishConfig
@@ -24,9 +24,6 @@ public class TslPublishConfig
* This uniquely identifies the service whose TSL will be published at
* the configured next publish time.
*
- *
- * @since 4.31
- * @since Authlete 3.0.22
*/
private int serviceNumber;
@@ -37,9 +34,6 @@ public class TslPublishConfig
*
* This value allows services to schedule periodic TSL publication.
*
- *
- * @since 4.31
- * @since Authlete 3.0.22
*/
private long nextTslPublishTime;
@@ -48,16 +42,22 @@ public class TslPublishConfig
*
* @param serviceNumber
* The service number.
+ *
+ * @return
+ * {@code this} object.
*/
- public void setServiceNumber(int serviceNumber)
+ public TslPublishConfig setServiceNumber(int serviceNumber)
{
this.serviceNumber = serviceNumber;
+
+ return this;
}
/**
* Get the service number associated with this TSL publish configuration.
*
- * @return The service number.
+ * @return
+ * The service number.
*/
public int getServiceNumber()
{
@@ -69,10 +69,15 @@ public int getServiceNumber()
*
* @param nextTslPublishTime
* The next publish time, in seconds.
+ *
+ * @return
+ * {@code this} object.
*/
- public void setNextTslPublishTime(long nextTslPublishTime)
+ public TslPublishConfig setNextTslPublishTime(long nextTslPublishTime)
{
this.nextTslPublishTime = nextTslPublishTime;
+
+ return this;
}
/**
diff --git a/src/main/java/com/authlete/common/dto/TslPublishConfigsResponse.java b/src/main/java/com/authlete/common/dto/TslPublishConfigsResponse.java
index 3d3cba7a13..97d97f4f17 100644
--- a/src/main/java/com/authlete/common/dto/TslPublishConfigsResponse.java
+++ b/src/main/java/com/authlete/common/dto/TslPublishConfigsResponse.java
@@ -1,7 +1,7 @@
package com.authlete.common.dto;
/**
- * Response from Authlete's {@code /tsl/publish/configs} API.
+ * Response from Authlete's {@code /service/tsl/publish/configs} API.
*
*
* This class represents the response containing Token Status List (TSL)
@@ -15,11 +15,11 @@
*
*
*
- *
{@code serviceNumber} – The service identifier.
+ *
{@code serviceNumber} – The service number.
*
{@code nextTslPublishTime} – The scheduled Unix timestamp (seconds) for the next TSL publication.
*
*
- * @since 4.31
+ * @since 4.33
* @since Authlete 3.0.22
*/
public class TslPublishConfigsResponse extends ApiResponse
@@ -33,9 +33,6 @@ public class TslPublishConfigsResponse extends ApiResponse
* Each element in the array contains the publish schedule for a service,
* including the service number and the next scheduled publish time.
*
- *
- * @since 4.31
- * @since Authlete 3.0.22
*/
private TslPublishConfig[] tslPublishConfigs;
@@ -44,16 +41,22 @@ public class TslPublishConfigsResponse extends ApiResponse
*
* @param tslPublishConfigs
* An array of {@link TslPublishConfig} objects.
+ *
+ * @return
+ * {@code this} object.
*/
- public void setTslPublishConfigs(TslPublishConfig[] tslPublishConfigs)
+ public TslPublishConfigsResponse setTslPublishConfigs(TslPublishConfig[] tslPublishConfigs)
{
this.tslPublishConfigs = tslPublishConfigs;
+
+ return this;
}
/**
* Get the list of TSL publish configurations.
*
- * @return An array of {@link TslPublishConfig} objects.
+ * @return
+ * An array of {@link TslPublishConfig} objects.
*/
public TslPublishConfig[] getTslPublishConfigs()
{
diff --git a/src/main/java/com/authlete/common/dto/TslPublishRequest.java b/src/main/java/com/authlete/common/dto/TslPublishRequest.java
index d3e6858c00..a5c36d8a88 100644
--- a/src/main/java/com/authlete/common/dto/TslPublishRequest.java
+++ b/src/main/java/com/authlete/common/dto/TslPublishRequest.java
@@ -3,7 +3,7 @@
import java.io.Serializable;
/**
- * Request to Authlete's {@code /tsl/publish} API.
+ * Request to Authlete's {@code /service/tsl/publish} API.
*
*
* This class represents a request to publish a Token Status List (TSL) for
@@ -15,10 +15,10 @@
* For more details about Token Status Lists (TSL), see:
*
*
- * @see
+ * @see
* Token Status List (TSL) Specification
*
- * @since 4.31
+ * @since 4.33
* @since Authlete 3.0.22
*/
public class TslPublishRequest implements Serializable
@@ -32,9 +32,6 @@ public class TslPublishRequest implements Serializable
* This uniquely identifies the service within Authlete's environment. When
* this request is processed, the TSL for this service will be published.
*
- *
- * @since 4.31
- * @since Authlete 3.0.22
*/
private int serviceNumber;
@@ -43,16 +40,22 @@ public class TslPublishRequest implements Serializable
*
* @param serviceNumber
* The service number to publish the TSL for.
+ *
+ * @return
+ * {@code this} object.
*/
- public void setServiceNumber(int serviceNumber)
+ public TslPublishRequest setServiceNumber(int serviceNumber)
{
this.serviceNumber = serviceNumber;
+
+ return this;
}
/**
* Get the service number whose TSL is to be published.
*
- * @return The service number.
+ * @return
+ * The service number.
*/
public int getServiceNumber()
{
diff --git a/src/main/java/com/authlete/common/dto/TslTokenStatusUpdateRequest.java b/src/main/java/com/authlete/common/dto/TslTokenStatusUpdateRequest.java
index 11548a0adf..d352bc759d 100644
--- a/src/main/java/com/authlete/common/dto/TslTokenStatusUpdateRequest.java
+++ b/src/main/java/com/authlete/common/dto/TslTokenStatusUpdateRequest.java
@@ -24,10 +24,10 @@
* For more details about Token Status Lists (TSL), see:
*
*
- * @see
+ * @see
* Token Status List (TSL) Specification
*
- * @since 4.31
+ * @since 4.33
* @since Authlete 3.0.22
*/
public class TslTokenStatusUpdateRequest implements Serializable
@@ -36,27 +36,16 @@ public class TslTokenStatusUpdateRequest implements Serializable
/**
* The token ID used to identify the issued VC/token whose status is to be changed.
- *
- * @since 4.31
- * @since Authlete 3.0.22
*/
private String tokenId;
/**
* The token status to be set.
- *
- * @see TslTokenStatus
- *
- * @since 4.31
- * @since Authlete 3.0.22
*/
private TslTokenStatus tokenStatus;
/**
* The index of the token in the issued TSL.
- *
- * @since 4.31
- * @since Authlete 3.0.22
*/
private int tokenIndex;
@@ -65,16 +54,22 @@ public class TslTokenStatusUpdateRequest implements Serializable
*
* @param tokenId
* The unique token identifier.
+ *
+ * @return
+ * {@code this} object.
*/
- public void setTokenId(String tokenId)
+ public TslTokenStatusUpdateRequest setTokenId(String tokenId)
{
this.tokenId = tokenId;
+
+ return this;
}
/**
* Get the token ID of the issued VC/token whose status is being updated.
*
- * @return The token ID.
+ * @return
+ * The token ID.
*/
public String getTokenId()
{
@@ -86,16 +81,22 @@ public String getTokenId()
*
* @param tokenStatus
* The new token status.
+ *
+ * @return
+ * {@code this} object.
*/
- public void setTokenStatus(TslTokenStatus tokenStatus)
+ public TslTokenStatusUpdateRequest setTokenStatus(TslTokenStatus tokenStatus)
{
this.tokenStatus = tokenStatus;
+
+ return this;
}
/**
* Get the token status currently set for this update request.
*
- * @return The token status.
+ * @return
+ * The token status.
*/
public TslTokenStatus getTokenStatus()
{
@@ -107,16 +108,22 @@ public TslTokenStatus getTokenStatus()
*
* @param tokenIndex
* The index of the token.
+ *
+ * @return
+ * {@code this} object.
*/
- public void setTokenIndex(int tokenIndex)
+ public TslTokenStatusUpdateRequest setTokenIndex(int tokenIndex)
{
this.tokenIndex = tokenIndex;
+
+ return this;
}
/**
* Get the token index in the issued TSL.
*
- * @return The token index.
+ * @return
+ * The token index.
*/
public int getIndex()
{
diff --git a/src/main/java/com/authlete/common/dto/TslPopulateUnusedIndexesRequest.java b/src/main/java/com/authlete/common/dto/TslUnusedIndexesRequest.java
similarity index 77%
rename from src/main/java/com/authlete/common/dto/TslPopulateUnusedIndexesRequest.java
rename to src/main/java/com/authlete/common/dto/TslUnusedIndexesRequest.java
index 1015cbc458..501c71225b 100644
--- a/src/main/java/com/authlete/common/dto/TslPopulateUnusedIndexesRequest.java
+++ b/src/main/java/com/authlete/common/dto/TslUnusedIndexesRequest.java
@@ -3,7 +3,7 @@
import java.io.Serializable;
/**
- * Request to Authlete's {@code /service/populate/unused/indexes} API.
+ * Request to Authlete's {@code /service/tsl/unused/indexes} API.
*
*
* This class represents a request to pre-populate unused token indexes for a
@@ -12,10 +12,10 @@
* of token indices within a Token Status List (TSL) environment.
*
- * This class represents a request to retrieve a published Token Status List (TSL)
- * for a specific service. The request requires the caller to specify the
- * {@code serviceNumber}, which uniquely identifies the service whose TSL is
- * being requested.
- *
- *
- *
- * For more details about Token Status Lists (TSL), see:
- *
- *
- * @see
- * Token Status List (TSL) Specification
- *
- * @since 4.33
- * @since Authlete 3.0.22
- */
-public class GetPublishedTslRequest implements Serializable
-{
- private static final long serialVersionUID = 1L;
-
- /**
- * The service number for which the TSL is requested.
- *
- *
- * This value uniquely identifies a service within Authlete's environment.
- * The TSL associated with this service number will be retrieved when the
- * request is processed.
- *
- */
- private int serviceNumber;
-
- /**
- * Set the service number whose Token Status List (TSL) should be retrieved.
- *
- * @param serviceNumber
- * The service number to query.
- *
- * @return
- * {@code this} object.
- */
- public GetPublishedTslRequest setServiceNumber(int serviceNumber)
- {
- this.serviceNumber = serviceNumber;
-
- return this;
- }
-
- /**
- * Get the service number whose Token Status List (TSL) is being requested.
- *
- * @return
- * The service number.
- */
- public int getServiceNumber()
- {
- return serviceNumber;
- }
-}
diff --git a/src/main/java/com/authlete/common/dto/GetPublishedTslResponse.java b/src/main/java/com/authlete/common/dto/GetPublishedTslResponse.java
deleted file mode 100644
index 9d8231f48d..0000000000
--- a/src/main/java/com/authlete/common/dto/GetPublishedTslResponse.java
+++ /dev/null
@@ -1,84 +0,0 @@
-package com.authlete.common.dto;
-
-import java.io.Serializable;
-
-/**
- * Response from Authlete's {@code /service/tsl} API.
- *
- *
- * This class represents the response returned when retrieving a Token Status
- * List (TSL) from Authlete API. The response includes the TSL format (e.g., JWT)
- * and the TSL content itself.
- *
- *
- * @since 4.33
- * @since Authlete 3.0.22
- */
-public class GetPublishedTslResponse implements Serializable
-{
- private static final long serialVersionUID = 1L;
-
- /**
- * The format of the TSL, such as {@code "jwt"}.
- */
- private String format;
-
- /**
- * The Token Status List (TSL).
- */
- private String tsl;
-
- /**
- * Set the format of the Token Status List (TSL).
- *
- * @param format
- * The TSL format (e.g., {@code "jwt"}).
- *
- * @return
- * {@code this} object.
- */
- public GetPublishedTslResponse setFormat(String format)
- {
- this.format = format;
-
- return this;
- }
-
- /**
- * Get the format of the Token Status List (TSL).
- *
- * @return
- * The TSL format.
- */
- public String getFormat()
- {
- return format;
- }
-
- /**
- * Set the Token Status List (TSL).
- *
- * @param tsl
- * The TSL content in the format specified by {@link #format}.
- *
- * @return
- * {@code this} object.
- */
- public GetPublishedTslResponse setTsl(String tsl)
- {
- this.tsl = tsl;
-
- return this;
- }
-
- /**
- * Get the Token Status List (TSL).
- *
- * @return
- * The TSL content.
- */
- public String getTsl()
- {
- return tsl;
- }
-}
diff --git a/src/main/java/com/authlete/common/dto/TslConfigData.java b/src/main/java/com/authlete/common/dto/TslConfigData.java
index 96e119e306..393c235332 100644
--- a/src/main/java/com/authlete/common/dto/TslConfigData.java
+++ b/src/main/java/com/authlete/common/dto/TslConfigData.java
@@ -1,6 +1,6 @@
package com.authlete.common.dto;
-import com.authlete.common.types.TslPublishFormat;
+import com.authlete.common.types.TslFormat;
import java.io.Serializable;
import java.net.URI;
@@ -31,7 +31,7 @@ public class TslConfigData implements Serializable
/**
* The format of the TSL. Possible values are jwt and cwt. Currently only jwt is supported
*/
- private TslPublishFormat format;
+ private TslFormat format;
/**
* The validity of the TSL in hours.
@@ -80,12 +80,12 @@ public TslConfigData(TslConfigData tslConfigData)
* Sets the publishing format for the TSL configuration.
*
* @param format
- * the {@link TslPublishFormat} value to set
+ * the {@link TslFormat} value to set
*
* @return
* this {@code TslConfigData} instance for method chaining
*/
- public TslConfigData setFormat(TslPublishFormat format)
+ public TslConfigData setFormat(TslFormat format)
{
this.format = format;
@@ -96,9 +96,9 @@ public TslConfigData setFormat(TslPublishFormat format)
* Returns the publishing format of the TSL configuration.
*
* @return
- * the {@link TslPublishFormat} value currently configured
+ * the {@link TslFormat} value currently configured
*/
- public TslPublishFormat getFormat()
+ public TslFormat getFormat()
{
return format;
}
diff --git a/src/main/java/com/authlete/common/dto/TslPublishConfig.java b/src/main/java/com/authlete/common/dto/TslPublishConfigInfo.java
similarity index 50%
rename from src/main/java/com/authlete/common/dto/TslPublishConfig.java
rename to src/main/java/com/authlete/common/dto/TslPublishConfigInfo.java
index 50aa462d8f..65cc8417f3 100644
--- a/src/main/java/com/authlete/common/dto/TslPublishConfig.java
+++ b/src/main/java/com/authlete/common/dto/TslPublishConfigInfo.java
@@ -1,31 +1,33 @@
package com.authlete.common.dto;
+import com.authlete.common.types.TslFormat;
+
/**
- * Represents the Token Status List (TSL) publish configuration for a service.
+ * Represents the Token Status List (TSL) publish configurations for a service.
*
*
* This class contains per-service settings related to TSL publication, including
- * the service identifier and the Unix timestamp (in seconds) indicating when the
+ * the service ID and the Unix timestamp (in seconds) indicating when the
* next TSL will be published.
*
*
* @since 4.33
* @since Authlete 3.0.22
*/
-public class TslPublishConfig
+public class TslPublishConfigInfo
{
private static final long serialVersionUID = 1L;
/**
- * The service number for which the TSL publication schedule applies.
+ * The service ID for which the TSL publication schedule applies.
*
*
* This uniquely identifies the service whose TSL will be published at
* the configured next publish time.
*
*/
- private int serviceNumber;
+ private long serviceId;
/**
* The Unix timestamp (in seconds) indicating when the next TSL
@@ -38,30 +40,35 @@ public class TslPublishConfig
private long nextTslPublishTime;
/**
- * Set the service number associated with this TSL publish configuration.
+ * The TSL format of the published TSL for this service.
+ */
+ private TslFormat format;
+
+ /**
+ * Set the service ID associated with this TSL publish configuration.
*
- * @param serviceNumber
- * The service number.
+ * @param serviceId
+ * The service ID.
*
* @return
* {@code this} object.
*/
- public TslPublishConfig setServiceNumber(int serviceNumber)
+ public TslPublishConfigInfo setServiceId(long serviceId)
{
- this.serviceNumber = serviceNumber;
+ this.serviceId = serviceId;
return this;
}
/**
- * Get the service number associated with this TSL publish configuration.
+ * Get the service ID associated with this TSL publish configuration.
*
* @return
- * The service number.
+ * The service ID.
*/
- public int getServiceNumber()
+ public long getServiceId()
{
- return serviceNumber;
+ return serviceId;
}
/**
@@ -73,7 +80,7 @@ public int getServiceNumber()
* @return
* {@code this} object.
*/
- public TslPublishConfig setNextTslPublishTime(long nextTslPublishTime)
+ public TslPublishConfigInfo setNextTslPublishTime(long nextTslPublishTime)
{
this.nextTslPublishTime = nextTslPublishTime;
@@ -89,4 +96,32 @@ public long getNextTslPublishTime()
{
return nextTslPublishTime;
}
+
+ /**
+ * Sets the format of the published TSL
+ *
+ * @param format
+ * The TSL format.
+ *
+ * @return
+ * {@code this} object.
+ */
+ public TslPublishConfigInfo setTslFormat(TslFormat format)
+ {
+ this.format = format;
+
+ return this;
+ }
+
+ /**
+ * Gets the format of the TSL.
+ *
+ * @return
+ * The TSL format.
+ */
+ public TslFormat getTslFormat()
+ {
+ return format;
+ }
+
}
diff --git a/src/main/java/com/authlete/common/dto/TslPublishConfigsListResponse.java b/src/main/java/com/authlete/common/dto/TslPublishConfigsListResponse.java
new file mode 100644
index 0000000000..454f46e7bb
--- /dev/null
+++ b/src/main/java/com/authlete/common/dto/TslPublishConfigsListResponse.java
@@ -0,0 +1,125 @@
+/*
+ * Copyright (C) 2025 Authlete, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.authlete.common.dto;
+
+/**
+ * Response from Authlete's {@code /tsl/publish/configs/list} API.
+ *
+ *
+ * This class represents the response containing Token Status List (TSL)
+ * publish configurations for one or more services. Each entry
+ * indicates when the next TSL will be published for the corresponding service.
+ *
+ *
+ *
+ * The response includes an array of {@link TslPublishConfigInfo} objects, each
+ * describing:
+ *
+ *
+ *
+ *
{@code serviceID} – The service ID.
+ *
{@code nextTslPublishTime} – The scheduled Unix timestamp (seconds) for the next TSL publication.
+ *
+ *
+ * @since 4.33
+ * @since Authlete 3.0.22
+ */
+public class TslPublishConfigsListResponse extends ApiResponse
+{
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * The result of the {@code /tsl/publish/configs/list} API call.
+ */
+ public enum Action
+ {
+ /**
+ * Information about the TSL publish configs has been obtained
+ * successfully.
+ */
+ OK,
+ }
+
+ /**
+ * The result of the {@code /tsl/publish/configs/list} API call.
+ */
+ private Action action;
+
+ /**
+ * The list of TSL publish configurations.
+ *
+ *
+ * Each element in the array contains the publishing schedule for a service,
+ * including the service ID and the next scheduled publish time.
+ *
+ */
+ private TslPublishConfigInfo[] info;
+
+
+ /**
+ * Get the result of the {@code /tsl/publish/configs/list} API call.
+ *
+ * @return
+ * The result of the API call.
+ */
+ public Action getAction()
+ {
+ return action;
+ }
+
+ /**
+ * Set the result of the {@code /tsl/publish/configs/list} API call.
+ *
+ * @param action
+ * The result of the API call.
+ *
+ * @return
+ * {@code this} object.
+ */
+ public TslPublishConfigsListResponse setAction(Action action)
+ {
+ this.action = action;
+
+ return this;
+ }
+
+ /**
+ * Set the list of TSL publish configurations.
+ *
+ * @param info
+ * An array of {@link TslPublishConfigInfo} objects.
+ *
+ * @return
+ * {@code this} object.
+ */
+ public TslPublishConfigsListResponse setInfo(TslPublishConfigInfo[] info)
+ {
+ this.info = info;
+
+ return this;
+ }
+
+ /**
+ * Get the list of TSL publish configurations.
+ *
+ * @return
+ * An array of {@link TslPublishConfigInfo} objects.
+ */
+ public TslPublishConfigInfo[] getInfo()
+ {
+ return info;
+ }
+}
diff --git a/src/main/java/com/authlete/common/dto/TslPublishConfigsResponse.java b/src/main/java/com/authlete/common/dto/TslPublishConfigsResponse.java
deleted file mode 100644
index 97d97f4f17..0000000000
--- a/src/main/java/com/authlete/common/dto/TslPublishConfigsResponse.java
+++ /dev/null
@@ -1,65 +0,0 @@
-package com.authlete.common.dto;
-
-/**
- * Response from Authlete's {@code /service/tsl/publish/configs} API.
- *
- *
- * This class represents the response containing Token Status List (TSL)
- * publication configuration information for one or more services. Each entry
- * indicates when the next TSL will be published for the corresponding service.
- *
- *
- *
- * The response includes an array of {@link TslPublishConfig} objects, each
- * describing:
- *
- *
- *
- *
{@code serviceNumber} – The service number.
- *
{@code nextTslPublishTime} – The scheduled Unix timestamp (seconds) for the next TSL publication.
- *
- *
- * @since 4.33
- * @since Authlete 3.0.22
- */
-public class TslPublishConfigsResponse extends ApiResponse
-{
- private static final long serialVersionUID = 1L;
-
- /**
- * The list of TSL publish configurations.
- *
- *
- * Each element in the array contains the publish schedule for a service,
- * including the service number and the next scheduled publish time.
- *
- */
- private TslPublishConfig[] tslPublishConfigs;
-
- /**
- * Set the list of TSL publish configurations.
- *
- * @param tslPublishConfigs
- * An array of {@link TslPublishConfig} objects.
- *
- * @return
- * {@code this} object.
- */
- public TslPublishConfigsResponse setTslPublishConfigs(TslPublishConfig[] tslPublishConfigs)
- {
- this.tslPublishConfigs = tslPublishConfigs;
-
- return this;
- }
-
- /**
- * Get the list of TSL publish configurations.
- *
- * @return
- * An array of {@link TslPublishConfig} objects.
- */
- public TslPublishConfig[] getTslPublishConfigs()
- {
- return tslPublishConfigs;
- }
-}
diff --git a/src/main/java/com/authlete/common/dto/TslPublishRequest.java b/src/main/java/com/authlete/common/dto/TslPublishRequest.java
index a5c36d8a88..d11954d7ce 100644
--- a/src/main/java/com/authlete/common/dto/TslPublishRequest.java
+++ b/src/main/java/com/authlete/common/dto/TslPublishRequest.java
@@ -1,14 +1,30 @@
+/*
+ * Copyright (C) 2025 Authlete, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
package com.authlete.common.dto;
+import com.authlete.common.types.TslFormat;
+
import java.io.Serializable;
/**
- * Request to Authlete's {@code /service/tsl/publish} API.
+ * Request to Authlete's {@code /tsl/publish} API.
*
*
* This class represents a request to publish a Token Status List (TSL) for
- * a specific service. The request contains the {@code serviceNumber}, which
- * uniquely identifies the service whose TSL is to be published.
+ * a specific service.
*
*
*
@@ -26,39 +42,34 @@ public class TslPublishRequest implements Serializable
private static final long serialVersionUID = 1L;
/**
- * The service number whose TSL is to be published.
- *
- *
- * This uniquely identifies the service within Authlete's environment. When
- * this request is processed, the TSL for this service will be published.
- *
+ * The format of the to be published TSL.
*/
- private int serviceNumber;
+ private TslFormat format;
/**
- * Set the service number whose TSL is to be published.
+ * Set the to be published TSL format
*
- * @param serviceNumber
- * The service number to publish the TSL for.
+ * @param format
+ * The TSL format.
*
* @return
* {@code this} object.
*/
- public TslPublishRequest setServiceNumber(int serviceNumber)
+ public TslPublishRequest setTslFormat(TslFormat format)
{
- this.serviceNumber = serviceNumber;
+ this.format = format;
return this;
}
/**
- * Get the service number whose TSL is to be published.
+ * Get the to be published TSL format.
*
* @return
- * The service number.
+ * The TSL format.
*/
- public int getServiceNumber()
+ public TslFormat getTslFormat()
{
- return serviceNumber;
+ return format;
}
}
diff --git a/src/main/java/com/authlete/common/dto/TslPublishResponse.java b/src/main/java/com/authlete/common/dto/TslPublishResponse.java
new file mode 100644
index 0000000000..4b020541db
--- /dev/null
+++ b/src/main/java/com/authlete/common/dto/TslPublishResponse.java
@@ -0,0 +1,114 @@
+/*
+ * Copyright (C) 2025 Authlete, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.authlete.common.dto;
+
+/**
+ * Response from Authlete's {@code /tsl/publish} API.
+ *
+ *
+ * This class represents the response returned when publishing a Token Status
+ * List (TSL) from Authlete API.
+ *
+ *
+ * @since 4.33
+ * @since Authlete 3.0.22
+ */
+public class TslPublishResponse extends ApiResponse
+{
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * The next action that the implementation of the publish TSL endpoint
+ * should take after getting a response from Authlete's
+ * {@code /tsl/publish} API.
+ *
+ * @since 4.33
+ * @since Authlete 3.0.22
+ */
+ public enum Action
+ {
+ /**
+ * A TSL publish response has been prepared successfully.
+ */
+ OK,
+
+ /**
+ * The feature of TSL publish not enabled in the service
+ * configuration.
+ */
+ FORBIDDEN,
+ }
+
+ private Action action;
+
+ private String tsl;
+
+ /**
+ * Get the next action that the implementation of the TSL publish endpoint should
+ * take after getting a response from Authlete's {@code /tsl/publish} API.
+ *
+ * @return
+ * The next action.
+ */
+ public Action getAction()
+ {
+ return action;
+ }
+
+ /**
+ * Set the next action that the implementation of the TSL endpoint should
+ * take after getting a response from Authlete's {@code /tsl/publish} API.
+ *
+ * @param action
+ * The next action.
+ *
+ * @return
+ * {@code this} object.
+ */
+ public TslPublishResponse setAction(Action action)
+ {
+ this.action = action;
+
+ return this;
+ }
+
+ /**
+ * Get the published TSL
+ *
+ * @return
+ * The published TSL.
+ */
+ public String getTsl()
+ {
+ return tsl;
+ }
+
+ /**
+ * Set the published TSL.
+ *
+ * @param tsl
+ * The published TSL.
+ *
+ * @return
+ * {@code this} object.
+ */
+ public TslPublishResponse setTsl(String tsl)
+ {
+ this.tsl = tsl;
+
+ return this;
+ }
+}
diff --git a/src/main/java/com/authlete/common/dto/TslRequest.java b/src/main/java/com/authlete/common/dto/TslRequest.java
new file mode 100644
index 0000000000..17f570956f
--- /dev/null
+++ b/src/main/java/com/authlete/common/dto/TslRequest.java
@@ -0,0 +1,76 @@
+/*
+ * Copyright (C) 2025 Authlete, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.authlete.common.dto;
+
+import com.authlete.common.types.TslFormat;
+
+import java.io.Serializable;
+
+/**
+ * Request to Authlete's {@code /tsl} API.
+ *
+ *
+ * This class represents a request to retrieve a published Token Status List (TSL)
+ * for a specific service. The request requires the caller to specify the
+ * {@code tslFormat} for the requested TSL.
+ *
+ *
+ *
+ * For more details about Token Status Lists (TSL), see:
+ *
+ *
+ * @see
+ * Token Status List (TSL) Specification
+ *
+ * @since 4.33
+ * @since Authlete 3.0.22
+ */
+public class TslRequest implements Serializable
+{
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * The requested TSL format. Currently only JWT format is supported.
+ */
+ private TslFormat format;
+
+ /**
+ * Set the requested TSL format
+ *
+ * @param format
+ * The TSL format.
+ *
+ * @return
+ * {@code this} object.
+ */
+ public TslRequest setTslFormat(TslFormat format)
+ {
+ this.format = format;
+
+ return this;
+ }
+
+ /**
+ * Get the requested TSL format.
+ *
+ * @return
+ * The TSL format.
+ */
+ public TslFormat getTslFormat()
+ {
+ return format;
+ }
+}
diff --git a/src/main/java/com/authlete/common/dto/TslResponse.java b/src/main/java/com/authlete/common/dto/TslResponse.java
new file mode 100644
index 0000000000..1883c78b22
--- /dev/null
+++ b/src/main/java/com/authlete/common/dto/TslResponse.java
@@ -0,0 +1,124 @@
+/*
+ * Copyright (C) 2025 Authlete, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.authlete.common.dto;
+
+/**
+ * Response from Authlete's {@code /tsl} API.
+ *
+ *
+ * This class represents the response returned when retrieving a Token Status
+ * List (TSL) from Authlete API.
+ *
+ *
+ * @since 4.33
+ * @since Authlete 3.0.22
+ */
+public class TslResponse extends ApiResponse
+{
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * The next action that the implementation of the TSL endpoint
+ * should take after getting a response from Authlete's
+ * {@code /tsl} API.
+ *
+ * @since 4.33
+ * @since Authlete 3.0.22
+ */
+ public enum Action
+ {
+ /**
+ * A get TSL response has been prepared successfully.
+ */
+ OK,
+
+ /**
+ * The feature of TSL is not enabled in the service
+ * configuration.
+ */
+ FORBIDDEN,
+
+ /**
+ * Invalid TSL format
+ */
+ INVALID_TSL_FORMAT,
+ }
+
+ private Action action;
+
+ private String responseContent;
+
+ /**
+ * Get the next action that the implementation of the TSL endpoint should
+ * take after getting a response from Authlete's {@code /tsl} API.
+ *
+ * @return
+ * The next action.
+ */
+ public Action getAction()
+ {
+ return action;
+ }
+
+ /**
+ * Set the next action that the implementation of the TSL endpoint should
+ * take after getting a response from Authlete's {@code /tsl} API.
+ *
+ * @param action
+ * The next action.
+ *
+ * @return
+ * {@code this} object.
+ */
+ public TslResponse setAction(Action action)
+ {
+ this.action = action;
+
+ return this;
+ }
+
+
+ /**
+ * Get the content that the implementation of the TSL endpoint should use
+ * when it constructs a response.
+ *
+ * @return
+ * The response content in the JSON format.
+ */
+ public String getResponseContent()
+ {
+ return responseContent;
+ }
+
+
+ /**
+ * Set the content that the implementation of the TSL endpoint should use
+ * when it constructs a response.
+ *
+ * @param content
+ * The response content in the JSON format.
+ *
+ * @return
+ * {@code this} object.
+ */
+ public TslResponse setResponseContent(String content)
+ {
+ this.responseContent = content;
+
+ return this;
+ }
+
+}
diff --git a/src/main/java/com/authlete/common/dto/TslTokenStatusUpdateRequest.java b/src/main/java/com/authlete/common/dto/TslTokenStatusUpdateRequest.java
index d352bc759d..9d1174e600 100644
--- a/src/main/java/com/authlete/common/dto/TslTokenStatusUpdateRequest.java
+++ b/src/main/java/com/authlete/common/dto/TslTokenStatusUpdateRequest.java
@@ -1,3 +1,18 @@
+/*
+ * Copyright (C) 2025 Authlete, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
package com.authlete.common.dto;
import com.authlete.common.types.TslTokenStatus;
diff --git a/src/main/java/com/authlete/common/dto/TslTokenStatusUpdateResponse.java b/src/main/java/com/authlete/common/dto/TslTokenStatusUpdateResponse.java
new file mode 100644
index 0000000000..79ec7e2682
--- /dev/null
+++ b/src/main/java/com/authlete/common/dto/TslTokenStatusUpdateResponse.java
@@ -0,0 +1,86 @@
+/*
+ * Copyright (C) 2025 Authlete, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.authlete.common.dto;
+
+/**
+ * Response to Authlete's {@code /tsl/token/status} API.
+ *
+ *
+ * This class represents a response to update the status of an issued
+ * Verifiable Credential (VC) or token. The updated status will later
+ * be included in the issued Token Status List (TSL).
+ *
+ * @since 4.33
+ * @since Authlete 3.0.22
+ *
+ */
+public class TslTokenStatusUpdateResponse extends ApiResponse {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * The next action that the implementation of the token status update endpoint
+ * should take after getting a response from Authlete's
+ * {@code /tsl/token/status} API.
+ *
+ * @since 4.33
+ * @since Authlete 3.0.22
+ */
+ public enum Action
+ {
+ /**
+ * A token status update performed successfully.
+ */
+ OK,
+
+ /**
+ * The feature of TSL publish not enabled in the service
+ * configuration.
+ */
+ FORBIDDEN,
+ }
+
+ private TslTokenStatusUpdateResponse.Action action;
+
+ /**
+ * Get the next action that the implementation of the token status update endpoint should
+ * take after getting a response from Authlete's {@code /tsl/token/status} API.
+ *
+ * @return
+ * The next action.
+ */
+ public TslTokenStatusUpdateResponse.Action getAction()
+ {
+ return action;
+ }
+
+ /**
+ * Set the next action that the implementation of the token status update endpoint should
+ * take after getting a response from Authlete's {@code /tsl/token/status} API.
+ *
+ * @param action
+ * The next action.
+ *
+ * @return
+ * {@code this} object.
+ */
+ public TslTokenStatusUpdateResponse setAction(TslTokenStatusUpdateResponse.Action action)
+ {
+ this.action = action;
+
+ return this;
+ }
+}
diff --git a/src/main/java/com/authlete/common/dto/TslUnusedIndexesRequest.java b/src/main/java/com/authlete/common/dto/TslUnusedIndexesRequest.java
index 501c71225b..8ed6d248e2 100644
--- a/src/main/java/com/authlete/common/dto/TslUnusedIndexesRequest.java
+++ b/src/main/java/com/authlete/common/dto/TslUnusedIndexesRequest.java
@@ -1,9 +1,24 @@
+/*
+ * Copyright (C) 2025 Authlete, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
package com.authlete.common.dto;
import java.io.Serializable;
/**
- * Request to Authlete's {@code /service/tsl/unused/indexes} API.
+ * Request to Authlete's {@code /tsl/unused/indexes} API.
*
*
* This class represents a request to pre-populate unused token indexes for a
@@ -20,39 +35,71 @@ public class TslUnusedIndexesRequest implements Serializable
private static final long serialVersionUID = 1L;
/**
- * The service number for which unused token indexes should be populated.
+ * If less than this number of unused VC/token indexes left then populate new unused indexes
+ * specified in {@code unusedTokenIndexesAdd}.
+ */
+ private long unusedTokenIndexesLeft;
+
+ /**
+ * Add this number of new unused VC/token indexes.
+ */
+ private long unusedTokenIndexesAdd;
+
+ /**
+ * Set the unused token indexes left value.
+ *
+ * @param unusedTokenIndexesLeft
+ * The unused token indexes left value.
+ *
+ * @return
+ * {@code this} object.
+ */
+ public TslUnusedIndexesRequest setUnusedTokenIndexLeft(long unusedTokenIndexesLeft)
+ {
+ this.unusedTokenIndexesLeft = unusedTokenIndexesLeft;
+
+ return this;
+ }
+
+ /**
+ * Get the unused token indexes left value.
*
- *
- * This value uniquely identifies the service under which the unused
- * indexes will be created.
- *
+ * @return
+ * The unused token indexes left value.
*/
- private int serviceNumber;
+ public long getUnusedTokenIndexLeft()
+ {
+ return unusedTokenIndexesLeft;
+ }
/**
- * Set the service number for which unused token indexes should be populated.
+ * Set the unused token indexes add value.
*
- * @param serviceNumber
- * The service number to populate indexes for.
+ * @param unusedTokenIndexesAdd
+ * The unused token indexes add value.
*
* @return
* {@code this} object.
*/
- public TslUnusedIndexesRequest setServiceNumber(int serviceNumber)
+ public TslUnusedIndexesRequest setUnusedTokenIndexAdd(long unusedTokenIndexesAdd)
{
- this.serviceNumber = serviceNumber;
+ this.unusedTokenIndexesAdd = unusedTokenIndexesAdd;
return this;
}
/**
- * Get the service number for which unused token indexes should be populated.
+ * Get the unused token indexes add value.
*
* @return
- * The service number.
+ * The unused token indexes add value.
*/
- public int getServiceNumber()
+ public long getUnusedTokenIndexAdd()
{
- return serviceNumber;
+ return unusedTokenIndexesAdd;
}
+
+
+
+
}
diff --git a/src/main/java/com/authlete/common/dto/TslUnusedIndexesResponse.java b/src/main/java/com/authlete/common/dto/TslUnusedIndexesResponse.java
new file mode 100644
index 0000000000..1347343782
--- /dev/null
+++ b/src/main/java/com/authlete/common/dto/TslUnusedIndexesResponse.java
@@ -0,0 +1,88 @@
+/*
+ * Copyright (C) 2025 Authlete, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.authlete.common.dto;
+
+/**
+ * Response to Authlete's {@code /tsl/unused/indexes} API.
+ *
+ *
+ * This class represents a response to pre-populate unused token indexes for a
+ * particular service. These unused indexes are later consumed when issuing
+ * Verifiable Credentials (VCs) or access tokens, allowing efficient allocation
+ * of token indices within a Token Status List (TSL) environment.
+ *
+ *
+ * @since 4.33
+ * @since Authlete 3.0.22
+ */
+
+public class TslUnusedIndexesResponse extends ApiResponse {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * The next action that the implementation of the TSL unused indexes endpoint
+ * should take after getting a response from Authlete's
+ * {@code /tsl/unused/indexes} API.
+ *
+ * @since 4.33
+ * @since Authlete 3.0.22
+ */
+ public enum Action
+ {
+ /**
+ * A TSL publish response has been prepared successfully.
+ */
+ OK,
+
+ /**
+ * The feature of TSL publish not enabled in the service
+ * configuration.
+ */
+ FORBIDDEN,
+ }
+
+ private TslUnusedIndexesResponse.Action action;
+
+ /**
+ * Get the next action that the implementation of the TSL unused indexes endpoint should
+ * take after getting a response from Authlete's {@code /tsl/unused/indexes} API.
+ *
+ * @return
+ * The next action.
+ */
+ public TslUnusedIndexesResponse.Action getAction()
+ {
+ return action;
+ }
+
+ /**
+ * Set the next action that the implementation of the TSL unused indexes endpoint should
+ * take after getting a response from Authlete's {@code /tsl/unused/indexes} API.
+ *
+ * @param action
+ * The next action.
+ *
+ * @return
+ * {@code this} object.
+ */
+ public TslUnusedIndexesResponse setAction(TslUnusedIndexesResponse.Action action)
+ {
+ this.action = action;
+
+ return this;
+ }
+}
diff --git a/src/main/java/com/authlete/common/types/TslPublishFormat.java b/src/main/java/com/authlete/common/types/TslFormat.java
similarity index 62%
rename from src/main/java/com/authlete/common/types/TslPublishFormat.java
rename to src/main/java/com/authlete/common/types/TslFormat.java
index e483d3d2aa..dabb11e960 100644
--- a/src/main/java/com/authlete/common/types/TslPublishFormat.java
+++ b/src/main/java/com/authlete/common/types/TslFormat.java
@@ -2,7 +2,7 @@
import java.util.EnumSet;
-public enum TslPublishFormat
+public enum TslFormat
{
/**
@@ -11,13 +11,13 @@ public enum TslPublishFormat
JWT((short)1, "jwt");
- private static final TslPublishFormat[] sValues = values();
- private static final TslPublishFormat.Helper sHelper = new TslPublishFormat.Helper(sValues);
+ private static final TslFormat[] sValues = values();
+ private static final TslFormat.Helper sHelper = new TslFormat.Helper(sValues);
private final short mValue;
private final String mString;
- private TslPublishFormat(short value, String string)
+ private TslFormat(short value, String string)
{
mValue = value;
mString = string;
@@ -42,7 +42,7 @@ public short getValue()
* @return
* An instance of this enum, or {@code null} if not found.
*/
- public static TslPublishFormat getByValue(short value)
+ public static TslFormat getByValue(short value)
{
if (value < 1 || sValues.length < value)
{
@@ -66,49 +66,49 @@ public String getString()
}
- public static int toBits(EnumSet set)
+ public static int toBits(EnumSet set)
{
return sHelper.toBits(set);
}
- public static TslPublishFormat[] toArray(int bits)
+ public static TslFormat[] toArray(int bits)
{
return sHelper.toArray(bits);
}
- public static EnumSet toSet(int bits)
+ public static EnumSet toSet(int bits)
{
return sHelper.toSet(bits);
}
- public static EnumSet toSet(TslPublishFormat[] array)
+ public static EnumSet toSet(TslFormat[] array)
{
return sHelper.toSet(array);
}
- private static class Helper extends EnumHelper
+ private static class Helper extends EnumHelper
{
- public Helper(TslPublishFormat[] values)
+ public Helper(TslFormat[] values)
{
- super(TslPublishFormat.class, values);
+ super(TslFormat.class, values);
}
@Override
- protected short getValue(TslPublishFormat entry)
+ protected short getValue(TslFormat entry)
{
return entry.getValue();
}
@Override
- protected TslPublishFormat[] newArray(int size)
+ protected TslFormat[] newArray(int size)
{
- return new TslPublishFormat[size];
+ return new TslFormat[size];
}
}
}
From 2223311dda2c74522cce6d2a3a52f0d240588c21 Mon Sep 17 00:00:00 2001
From: bilalashraf123
Date: Tue, 6 Jan 2026 17:39:53 +0500
Subject: [PATCH 16/19] updated as per comments
---
.../common/dto/TslPublishConfigInfo.java | 10 +++++-----
.../dto/TslPublishConfigsListResponse.java | 17 +++++++++++------
.../authlete/common/dto/TslPublishResponse.java | 8 +++++---
.../com/authlete/common/dto/TslResponse.java | 3 ---
.../dto/TslTokenStatusUpdateResponse.java | 3 ---
.../common/dto/TslUnusedIndexesRequest.java | 5 +----
.../common/dto/TslUnusedIndexesResponse.java | 7 ++-----
7 files changed, 24 insertions(+), 29 deletions(-)
diff --git a/src/main/java/com/authlete/common/dto/TslPublishConfigInfo.java b/src/main/java/com/authlete/common/dto/TslPublishConfigInfo.java
index 65cc8417f3..c52f3f753c 100644
--- a/src/main/java/com/authlete/common/dto/TslPublishConfigInfo.java
+++ b/src/main/java/com/authlete/common/dto/TslPublishConfigInfo.java
@@ -7,7 +7,7 @@
*
*
* This class contains per-service settings related to TSL publication, including
- * the service ID and the Unix timestamp (in seconds) indicating when the
+ * the service ID, format and the Unix timestamp (in seconds) indicating when the
* next TSL will be published.
*
*
@@ -40,12 +40,12 @@ public class TslPublishConfigInfo
private long nextTslPublishTime;
/**
- * The TSL format of the published TSL for this service.
+ * The TSL format of the TSL for this service.
*/
private TslFormat format;
/**
- * Set the service ID associated with this TSL publish configuration.
+ * Set the service ID associated with this TSL publish configurations.
*
* @param serviceId
* The service ID.
@@ -61,7 +61,7 @@ public TslPublishConfigInfo setServiceId(long serviceId)
}
/**
- * Get the service ID associated with this TSL publish configuration.
+ * Get the service ID associated with this TSL publish configurations.
*
* @return
* The service ID.
@@ -98,7 +98,7 @@ public long getNextTslPublishTime()
}
/**
- * Sets the format of the published TSL
+ * Sets the format of the TSL
*
* @param format
* The TSL format.
diff --git a/src/main/java/com/authlete/common/dto/TslPublishConfigsListResponse.java b/src/main/java/com/authlete/common/dto/TslPublishConfigsListResponse.java
index 454f46e7bb..4d60988985 100644
--- a/src/main/java/com/authlete/common/dto/TslPublishConfigsListResponse.java
+++ b/src/main/java/com/authlete/common/dto/TslPublishConfigsListResponse.java
@@ -32,6 +32,7 @@
*
*
{@code serviceID} – The service ID.
*
{@code nextTslPublishTime} – The scheduled Unix timestamp (seconds) for the next TSL publication.
+ *
{@code format} – The TSL format.
*
*
* @since 4.33
@@ -42,7 +43,9 @@ public class TslPublishConfigsListResponse extends ApiResponse
private static final long serialVersionUID = 1L;
/**
- * The result of the {@code /tsl/publish/configs/list} API call.
+ * The next action that the implementation of the publish TSL endpoint
+ * should take after getting a response from Authlete's
+ * {@code /tsl/publish/configs/list} API.
*/
public enum Action
{
@@ -63,17 +66,18 @@ public enum Action
*
*
* Each element in the array contains the publishing schedule for a service,
- * including the service ID and the next scheduled publish time.
+ * including the service ID, format and the next TSL scheduled publish time.
*
*/
private TslPublishConfigInfo[] info;
/**
- * Get the result of the {@code /tsl/publish/configs/list} API call.
+ * Get the next action that the implementation of the TSL publish endpoint should
+ * take after getting a response from Authlete's {@code /tsl/publish/configs/list} API.
*
* @return
- * The result of the API call.
+ * The next action.
*/
public Action getAction()
{
@@ -81,10 +85,11 @@ public Action getAction()
}
/**
- * Set the result of the {@code /tsl/publish/configs/list} API call.
+ * Set the next action that the implementation of the TSL endpoint should
+ * take after getting a response from Authlete's {@code /tsl/publish/configs/list} API.
*
* @param action
- * The result of the API call.
+ * The next action.
*
* @return
* {@code this} object.
diff --git a/src/main/java/com/authlete/common/dto/TslPublishResponse.java b/src/main/java/com/authlete/common/dto/TslPublishResponse.java
index 4b020541db..01cd959a0d 100644
--- a/src/main/java/com/authlete/common/dto/TslPublishResponse.java
+++ b/src/main/java/com/authlete/common/dto/TslPublishResponse.java
@@ -34,9 +34,6 @@ public class TslPublishResponse extends ApiResponse
* The next action that the implementation of the publish TSL endpoint
* should take after getting a response from Authlete's
* {@code /tsl/publish} API.
- *
- * @since 4.33
- * @since Authlete 3.0.22
*/
public enum Action
{
@@ -50,6 +47,11 @@ public enum Action
* configuration.
*/
FORBIDDEN,
+
+ /**
+ * Invalid TSL format
+ */
+ INVALID_TSL_FORMAT,
}
private Action action;
diff --git a/src/main/java/com/authlete/common/dto/TslResponse.java b/src/main/java/com/authlete/common/dto/TslResponse.java
index 1883c78b22..7ec00285d5 100644
--- a/src/main/java/com/authlete/common/dto/TslResponse.java
+++ b/src/main/java/com/authlete/common/dto/TslResponse.java
@@ -34,9 +34,6 @@ public class TslResponse extends ApiResponse
* The next action that the implementation of the TSL endpoint
* should take after getting a response from Authlete's
* {@code /tsl} API.
- *
- * @since 4.33
- * @since Authlete 3.0.22
*/
public enum Action
{
diff --git a/src/main/java/com/authlete/common/dto/TslTokenStatusUpdateResponse.java b/src/main/java/com/authlete/common/dto/TslTokenStatusUpdateResponse.java
index 79ec7e2682..4eb10cbd11 100644
--- a/src/main/java/com/authlete/common/dto/TslTokenStatusUpdateResponse.java
+++ b/src/main/java/com/authlete/common/dto/TslTokenStatusUpdateResponse.java
@@ -35,9 +35,6 @@ public class TslTokenStatusUpdateResponse extends ApiResponse {
* The next action that the implementation of the token status update endpoint
* should take after getting a response from Authlete's
* {@code /tsl/token/status} API.
- *
- * @since 4.33
- * @since Authlete 3.0.22
*/
public enum Action
{
diff --git a/src/main/java/com/authlete/common/dto/TslUnusedIndexesRequest.java b/src/main/java/com/authlete/common/dto/TslUnusedIndexesRequest.java
index 8ed6d248e2..d1f4ebc9df 100644
--- a/src/main/java/com/authlete/common/dto/TslUnusedIndexesRequest.java
+++ b/src/main/java/com/authlete/common/dto/TslUnusedIndexesRequest.java
@@ -24,7 +24,7 @@
* This class represents a request to pre-populate unused token indexes for a
* particular service. These unused indexes are later consumed when issuing
* Verifiable Credentials (VCs) or access tokens, allowing efficient allocation
- * of token indices within a Token Status List (TSL) environment.
+ * of token indexes within a Token Status List (TSL) environment.
*
*
* @since 4.33
@@ -99,7 +99,4 @@ public long getUnusedTokenIndexAdd()
return unusedTokenIndexesAdd;
}
-
-
-
}
diff --git a/src/main/java/com/authlete/common/dto/TslUnusedIndexesResponse.java b/src/main/java/com/authlete/common/dto/TslUnusedIndexesResponse.java
index 1347343782..ce38b5bae6 100644
--- a/src/main/java/com/authlete/common/dto/TslUnusedIndexesResponse.java
+++ b/src/main/java/com/authlete/common/dto/TslUnusedIndexesResponse.java
@@ -22,7 +22,7 @@
* This class represents a response to pre-populate unused token indexes for a
* particular service. These unused indexes are later consumed when issuing
* Verifiable Credentials (VCs) or access tokens, allowing efficient allocation
- * of token indices within a Token Status List (TSL) environment.
+ * of token indexes within a Token Status List (TSL) environment.
*
*
* @since 4.33
@@ -37,14 +37,11 @@ public class TslUnusedIndexesResponse extends ApiResponse {
* The next action that the implementation of the TSL unused indexes endpoint
* should take after getting a response from Authlete's
* {@code /tsl/unused/indexes} API.
- *
- * @since 4.33
- * @since Authlete 3.0.22
*/
public enum Action
{
/**
- * A TSL publish response has been prepared successfully.
+ * A TSL unused indexes has been populated successfully.
*/
OK,
From 2a21b8f0f6d1a18bd704c057b9de72a6898998e1 Mon Sep 17 00:00:00 2001
From: bilalashraf123
Date: Wed, 7 Jan 2026 13:37:24 +0500
Subject: [PATCH 17/19] minor updates in variable names
---
.../com/authlete/common/dto/TslUnusedIndexesRequest.java | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/main/java/com/authlete/common/dto/TslUnusedIndexesRequest.java b/src/main/java/com/authlete/common/dto/TslUnusedIndexesRequest.java
index d1f4ebc9df..a345e9b1a7 100644
--- a/src/main/java/com/authlete/common/dto/TslUnusedIndexesRequest.java
+++ b/src/main/java/com/authlete/common/dto/TslUnusedIndexesRequest.java
@@ -54,7 +54,7 @@ public class TslUnusedIndexesRequest implements Serializable
* @return
* {@code this} object.
*/
- public TslUnusedIndexesRequest setUnusedTokenIndexLeft(long unusedTokenIndexesLeft)
+ public TslUnusedIndexesRequest setUnusedTokenIndexesLeft(long unusedTokenIndexesLeft)
{
this.unusedTokenIndexesLeft = unusedTokenIndexesLeft;
@@ -67,7 +67,7 @@ public TslUnusedIndexesRequest setUnusedTokenIndexLeft(long unusedTokenIndexesLe
* @return
* The unused token indexes left value.
*/
- public long getUnusedTokenIndexLeft()
+ public long getUnusedTokenIndexesLeft()
{
return unusedTokenIndexesLeft;
}
@@ -81,7 +81,7 @@ public long getUnusedTokenIndexLeft()
* @return
* {@code this} object.
*/
- public TslUnusedIndexesRequest setUnusedTokenIndexAdd(long unusedTokenIndexesAdd)
+ public TslUnusedIndexesRequest setUnusedTokenIndexesAdd(long unusedTokenIndexesAdd)
{
this.unusedTokenIndexesAdd = unusedTokenIndexesAdd;
@@ -94,7 +94,7 @@ public TslUnusedIndexesRequest setUnusedTokenIndexAdd(long unusedTokenIndexesAdd
* @return
* The unused token indexes add value.
*/
- public long getUnusedTokenIndexAdd()
+ public long getUnusedTokenIndexesAdd()
{
return unusedTokenIndexesAdd;
}
From 4e5d83b7026a41c6fa80fdbe3c00dd210685ab1b Mon Sep 17 00:00:00 2001
From: bilalashraf123
Date: Wed, 14 Jan 2026 21:37:31 +0500
Subject: [PATCH 18/19] uncomment plugin tag in the pom.xml file
---
pom.xml | 44 ++++++++++++++++++++++----------------------
1 file changed, 22 insertions(+), 22 deletions(-)
diff --git a/pom.xml b/pom.xml
index 038d6e4fe2..24682b2364 100644
--- a/pom.xml
+++ b/pom.xml
@@ -308,28 +308,28 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+ org.apache.maven.plugins
+ maven-gpg-plugin
+ 3.1.0
+
+
+ sign-artifacts
+ verify
+
+ sign
+
+
+ E834481D
+ ${env.GPG_PASSPHRASE}
+
+ --pinentry-mode
+ loopback
+
+
+
+
+ org.codehaus.mojo
From 5bdc3e497e47af022e68ed39e7a98ad2445f674e Mon Sep 17 00:00:00 2001
From: bilalashraf123
Date: Thu, 22 Jan 2026 17:20:23 +0500
Subject: [PATCH 19/19] new action added
---
src/main/java/com/authlete/common/dto/TslResponse.java | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/main/java/com/authlete/common/dto/TslResponse.java b/src/main/java/com/authlete/common/dto/TslResponse.java
index 7ec00285d5..c715f9e06f 100644
--- a/src/main/java/com/authlete/common/dto/TslResponse.java
+++ b/src/main/java/com/authlete/common/dto/TslResponse.java
@@ -52,6 +52,11 @@ public enum Action
* Invalid TSL format
*/
INVALID_TSL_FORMAT,
+
+ /**
+ * TSL not found
+ */
+ NO_TSL_FOUND
}
private Action action;