Token based authentication is one of the security authentication method we follow.
But In case of authentication setting up the header with auth token do the job.But How to manage the webservices with refresh mechanism?As the token expire we have to deal with a web service and create a new one.So in a bigger app with lots of webservice interaction how can we manage?
Should we have to work on the failure mechanism in every webservice checking if the token fails, get new token and then call the option again?
In framework like AFNetworking or ASIHttp is this handled or we have to deal with code ourselves.If so how can or how should we deal with it?
Get Token -> Store in header -> Call Webservices -> Success
Call weservice -> auth expire failure -> get new Token -> call Webservice again -> Success : How to handle this?