SeafClient
SeafClient copied to clipboard
What pattern does SeafSession support for dependency injection?
Hey Renber,
Great work on this SDK! I've forked it over to my local machine and working to replace our Dropbox service with it. In ASP.NET Core, we injected the DropboxClient object from Dropbox's SDK as a singleton. I assume that the Dropbox SDK managed refreshing the auth token. Does SeafClient also manage the auth token's expiration?
Currently, refreshing of the token is not handled. However, I am not sure how session expiry for username+password based logins is handled in detail on the seafile server (might be automatically extended if you keep using it). In addition, sessions seem to have a rather long lifetime by default (multiple hours?). Consequently, it might be enough to pass the SeafSession instance around.