Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refreshing access tokens #3

Open
crspybits opened this issue Feb 9, 2021 · 2 comments
Open

Refreshing access tokens #3

crspybits opened this issue Feb 9, 2021 · 2 comments

Comments

@crspybits
Copy link
Member

Neebla v1 had automatic access token refreshing. I haven't added this to v2. I need to come up with a strategy to do this.

@crspybits
Copy link
Member Author

crspybits commented Feb 9, 2021

There are four starting points for network requests:

func sendRequestTo(_ serverURL: URL, method: ServerHTTPMethod, configuration: RequestConfiguration? = nil, completion:((_ serverResponse:[String:Any]?, _ statusCode:Int?, _ error:Error?)->())?) {
func upload(fileUUID:String, uploadObjectTrackerId: Int64, from localURL: URL, toServerURL serverURL: URL, method: ServerHTTPMethod) -> Error? {
func download(file:Filenaming, downloadObjectTrackerId: Int64, fromServerURL serverURL: URL, method: ServerHTTPMethod) -> Error? {
func sendBackgroundRequestTo(_ serverURL: URL, method: ServerHTTPMethod, uuid: UUID, trackerId: Int64, requestInfo: Data? = nil) -> Error? {

@crspybits
Copy link
Member Author

crspybits commented Feb 9, 2021

What if: I have a timer set that, while the app is in the foreground, periodically, the access token gets refreshed? This way I don't have to muck about with the network request code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant