Module org.elasticsearch.xcore
Class CreateTokenRequestBuilder
java.lang.Object
org.elasticsearch.action.ActionRequestBuilder<CreateTokenRequest,CreateTokenResponse>
org.elasticsearch.xpack.core.security.action.token.CreateTokenRequestBuilder
- All Implemented Interfaces:
RequestBuilder<CreateTokenRequest,CreateTokenResponse>
public final class CreateTokenRequestBuilder
extends ActionRequestBuilder<CreateTokenRequest,CreateTokenResponse>
Request builder used to populate a
CreateTokenRequest-
Field Summary
Fields inherited from class org.elasticsearch.action.ActionRequestBuilder
action, client, request -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionsetGrantType(String grantType) Specifies the grant type for this request.setPassword(SecureString password) Set the password credentials associated with the user.setRefreshToken(String refreshToken) Set the scope of the access token.setUsername(String username) Set the username to be used for authentication with a password grant
-
Constructor Details
-
CreateTokenRequestBuilder
-
-
Method Details
-
setGrantType
Specifies the grant type for this request. Currently onlypasswordis supported -
setUsername
Set the username to be used for authentication with a password grant -
setPassword
Set the password credentials associated with the user. These credentials will be used for authentication and the resulting token will be for this user -
setScope
Set the scope of the access token. Anullscope implies the default scope. If the requested scope differs from the scope of the token, the token's scope will be returned in the response -
setRefreshToken
-