Docs Menu
Docs Home
/ /
Atlas Device SDKs
/ / /

Class ApiKey

On this page

  • io.realm.mongodb.auth
  • Method Summary
  • Inherited Methods
  • Method Detail
  • equals
  • getId
  • getName
  • getValue
  • hashCode
  • isEnabled
  • toString
java.lang.Object
io.realm.mongodb.auth.ApiKey

Class representing an API key for a User . 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 various fetch -methods.

Note that a keys value is 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.

Modifier and Type
Method and Description
public boolean
public ObjectId

Returns the unique identifier for this key.

public String

Returns the name of this key.

public String

Returns this keys value.

public int
public boolean

Returns whether or not this key is currently enabled.

public String
  • Methods inherited from class java.lang.Object : getClass , hashCode , equals , clone , toString , notify , notifyAll , wait , wait , wait , finalize

public boolean equals (
)

Overrides

equals in class Object

public ObjectId getId ()

Returns the unique identifier for this key.

Returns

the id, uniquely identifying the key.

public String getName ()

Returns the name of this key.

Returns

the name of the key.

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.

public int hashCode ()

Overrides

hashCode in class Object

public boolean isEnabled ()

Returns whether or not this key is currently enabled.

Returns

if the key is enabled or not.

public String toString ()

Overrides

toString in class Object

Back

io.realm.mongodb.auth