|
1 | 1 | # CometD .NET Core implementation of Salesforce Platform events |
2 | 2 | [](https://ci.appveyor.com/project/kdcllc/cometd-netcore-salesforce) |
3 | 3 |
|
4 | | -This repo contains the CometD .NET Core implementation for Salesforce Platform events. |
5 | | -These events can be subscribed to and listened to by your custom `Event Listener`. |
| 4 | +This repo contains the CometD .NET Core implementation for Salesforce Platform events. |
| 5 | + |
| 6 | +These events can be subscribed to and listened to by your custom `Event Listener`. The sample application of this library can be found [here](https://github.com/kdcllc/Bet.BuildingBlocks.SalesforceEventBus). |
6 | 7 |
|
7 | | -1. `CometD.NetCore2.Salesforce` |
8 | | - - Salesforce Platform Events as Event Bus [eShopOnContainers](https://github.com/dotnet-architecture/eShopOnContainers). |
| 8 | +The solution contains the following: |
| 9 | + |
| 10 | +1. `CometD.NetCore2.Salesforce` Project |
| 11 | + - A Salesforce Platform Events implementation based [Even Bus idea of eShopOnContainers](https://github.com/dotnet-architecture/eShopOnContainers). |
9 | 12 | - [Reusable Building Blocks and sample application that listens to Salesforce push events](https://github.com/kdcllc/Bet.BuildingBlocks.SalesforceEventBus). |
10 | | -2. DotNet Cli tool `AuthApp` |
11 | | - - This dotnet cli tool allows for retrieval of `Access Token` and `Refresh Token` to be used by any other application. Please refer to [How Are Apps Authenticated with the Web Server OAuth Authentication Flow](https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/intro_understanding_web_server_oauth_flow.htm) |
12 | 13 |
|
| 14 | +2. DotNet Cli tool `salesforce` Project |
| 15 | + - This dotnet cli tool allows for retrieval of `Access Token` and `Refresh Token` to be used by any other application. Please refer to [How Are Apps Authenticated with the Web Server OAuth Authentication Flow](https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/intro_understanding_web_server_oauth_flow.htm) |
13 | 16 |
|
14 | 17 | ## Installation |
15 | 18 |
|
16 | 19 | - To include this library inside of your project run nuget package installation |
17 | | -> Install-Package CometD.NetCore2.Salesforce |
| 20 | + |
| 21 | +```cmd |
| 22 | + PM> Install-Package CometD.NetCore2.Salesforce |
| 23 | +``` |
| 24 | + |
18 | 25 | Or |
19 | | -> dotnet add package CometD.NetCore.Salesforce |
20 | | -- To Inatall Salesforce Cli tool globally |
21 | 26 |
|
22 | | -> dotnet tool install salesforce -g |
| 27 | +```cmd |
| 28 | + dotnet add package CometD.NetCore.Salesforce |
| 29 | +``` |
| 30 | + |
| 31 | +- To Install Salesforce Cli tool globally run the following command: |
| 32 | + |
| 33 | +```cmd |
| 34 | + dotnet tool install salesforce -g |
| 35 | +
|
| 36 | +``` |
| 37 | + |
| 38 | +To verify the installation run: |
| 39 | + |
| 40 | +```cmd |
| 41 | + dotnet tool list -g |
| 42 | +``` |
| 43 | + |
| 44 | +## Usage of Salesforce dotnet cli tool |
| 45 | + |
| 46 | +The regular usage of this tool is within the Salesforce project that utilizes this library and contains configuration settings with the minimum of: |
| 47 | + |
| 48 | +```json |
| 49 | + "Salesforce": { |
| 50 | + "ClientId": "", |
| 51 | + "ClientSecret": "" |
| 52 | + } |
| 53 | +```` |
| 54 | + |
| 55 | +Or you can specify Azure Key Vault Url: |
| 56 | + |
| 57 | +```json |
| 58 | + "AzureVault": { |
| 59 | + "BaseUrl": "https://{name}.vault.azure.net/" |
| 60 | + }, |
| 61 | +``` |
| 62 | + |
| 63 | +Then run: |
| 64 | + |
| 65 | +```cmd |
| 66 | + salesforce get-tokens |
| 67 | +``` |
23 | 68 |
|
24 | | -Then to see if it was installed correctly: |
| 69 | +Or specify url within the dotnet cli tool like so: |
25 | 70 |
|
26 | | -> dotnet tool list -g |
| 71 | +```cmd |
| 72 | + salesforce get-tokens --azure https://{name}.vault.azure.net/" |
| 73 | +``` |
27 | 74 |
|
28 | | -## Salesforce DotNet Cli usage |
29 | | -Run this in the project directory that contains appsettings.json with your setttings: |
30 | | -> salesforce refresh-token |
31 | | -It will open web browser and log in with your credentials. |
| 75 | +This tool will open web browser and will require you to log in with your credentials to Salesforce portal in order to retrieve the tokens. |
32 | 76 |
|
33 | 77 | ## Saleforce Setup |
34 | 78 | [Video](https://www.youtube.com/watch?v=L6OWyCfQD6U) |
|
0 commit comments