The Form Digest value is collected during the login process, but will become invalid after a timeout period (I think a couple of hours). If we perform long running operations with sharepointer we can hit problems because the digest has become invalid. We also hit problems if we save away the login tokens and then use sharepointer without actually logging in.
So I'm planning on putting another pull request together where I change the implementation. I'm suggesting that the simplest solution is just to fetch the form digest value immediately before any operation that requires it. An alternative is to store away the token and attempt to use it, then refresh it if there's a problem. Obviously the quick and simple solution means we'll make more calls to SharePoint, whereas the complex solution might be more efficient but is harder to implement (and therefore more likely to have bugs).
Thoughts before I start hacking away?
The Form Digest value is collected during the login process, but will become invalid after a timeout period (I think a couple of hours). If we perform long running operations with sharepointer we can hit problems because the digest has become invalid. We also hit problems if we save away the login tokens and then use sharepointer without actually logging in.
So I'm planning on putting another pull request together where I change the implementation. I'm suggesting that the simplest solution is just to fetch the form digest value immediately before any operation that requires it. An alternative is to store away the token and attempt to use it, then refresh it if there's a problem. Obviously the quick and simple solution means we'll make more calls to SharePoint, whereas the complex solution might be more efficient but is harder to implement (and therefore more likely to have bugs).
Thoughts before I start hacking away?