* Remove .NET Core 3.1 support and standardize on .NET 6
Signed-off-by: Yash Nisar <yashnisar@microsoft.com>
* Remove support for .NET 5 as well
Signed-off-by: Yash Nisar <yashnisar@microsoft.com>
---------
Signed-off-by: Yash Nisar <yashnisar@microsoft.com>
Add Subscribe/Unsubscribe API support
This commit adds support for both the subscribe and unsubscribe
APIs for Darp's Configuration building block. The configuration can
now be exposed through the AspNet builder pattern or by making the
request directly with the DaprClient.
https://github.com/dapr/dotnet-sdk/issues/822
Signed-off-by: Hal Spang <halspang@microsoft.com>
* Allow multiple topics to call the same endpoint
Using the WithTopic builder pattern allows you to specify multiple
topics that route to a single endpoint. Given the topics are unique,
this should be a valid case.
This change allows for a single endpoint to bind to multiple topics.
Note that this can only be done via the EndpointBuilder and not the
TopicAttribute.
https://github.com/dapr/dotnet-sdk/issues/715
* Let TopicAttribute to be specified multiple times
The endpoint builder allowed for multiple WithTopic calls so the
attribute should match that behavior.
* Added support for processing raw messages.
* Refactored code and updated subscribeendpoint tests.
* Updated file name to match class name.
* Marked subscription and metadata classes as internal.
* Adds Dapr authentication handler
- This includes functionality which simplifies securing endpoints using Dapr API Token authentication
- Fixes#682
* Remove Dapr authentication handler from examples.
* Don't resolve Dapr API token on every request, set it using delegate when configuring Dapr authentication instead.
* Adds integration tests for Dapr API token
Co-authored-by: Yaron Schneider <yaronsc@microsoft.com>
Fixes: #592
This change teaches the cloud events middleware to JSON-decode non-JSON
content when it appears in the `data` attribute in a cloud event.
There are three cases for cloud events that matter:
- data is used, content is a JSON object, datacontentype is JSON
- data is used, content is a JSON string, dataconenttype != JSON
- data_base64 is used, content is base64 bytes
We weren't handling the second of this. If you submitted the content:
`"data": "hello, "\world!\""` with datacontenttype = text/plain
You would end up with `"hello, \"world!\""` in the request body instead
of `hello, "world!"`.
This is a very subtle case, and I'm trying to fix it before users couple
their code to the wrong behavior. Since this is technically a breaking
change, I've added a opt-out so you can restore the buggy behavior.
* Prepping for multi pubsub
* Add pubsub name, some cleanup
* multi pubsub changes
Co-authored-by: Aman Bhardwaj <amanbha@microsoft.com>
Co-authored-by: LM <lemai>
* adding IDAprClient interface
* Adding DaprClientBuilder and adding methods for Publish
* updating the method name for publish
* Adding unit tests for publishevent api
* Removing individual clients for publish
* Renaming base class to DaprClient and implementation calss to DparClientGrpc
* Moving State api to grpc and adding helpers to unittest grpc calls.
* More DaprClient logic
* metadata, etag, options, etc are optional
* Revert "metadata, etag, options, etc are optional"
This reverts commit ea5dc12c5d.
* Default params, 2 new Try- methods, overload refactor for InvokeMethodAsync
* Move some classes/enums to different files. Documentation
* Code refactor and changing tests to use grpc
* Adding tests with state options
* Adding test for getting etag and state
* More refactoring and adding INvokeBinding test
* Fixing tests and tidying up things.
* Updating solutions for renamed project
* Updating projects for rename.
* Oneclient secret (#245)
* ADding Secret Apis
* Using Task for secret
* Format (#242)
* Updating samples.slm
* awaint the call to grpc in common method so that common error handling can be done there.
* Addressing review comments
* fixing test.sln
* updating prod.sln
* Addressing review comments from James.
* Add doc and example for method invocation on http app
* Updating arg validation.
* Updating example.
Co-authored-by: LM <lemai>
Co-authored-by: Carlos Mendible <cmendible@gmail.com>
* Including state Store name in the APIs to support multi state store scenario in SDK
* correcting the typo in the comment.
* Respective Changes to the tests
* Changes in StateAttribute and Binder classes to support state store name
* Changes in StateEntryModelBinderTests
* StoreName changes in the Integration test app
* fixing build issues
* Fixing integration tests
* Addressing review comments.
* Addressing review comments
* Updating samples to use correct state store name as generated by dapr cli.
Co-authored-by: Aman Bhardwaj <amanbha@users.noreply.github.com>
Fixes: #74
note: This relies on the fix for dapr/dapr#574 which has been merged.
This change introduces a middleware that can upwrap a *structured* cloud
event. This is the format used by dapr by default now for pub/sub
messaging. Adding the middleware makes it transparent to the developer
whether the data can from a cloud event or was a basic RPC call.
We're adding the middleware for this first since it's the most general
approach. It has a drawback compared with other approaches, performance.
Users could alternatively use the SDK from CloudEvents to read their
data without the middleware.
We might also want to add an MVC formatter in the future, which could do
the unwrapping and deserialization to a user-type in a single operation.