Beamable SDK
Public Member Functions | Public Attributes | List of all members
Beamable.Common.Api.Auth.User Class Reference

This type defines the Client main entry point for the User feature. More...

Inheritance diagram for Beamable.Common.Api.Auth.User:
Inheritance graph
[legend]

Public Member Functions

bool HasDBCredentials ()
 Check if the player has registered an email address with their account. More...
 
bool HasThirdPartyAssociation (AuthThirdParty thirdParty)
 Check if a specific AuthThirdParty exists in the player's thirdPartyAppAssociations list. More...
 
bool HasAnyCredentials ()
 Check if any credentials have been associated with this account, whether email, device ids or third party apps. More...
 
bool HasScope (string scope)
 Check if a specific scope exists for the player's permissions. If the user is an Admin, and has the * scope, then every scope check will return true. This method reads the scope data from the scopes list More...
 

Public Attributes

long id
 The unique id of the player, sometimes called a "dbid".
 
string email
 If the player has associated an email with their account, the email will appear here. Null otherwise. The email can be associated with the IAuthApi.RegisterDBCredentials method
 
string language
 If the player has chosen a language for their account, the language code will appear here. EN by default.
 
List< string > scopes
 Scopes are permissions that the player has over the Beamable ecosystem. Most players will have no scopes. Players with the role of "tester" will have some "read" based scopes, Players with the role of "developer" will have most all scopes except those relating to team management, and Players with the role of "admin" will have single scope with the value of "*", which indicates ALL scopes.
 
List< string > thirdPartyAppAssociations
 If the player has associated any third party accounts with their account, those will appear here. The values of the strings will be taken from the AuthThirdPartyMethods.GetString method. Third parties can be associated with the IAuthApi.RegisterThirdPartyCredentials method.
 
List< string > deviceIds
 If the player has associated any device Ids with their account, those will appear here.
 

Detailed Description

This type defines the Client main entry point for the User feature.

Related Links

img beamable-logo

Member Function Documentation

◆ HasAnyCredentials()

bool Beamable.Common.Api.Auth.User.HasAnyCredentials ( )
inline

Check if any credentials have been associated with this account, whether email, device ids or third party apps.

Returns
true if any credentials exist, false otherwise

◆ HasDBCredentials()

bool Beamable.Common.Api.Auth.User.HasDBCredentials ( )
inline

Check if the player has registered an email address with their account.

Returns
true if the email address has been provided, false otherwise.

◆ HasScope()

bool Beamable.Common.Api.Auth.User.HasScope ( string  scope)
inline

Check if a specific scope exists for the player's permissions. If the user is an Admin, and has the * scope, then every scope check will return true. This method reads the scope data from the scopes list

Parameters
scopeThe scope you want to check
Returns
true if the scope exists or if the user is an admin, false otherwise

◆ HasThirdPartyAssociation()

bool Beamable.Common.Api.Auth.User.HasThirdPartyAssociation ( AuthThirdParty  thirdParty)
inline

Check if a specific AuthThirdParty exists in the player's thirdPartyAppAssociations list.

Parameters
thirdPartyThe AuthThirdParty to check the player for
Returns
true if the third party has been associated with the player account, false otherwise.

The documentation for this class was generated from the following file: