Class ApiKey
- java.lang.Object
-
- org.elasticsearch.client.security.support.ApiKey
-
public final class ApiKey extends Object
API key information
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)static ApiKeyfromXContent(XContentParser parser)InstantgetCreation()InstantgetExpiration()StringgetId()StringgetName()StringgetRealm()StringgetUsername()inthashCode()booleanisInvalidated()StringtoString()
-
-
-
Method Detail
-
getId
public String getId()
-
getName
public String getName()
-
getCreation
public Instant getCreation()
- Returns:
- a instance of
Instantwhen this API key was created.
-
getExpiration
public Instant getExpiration()
- Returns:
- a instance of
Instantwhen this API key will expire. In case the API key does not expire then will returnnull
-
isInvalidated
public boolean isInvalidated()
- Returns:
trueif this API key has been invalidated else returnsfalse
-
getUsername
public String getUsername()
- Returns:
- the username for which this API key was created.
-
getRealm
public String getRealm()
- Returns:
- the realm name of the user for which this API key was created.
-
fromXContent
public static ApiKey fromXContent(XContentParser parser) throws IOException
- Throws:
IOException
-
-