Class CreateAuthTokenRequest
- java.lang.Object
-
- org.elasticsearch.transport.TransportMessage
-
- org.elasticsearch.transport.TransportRequest
-
- org.elasticsearch.action.ActionRequest
-
- com.floragunn.searchguard.authtoken.api.CreateAuthTokenRequest
-
- All Implemented Interfaces:
org.elasticsearch.common.io.stream.Writeable,org.elasticsearch.common.util.concurrent.RefCounted,org.elasticsearch.common.xcontent.ToXContent,org.elasticsearch.common.xcontent.ToXContentObject,org.elasticsearch.tasks.TaskAwareRequest
public class CreateAuthTokenRequest extends org.elasticsearch.action.ActionRequest implements org.elasticsearch.common.xcontent.ToXContentObject
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.elasticsearch.transport.TransportRequest
org.elasticsearch.transport.TransportRequest.Empty
-
-
Constructor Summary
Constructors Constructor Description CreateAuthTokenRequest()CreateAuthTokenRequest(RequestedPrivileges requestedPrivileges)CreateAuthTokenRequest(org.elasticsearch.common.io.stream.StreamInput in)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetAudience()TemporalAmountgetExpiresAfter()RequestedPrivilegesgetRequestedPrivileges()StringgetTokenName()booleanisFreezePrivileges()static CreateAuthTokenRequestparse(org.elasticsearch.common.bytes.BytesReference document, org.elasticsearch.common.xcontent.XContentType contentType)voidsetAudience(String audience)voidsetExpiresAfter(Duration expiresAfter)voidsetFreezePrivileges(boolean snapshotPrivileges)voidsetRequestedPrivileges(RequestedPrivileges requestedPrivileges)voidsetTokenName(String tokenName)StringtoJson()StringtoString()org.elasticsearch.common.xcontent.XContentBuildertoXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params)org.elasticsearch.action.ActionRequestValidationExceptionvalidate()voidwriteTo(org.elasticsearch.common.io.stream.StreamOutput out)-
Methods inherited from class org.elasticsearch.transport.TransportRequest
getParentTask, setParentTask
-
Methods inherited from class org.elasticsearch.transport.TransportMessage
decRef, incRef, remoteAddress, remoteAddress, tryIncRef
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
Constructor Detail
-
CreateAuthTokenRequest
public CreateAuthTokenRequest()
-
CreateAuthTokenRequest
public CreateAuthTokenRequest(RequestedPrivileges requestedPrivileges)
-
CreateAuthTokenRequest
public CreateAuthTokenRequest(org.elasticsearch.common.io.stream.StreamInput in) throws IOException- Throws:
IOException
-
-
Method Detail
-
writeTo
public void writeTo(org.elasticsearch.common.io.stream.StreamOutput out) throws IOException- Specified by:
writeToin interfaceorg.elasticsearch.common.io.stream.Writeable- Overrides:
writeToin classorg.elasticsearch.action.ActionRequest- Throws:
IOException
-
validate
public org.elasticsearch.action.ActionRequestValidationException validate()
- Specified by:
validatein classorg.elasticsearch.action.ActionRequest
-
parse
public static CreateAuthTokenRequest parse(org.elasticsearch.common.bytes.BytesReference document, org.elasticsearch.common.xcontent.XContentType contentType) throws com.floragunn.searchsupport.config.validation.ConfigValidationException
- Throws:
com.floragunn.searchsupport.config.validation.ConfigValidationException
-
getRequestedPrivileges
public RequestedPrivileges getRequestedPrivileges()
-
setRequestedPrivileges
public void setRequestedPrivileges(RequestedPrivileges requestedPrivileges)
-
getAudience
public String getAudience()
-
setAudience
public void setAudience(String audience)
-
getExpiresAfter
public TemporalAmount getExpiresAfter()
-
setExpiresAfter
public void setExpiresAfter(Duration expiresAfter)
-
getTokenName
public String getTokenName()
-
setTokenName
public void setTokenName(String tokenName)
-
isFreezePrivileges
public boolean isFreezePrivileges()
-
setFreezePrivileges
public void setFreezePrivileges(boolean snapshotPrivileges)
-
toJson
public String toJson()
-
toXContent
public org.elasticsearch.common.xcontent.XContentBuilder toXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params) throws IOException- Specified by:
toXContentin interfaceorg.elasticsearch.common.xcontent.ToXContent- Throws:
IOException
-
toString
public String toString()
- Overrides:
toStringin classorg.elasticsearch.transport.TransportRequest
-
-