zoho / zohocrm-csharp-sdk-6.0

Apache License 2.0
2 stars 2 forks source link

ITokenStore for local in-memory storage #26

Closed anatolii-bohdanov closed 3 months ago

anatolii-bohdanov commented 3 months ago

Hey guys

Can you provide an ITokenStore implementation for local in-memory storage (for example MemoryCache or EF Core in-memory DB)?

raja-7453 commented 3 months ago

Thanks, @anatolii-bohdanov for your contribution. Our C# SDK comes with built-in support for File Persistence, which stores your tokens in a file at a location of your choosing, and DB Persistence, which stores your tokens in a MySQL database. However, if these options don't align with your specific requirements, or if you want to use a database other than MySQL or any other storage method, you can leverage Custom Persistence, where you can define your own storage logic through the ITokenStore interface. To do this, you need to implement the ITokenStore interface and override its methods accordingly.