tazmaniax/securesocial — pull request #2 by tazmaniax (2014-09-27 12:54:11+00:00)
Title: issue#1: Rollup of fixes

* Expose SecureSocial.USER, SecureSocial.clearUserId() and
SecureSocial.setUserId(SocialUser) as public to allow external code to
set and remove current user. A better solution might be for the methods
clearUserId() and setUserId(SocialUser) to update the renderArgs USER
parameter accordingly.
* Updated SecureSocial.checkAccess() to store the original URL in the
flash irrespective of the state of the userId variable.
* Add null renderArgs guard in SecureSocial.getCurrentUser()
* Improve error message handling in
SecureSocial.authenticate(ProviderType)
* Improve ajax request handling by updating
UsernamePasswordProvider.doAuth(Map) to throw
AuthenticationException rather than call SecureSocial.login() and
updating SecureSocial.authenticate(ProviderType) to return bad request
for ajax requests rather than redirect to SecureSocial.login() on
exception.
* Added support for custom password matching by adding method
UserService.Service.isPasswordMatch(String, String) and updating
UsernamePasswordProvider.passwordMatches() to call this new method.
* Updated SocialUser to add firstName and lastName and to add the method
getResolvedAvatarUrl() to allow delegation to subclass.
* Updated FoursquareProvider to add firstName and lastName support.
* Updated GoogleProvider to add firstName and lastName support.
* Updated LinkedInProvider to add firstName and lastName support.
* Updated UsernamePasswordProvider to add firstName and lastName
support.
* Updated OAuth1Provider.doAuth(Map authContext) to use
Cache.safeSet(key, user, "30mn") to ensure the cache was been updated
before continuing and to expire the data after 30min.
* Add hook to add additional flow to account registration such as
acquiring an email address from the user when a particular provider does
not provide an email address, e.g. LinkedIn
* In UsernamePasswordProvider added entered 'userName' parameter to
flash so it can automatically redisplayed in the sign-in form