Presumably in this case you'll still need to send a user identifier for context, but you can assume the operation was authorized by the call that queued the task.
--
You received this message because you are subscribed to a topic in the Google Groups "Google App Engine" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-appengine/FTbKR62589o/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-appengine+unsubscribe@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/77248dbc-840b-419e-b68f-d96f6ba62d16%40googlegroups.com.
- ApurvaIs there anyway by which the task queue would check that the task got a 401 error and then it could ask for a refresh token and then call the handler with that token.I am using a push queue and app engine api to submit tasks to the default queue.Hello everyone,Thanks for your insights and suggestions. However, I will explain my setup again as
Queue queue = QueueFactory.getDefaultQueue();
queue.add(TaskOptions.Builder.withUrl("/api/tasks/indexLine").header("Authorization", token).param("linejson", linejson));
The task handler url is secured by using spring security framework by Oauth 2.0 tokens. Hence I pass an additional authorization header to the task for authentication. Now in case this oauth2.0 authorization token expires while sitting in the queue then whenever the task actually runs, the handler will return a 401 unauthorized error.