Class CreateTokenRequest
java.lang.Object
org.elasticsearch.client.security.CreateTokenRequest
- All Implemented Interfaces:
Validatable,org.elasticsearch.common.xcontent.ToXContent,org.elasticsearch.common.xcontent.ToXContentObject
public final class CreateTokenRequest extends java.lang.Object implements Validatable, org.elasticsearch.common.xcontent.ToXContentObject
Request to create a new OAuth2 token from the Elasticsearch cluster.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
org.elasticsearch.common.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.common.xcontent.ToXContent.MapParams, org.elasticsearch.common.xcontent.ToXContent.Params -
Field Summary
Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent
EMPTY_PARAMSFields inherited from interface org.elasticsearch.client.Validatable
EMPTY -
Constructor Summary
Constructors Constructor Description CreateTokenRequest(java.lang.String grantType, java.lang.String scope, java.lang.String username, char[] password, java.lang.String refreshToken, char[] kerberosTicket)General purpose constructor. -
Method Summary
Modifier and Type Method Description static CreateTokenRequestclientCredentialsGrant()booleanequals(java.lang.Object o)java.lang.StringgetGrantType()char[]getKerberosTicket()char[]getPassword()java.lang.StringgetRefreshToken()java.lang.StringgetScope()java.lang.StringgetUsername()inthashCode()static CreateTokenRequestkerberosGrant(char[] kerberosTicket)static CreateTokenRequestpasswordGrant(java.lang.String username, char[] password)static CreateTokenRequestrefreshTokenGrant(java.lang.String refreshToken)org.elasticsearch.common.xcontent.XContentBuildertoXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params)Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.elasticsearch.common.xcontent.ToXContentObject
isFragmentMethods inherited from interface org.elasticsearch.client.Validatable
validate
-
Constructor Details
-
CreateTokenRequest
public CreateTokenRequest(java.lang.String grantType, @Nullable java.lang.String scope, @Nullable java.lang.String username, @Nullable char[] password, @Nullable java.lang.String refreshToken, @Nullable char[] kerberosTicket)General purpose constructor. This constructor is typically not useful, and one of the following factory methods should be used instead:
-
-
Method Details
-
passwordGrant
-
refreshTokenGrant
-
clientCredentialsGrant
-
kerberosGrant
-
getGrantType
public java.lang.String getGrantType() -
getScope
public java.lang.String getScope() -
getUsername
public java.lang.String getUsername() -
getPassword
public char[] getPassword() -
getRefreshToken
public java.lang.String getRefreshToken() -
getKerberosTicket
public char[] getKerberosTicket() -
toXContent
public org.elasticsearch.common.xcontent.XContentBuilder toXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params) throws java.io.IOException- Specified by:
toXContentin interfaceorg.elasticsearch.common.xcontent.ToXContent- Throws:
java.io.IOException
-
equals
public boolean equals(java.lang.Object o)- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()- Overrides:
hashCodein classjava.lang.Object
-