Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/main/java/com/authlete/common/dto/TokenRevokeRequest.java
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,14 @@
* the API returns {@code 400 Bad Request}.
* </p>
* </ol>
*
* <p>
* Bulk revocation with {@code clientIdentifier} only, {@code clientIdentifier} + {@code subject},
* or {@code subject} only deletes at most {@code 20 tokens per request}
* (the default of {@code token.revoke.count.max} in {@code ServerConfiguration.java}). If the
* target has more than 20 tokens, the response {@code count} will be 20 and the remainder
* is left untouched. To fully wipe them, call the endpoint repeatedly until {@code count} returns 0.
* </p>
*
* @since 3.26
* @since Authlete 2.2.29
Expand Down
12 changes: 11 additions & 1 deletion src/main/java/com/authlete/common/dto/TokenRevokeResponse.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,19 @@ public class TokenRevokeResponse extends ApiResponse
{
private static final long serialVersionUID = 1L;


/**
* The maximum amount of tokens that can be revoked per request is 20.
* If 20 is returned then additional token revocation requests should be made until this value
* is 0 to ensure that all tokens are revoked.
*/
private int count;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This note should also be added to the public getter/setter Javadocs, not only the private field.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.



/**
* Get the number of revoked tokens.
* The maximum amount of tokens that can be revoked per request is 20.
* If 20 is returned then additional token revocation requests should be made until this value
* is 0 to ensure that all tokens are revoked.
*
* @return
* The number of revoked tokens.
Expand All @@ -44,6 +51,9 @@ public int getCount()

/**
* Set the number of revoked tokens.
* The maximum amount of tokens that can be revoked per request is 20.
* If 20 is returned then additional token revocation requests should be made until this value
* is 0 to ensure that all tokens are revoked.
*
* @param count
* The number of revoked tokens.
Expand Down