Beamable SDK
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Beamable.Server.Microservice Class Reference

This type defines the Microservice main entry point for the Microservice feature. More...

Inheritance diagram for Beamable.Server.Microservice:
Inheritance graph
[legend]
Collaboration diagram for Beamable.Server.Microservice:
Collaboration graph
[legend]

Public Member Functions

void ProvideContext (RequestContext ctx)
 
void ProvideRequester (RequesterFactory requesterFactory)
 
void ProvideServices (ServicesFactory servicesFactory)
 
void ProvideDefaultServices (IServiceProvider provider, Func< RequestContext, IServiceProvider > scopeGenerator)
 

Protected Member Functions

RequestHandlerData AssumeUser (long userId, bool requireAdminUser=true)
 Build a request context and collection of services that represents another player. More...
 

Protected Attributes

RequestContext Context
 This type defines the Microservice RequestContext.
 
IBeamableRequester Requester
 This type defines the IBeamableRequester.
 
IBeamableServices Services
 This type defines the Microservice main entry point for Beamable Microservice features. More...
 
IStorageObjectConnectionProvider Storage
 

Detailed Description

This type defines the Microservice main entry point for the Microservice feature.

A microservice architecture, or "microservice", is a solution of developing software systems that focuses on building single-function modules with well-defined interfaces and operations.

Related Links

img beamable-logo

Member Function Documentation

◆ AssumeUser()

RequestHandlerData Beamable.Server.Microservice.AssumeUser ( long  userId,
bool  requireAdminUser = true 
)
inlineprotected

Build a request context and collection of services that represents another player.

This can be used to take API actions on behalf of another player. For example, if you needed to modify another player's currency, you could use this method's return object to access an IMicroserviceInventoryApi and make a call.

Parameters
userIdThe user id of the player for whom you'd like to make actions on behalf of
requireAdminUserBy default, this method can only be called by a user with admin access token.

If you pass in false for this parameter, then any user's request can assume another user. This can be dangerous, and you should be careful that the code you write cannot be exploited.

Returns
A RequestHandlerData object that contains a request context, and a collection of services to execute SDK calls against.

Member Data Documentation

◆ Services

IBeamableServices Beamable.Server.Microservice.Services
protected

This type defines the Microservice main entry point for Beamable Microservice features.

Related Links


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