rodriguelegall/ngBonita — pull request #4 by astik (2014-09-26 14:44:21+00:00)
Title: Bonita config

bonitaConfig will hold all configuration relative to Bonita.
bonitaAuthentication is only in charge of login and logout, better separation of concerns.
Also, bonitaConfig is created through a provider, that means we can add configurable method to it and configure it at config phase (before injection gets done basically).
The cookies service is not the best location to stores data, with bonitaConfig, userId and userName are at a better place as they don't need to be served with each http calls (right now, $cookies management has been moved to bonitaConfig, but if it is not needed, it should be removed). If we need persistence for those values but don't necessarily need to be in a cookie, we can use localStorage for example.