Package io.realm.mongodb.auth
Class ApiKey
- java.lang.Object
-
- io.realm.mongodb.auth.ApiKey
-
public class ApiKey extends Object
Class representing an API key for aUser. An API can be used to represent the user when logging instead of using email and password.These keys are created or fetched through
ApiKeyAuth.create(String)or the variousfetch-methods.Note that a keys
valueis only available when the key is created, after that it is not visible. So anyone creating an API key is responsible for storing it safely after that.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)ObjectIdgetId()Returns the unique identifier for this key.StringgetName()Returns the name of this key.StringgetValue()Returns this keys value.inthashCode()booleanisEnabled()Returns whether or not this key is currently enabled.StringtoString()
-
-
-
Method Detail
-
getId
public ObjectId getId()
Returns the unique identifier for this key.- Returns:
- the id, uniquely identifying the key.
-
getValue
@Nullable public String getValue()
Returns this keys value. This value is only returned when the key is created. After that the value is no longer visible.- Returns:
- the value of this key. Is only returned when the key is created.
-
getName
public String getName()
Returns the name of this key.- Returns:
- the name of the key.
-
isEnabled
public boolean isEnabled()
Returns whether or not this key is currently enabled.- Returns:
- if the key is enabled or not.
-
-