Package com.surrealdb.signin
Class RecordCredential
java.lang.Object
com.surrealdb.signin.RecordCredential
- All Implemented Interfaces:
Credential
Credentials for signing up or signing in as a record user (record access
method). Used with
Surreal.signup(RecordCredential) and
Surreal.signin(Credential).
When namespace or database are null, the SDK uses the current
session namespace/database set via
Surreal.useNs(String) and
Surreal.useDb(String) (or the values returned by
Surreal.useNs(String) etc.). Call those first when
omitting ns/db.
The params object is serialized and sent as the signup/signin variables (e.g. email, password). It must be a type that can be converted to a SurrealDB value (e.g. Map, POJO, or primitive). May be null; null is sent as SurrealDB null.
-
Constructor Summary
ConstructorsConstructorDescriptionRecordCredential(String access, Object params) Creates record credentials using the current session namespace and database.RecordCredential(String namespace, String database, String access, Object params) Creates record credentials with explicit namespace and database. -
Method Summary
Modifier and TypeMethodDescription
-
Constructor Details
-
RecordCredential
Creates record credentials with explicit namespace and database.- Parameters:
namespace- namespace name (may be null to use session default)database- database name (may be null to use session default)access- access method name (as defined in DEFINE ACCESS)params- signup/signin variables (e.g. map with "email", "password"); will be serialized
-
RecordCredential
Creates record credentials using the current session namespace and database. RequiresSurreal.useNs(String)andSurreal.useDb(String)(orSurreal.useDefaults()) to have been called first.- Parameters:
access- access method name (as defined in DEFINE ACCESS)params- signup/signin variables (e.g. map with "email", "password"); will be serialized
-
-
Method Details
-
getNamespace
-
getDatabase
-
getAccess
-
getParams
-