Class InvalidateTokenRequest
java.lang.Object
co.elastic.clients.elasticsearch._types.RequestBase
co.elastic.clients.elasticsearch.security.InvalidateTokenRequest
- All Implemented Interfaces:
JsonpSerializable
@JsonpDeserializable
public class InvalidateTokenRequest
extends RequestBase
implements JsonpSerializable
Invalidate a token.
The access tokens returned by the get token API have a finite period of time
for which they are valid. After that time period, they can no longer be used.
The time period is defined by the
xpack.security.authc.token.timeout
setting.
The refresh tokens returned by the get token API are only valid for 24 hours. They can also be used exactly once. If you want to invalidate one or more access or refresh tokens immediately, use this invalidate token API.
- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class co.elastic.clients.elasticsearch._types.RequestBase
RequestBase.AbstractBuilder<BuilderT extends RequestBase.AbstractBuilder<BuilderT>>
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final JsonpDeserializer<InvalidateTokenRequest>
Json deserializer forInvalidateTokenRequest
static final Endpoint<InvalidateTokenRequest,
InvalidateTokenResponse, ErrorResponse> Endpoint "security.invalidate_token
". -
Method Summary
Modifier and TypeMethodDescriptionstatic InvalidateTokenRequest
final String
API name:realm_name
final String
API name:refresh_token
void
serialize
(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) Serialize this object to JSON.protected void
serializeInternal
(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) protected static void
final String
token()
API name:token
final String
username()
API name:username
Methods inherited from class co.elastic.clients.elasticsearch._types.RequestBase
toString
-
Field Details
-
_DESERIALIZER
Json deserializer forInvalidateTokenRequest
-
_ENDPOINT
public static final Endpoint<InvalidateTokenRequest,InvalidateTokenResponse, _ENDPOINTErrorResponse> Endpoint "security.invalidate_token
".
-
-
Method Details
-
of
public static InvalidateTokenRequest of(Function<InvalidateTokenRequest.Builder, ObjectBuilder<InvalidateTokenRequest>> fn) -
realmName
API name:realm_name
-
refreshToken
API name:refresh_token
-
token
API name:token
-
username
API name:username
-
serialize
Serialize this object to JSON.- Specified by:
serialize
in interfaceJsonpSerializable
-
serializeInternal
-
setupInvalidateTokenRequestDeserializer
protected static void setupInvalidateTokenRequestDeserializer(ObjectDeserializer<InvalidateTokenRequest.Builder> op)
-