VenlySDK-PlayFab compagnion library that can be used within Azure CloudFunctions
$ dotnet add package VenlyAPI.Companion.PlayFab-AzureThe Venly Companion for PlayFab provides server-side helpers and extension routes to create and manage Venly users and wallets from a PlayFab Azure Function. It persists the minimal identifiers and PIN (for PIN signing) in PlayFab Internal User Data so subsequent calls can be authorized automatically.
Install-Package <PackageId>dotnet add package <PackageId>Replace <PackageId> with the published NuGet ID for this package.
Set these App Settings (Environment Variables) on your Azure Function App:
VENLY_CLIENT_ID: Venly Client IdVENLY_CLIENT_SECRET_STAGING: Venly Client Secret for SandboxVENLY_CLIENT_SECRET_PRODUCTION: Venly Client Secret for ProductionVENLY_ENVIRONMENT: sandbox or productionPLAYFAB_DEV_SECRET_KEY: PlayFab Developer Secret KeyThese are consumed during startup to configure the Venly API and PlayFab SDK.
Routes are exposed via VyExtensionRoute and handled by the function extension handlers:
has_user: Returns whether a Venly user id is linkedcreate_user: Creates a Venly sub-user and stores its id (and PIN if PIN signing is used)get_user: Retrieves the linked Venly useruser_has_wallet: Returns whether a wallet id is linkedcreate_wallet: Creates a wallet for the linked Venly user; requires that a user exists. If PIN signing was used at user creation, the stored PIN is used to build VyUserAuth automaticallyget_wallet: Retrieves the linked walletAll routes return a VyServerResponseDto payload.
VyUserAuth.sandbox or production. Older versions used staging to refer to the Sandbox environment.