类 ApiKey
java.lang.Object
org.easysearch.client.security.support.ApiKey
public final class ApiKey
extends java.lang.Object
API key information
-
构造器概要
构造器 构造器 说明 ApiKey(java.lang.String name, java.lang.String id, java.time.Instant creation, java.time.Instant expiration, boolean invalidated, java.lang.String username, java.lang.String realm) -
方法概要
修饰符和类型 方法 说明 booleanequals(java.lang.Object obj)static ApiKeyfromXContent(org.easysearch.common.xcontent.XContentParser parser)java.time.InstantgetCreation()java.time.InstantgetExpiration()java.lang.StringgetId()java.lang.StringgetName()java.lang.StringgetRealm()java.lang.StringgetUsername()inthashCode()booleanisInvalidated()java.lang.StringtoString()从类继承的方法 java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
构造器详细资料
-
ApiKey
public ApiKey(java.lang.String name, java.lang.String id, java.time.Instant creation, java.time.Instant expiration, boolean invalidated, java.lang.String username, java.lang.String realm)
-
-
方法详细资料
-
getId
public java.lang.String getId() -
getName
public java.lang.String getName() -
getCreation
public java.time.Instant getCreation()- 返回:
- a instance of
Instantwhen this API key was created.
-
getExpiration
public java.time.Instant getExpiration()- 返回:
- a instance of
Instantwhen this API key will expire. In case the API key does not expire then will returnnull
-
isInvalidated
public boolean isInvalidated()- 返回:
trueif this API key has been invalidated else returnsfalse
-
getUsername
public java.lang.String getUsername()- 返回:
- the username for which this API key was created.
-
getRealm
public java.lang.String getRealm()- 返回:
- the realm name of the user for which this API key was created.
-
hashCode
public int hashCode()- 覆盖:
hashCode在类中java.lang.Object
-
equals
public boolean equals(java.lang.Object obj)- 覆盖:
equals在类中java.lang.Object
-
fromXContent
public static ApiKey fromXContent(org.easysearch.common.xcontent.XContentParser parser) throws java.io.IOException- 抛出:
java.io.IOException
-
toString
public java.lang.String toString()- 覆盖:
toString在类中java.lang.Object
-