protected override async Task RemoveUserTokenAsync(Model.IdentityUserToken <string> token) { var doc = await Context.Client.DeleteDocumentAsync(token.SelfLink, Context.RequestOptions); Context.SetSessionTokenIfEmpty(doc.SessionToken); }
protected override async Task AddUserTokenAsync(Model.IdentityUserToken <string> token) { var doc = await Context.Client.CreateDocumentAsync(Context.IdentityDocumentCollection.DocumentsLink, token , Context.RequestOptions, true); Context.SetSessionTokenIfEmpty(doc.SessionToken); token = JsonHelpers.CreateObject <Model.IdentityUserToken <string> >(doc); }