-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Additions to Invalidate Token API (#3937)
* Implement additional fields on invalidate user token requests * Add error details to response * Update src/Nest/XPack/Security/User/InvalidateUserAccessToken/InvalidateUserAccessTokenRequest.cs * Fix inherit doc references Co-Authored-By: Russ Cam <russ.cam@elastic.co>
- Loading branch information
Showing
2 changed files
with
77 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 18 additions & 1 deletion
19
src/Nest/XPack/Security/User/InvalidateUserAccessToken/InvalidateUserAccessTokenResponse.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,33 @@ | ||
using System.Runtime.Serialization; | ||
using System.Collections.Generic; | ||
using System.Runtime.Serialization; | ||
using Elasticsearch.Net; | ||
|
||
namespace Nest | ||
{ | ||
public class InvalidateUserAccessTokenResponse : ResponseBase | ||
{ | ||
/// <summary> | ||
/// The number of the tokens that were invalidated as part of this request. | ||
/// </summary> | ||
[DataMember(Name = "invalidated_tokens")] | ||
public long InvalidatedTokens { get; internal set; } | ||
|
||
/// <summary> | ||
/// The number of tokens that were already invalidated. | ||
/// </summary> | ||
[DataMember(Name = "previously_invalidated_tokens")] | ||
public long PreviouslyInvalidatedTokens { get; internal set; } | ||
|
||
/// <summary> | ||
/// The number of errors that were encountered when invalidating the tokens. | ||
/// </summary> | ||
[DataMember(Name = "error_count")] | ||
public long ErrorCount { get; internal set; } | ||
|
||
/// <summary> | ||
/// Details about these errors. This field is not present in the response when there are no errors. | ||
/// </summary> | ||
[DataMember(Name = "error_details")] | ||
public IReadOnlyCollection<ErrorCause> ErrorDetails { get; internal set; } = EmptyReadOnly<ErrorCause>.Collection; | ||
} | ||
} |