My question is not specific to security tokens but that's what my example is about. I'm currently drafting the interface of a storage service which would look something like this :
public interface IStorageService
{
string Store<T>(T object);
T Retrieve<T>(string reference);
}
This interface could have multiple implementations. For example:
- A local one, just using a Dictionary as a storage
- A Cloud one, using Azure Tables
Then, my problem is the following: As the Azure implementation would need security tokens (that might change at each call), what would be a good practice to take them into account without polluting the Interface for users that don't mind about this implementation? Any idea or existing example is welcome.
Thanks in advance for your help.
Aucun commentaire:
Enregistrer un commentaire