A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.mongodb.com/docs/realm-sdks/cpp/latest/structrealm_1_1user.html below:

Realm C++ SDK: realm::user Struct Reference

#include <app.hpp>

enum class   state : uint8_t { logged_out , logged_in , removed }   std::shared_ptr< app::User >  m_user  

A User instance represents a single Realm App user account.

A user may have one or more credentials associated with it. These credentials uniquely identify the user to the authentication provider, and are used to sign into a MongoDB Realm user account.

User objects can be accessed from any thread.

◆ state

The state of the user object.

◆ access_token() std::string realm::user::access_token ( ) const

The user's refresh token used to access the Realm Application.

This is required to make HTTP requests to MongoDB Realm's REST API for functionality not exposed natively. It should be treated as sensitive data.

◆ call_function() [1/4] std::future< std::optional< std::string > > realm::user::call_function ( const std::string &  name, const std::string &  args_ejson  ) const

Calls the Atlas App Services function with the provided name and arguments.

Parameters
name The name of the Atlas App Services function to be called. arguments The string represented extended json to be provided to the function.
Returns
A future containing an optional std::string once the operation has completed. This handler is executed on the thread the method was called from.
◆ call_function() [2/4] void realm::user::call_function ( const std::string &  name, const std::string &  args_ejson, std::function< void(std::optional< std::string >, std::optional< app_error >)>  callback  ) const

Calls the Atlas App Services function with the provided name and arguments.

Parameters
name The name of the Atlas App Services function to be called. arguments The string represented extended json to be provided to the function. callback The completion handler to call when the function call is complete. This handler is executed on the thread the method was called from.
◆ call_function() [3/4] std::future< std::optional< bsoncxx > > realm::user::call_function ( const std::string &  name, const std::vector< bsoncxx > &  args_bson  ) const

Calls the Atlas App Services function with the provided name and arguments.

Parameters
name The name of the Atlas App Services function to be called. arguments The BSON array to be provided to the function.
Returns
A future containing optional BSON once the operation has completed.
◆ call_function() [4/4] void realm::user::call_function ( const std::string &  name, const std::vector< bsoncxx > &  args_bson, std::function< void(std::optional< bsoncxx >, std::optional< app_error >)>  callback  ) const

Calls the Atlas App Services function with the provided name and arguments.

Parameters
name The name of the Atlas App Services function to be called. arguments The BSON array to be provided to the function. callback The completion handler to call when the function call is complete. This handler is executed on the thread the method was called from.
◆ get_custom_data()

The custom data of the user. This is configured in your Atlas App Services app.

◆ identifier() std::string realm::user::identifier ( ) const

The unique MongoDB Realm string identifying this user. Note this is different from an identitiy: A user may have multiple identities but has a single indentifier. See RLMUserIdentity.

◆ log_out() void realm::user::log_out ( std::function< void(std::optional< app_error >)> &&  callback ) const

Logs out the current user

The users state will be set to Removed is they are an anonymous user or LoggedOut if they are authenticated by an email / password or third party auth clients If the logout request fails, this method will still clear local authentication state.

◆ refresh_custom_user_data() [1/2] std::future< void > realm::user::refresh_custom_user_data ( ) const

Refresh a user's custom data. This will, in effect, refresh the user's auth session.

◆ refresh_custom_user_data() [2/2] void realm::user::refresh_custom_user_data ( std::function< void(std::optional< app_error >)>  callback )

Refresh a user's custom data. This will, in effect, refresh the user's auth session.

◆ refresh_token() std::string realm::user::refresh_token ( ) const

The user's refresh token used to access the Realm Applcation.

This is required to make HTTP requests to the Realm App's REST API for functionality not exposed natively. It should be treated as sensitive data.

◆ state()

The current state of the user.

The documentation for this struct was generated from the following files:


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4