Squashed commit of the following:

commit f6aac22782c27575b602d1eb4c0784553dd6bde2
Author: Bahy Mohammed <bahymohammed@gmail.com>
Date:   Sun Sep 1 03:14:30 2013 +0200

    Squashed commit of the following:

    commit 8f1db508a87847fd3465a7dfcbda4f0240c21f9c
    Author: Bahy Mohammed <bahymohammed@gmail.com>
    Date:   Wed Aug 28 12:11:28 2013 +0200

        Added Remember Me feature

    commit bb980e0ce3076c27f21048629fc8ecd75a067b73
    Author: Bahy Mohammed <bahymohammed@gmail.com>
    Date:   Wed Aug 21 22:12:35 2013 +0200

        Added Remember Me feature

    commit 7237a12a8d22dcfee1bad9310a85b117d3a1f54e
    Author: Bahy Mohammed <bahymohammed@gmail.com>
    Date:   Wed Aug 21 13:57:03 2013 +0200

        Added Remember Me feature

    commit 121d022ebfce7f059788d09fca6bd9d9e666c9a1
    Author: Jorge <jaliss@example.com>
    Date:   Wed May 8 14:50:36 2013 -0700

        updated change log

    commit 8c7261a5333f8c2ca54c602699bdaa5fe1eeda1d
    Merge: 2445d14 7b152bd
    Author: Jorge <jaliss@gmail.com>
    Date:   Wed May 8 14:48:37 2013 -0700

        Merge pull request #186 from magro/157_redirect-to-referer-on-login

        On login/signUp redirect to the referer of the first signup/login reques

    commit 2445d144f180b09e419479e0cd35091974a75a02
    Author: Jorge <jaliss@example.com>
    Date:   Wed May 8 14:07:27 2013 -0700

        updated change log

    commit 71113a09447d1c8bae502e31bb48e8a62229fa31
    Merge: d0a47a9 229cbfc
    Author: Jorge <jaliss@gmail.com>
    Date:   Wed May 8 14:04:36 2013 -0700

        Merge pull request #189 from fedefrappi/patch-1

        Facebook login error when using the publish_stream scope

    commit d0a47a90165d20be3f45bb5c5a840ed10365b1ea
    Merge: 7b375a5 e3be9cb
    Author: Jorge <jaliss@gmail.com>
    Date:   Wed May 8 11:57:37 2013 -0700

        Merge pull request #212 from wsargent/fix-password-length

        Change the default password validator length to 8, matching the scaladoc.

    commit e3be9cb0b7a06d1325938daf4fa75a0b644b6bcd
    Author: wsargent <will.sargent@gmail.com>
    Date:   Fri Mar 29 21:52:11 2013 -0700

        Change the default password validator length to 8, matching the scaladoc.

    commit 7b375a53ae24974b5a95b402bc072fe4e300ea6c
    Merge: 6bc0678 99ee8c4
    Author: Jorge <jaliss@gmail.com>
    Date:   Wed May 8 09:34:26 2013 -0700

        Merge pull request #182 from magro/fix-event-listeners-leak

        Fix ClassCastException on application reload (dev mode) when using Events

    commit 6bc0678e6f8afd29c581be34918a7d82b5e4e041
    Merge: 13134e3 aab0947
    Author: Jorge <jaliss@gmail.com>
    Date:   Wed May 8 09:21:26 2013 -0700

        Merge pull request #177 from magro/use-ssl-for-login-page

        Support redirects to /login (triggered by SecuredAction) to use SSL

    commit 13134e3c796faa9752583d9fdb56895f703f7a26
    Merge: 76211ce 8a5844f
    Author: Jorge <jaliss@gmail.com>
    Date:   Wed May 8 09:08:20 2013 -0700

        Merge pull request #185 from chazmcgarvey/google-optional-userinfo

        do not prevent login on missing google profile info

    commit 76211ce9c648cf7290e60e8ac0761d8bbdc2f5d9
    Author: Jorge <jaliss@example.com>
    Date:   Wed May 8 08:55:33 2013 -0700

        updated change log

    commit 229cbfc5fbd04df3d2ef258e62395e08507992fd
    Author: Federico Frappi <federico.frappi@gmail.com>
    Date:   Fri Mar 22 17:45:47 2013 +0100

        Facebook login error when using the publish_stream scope

        I was using the "email,manage_pages,publish_stream" scope and the facebook auth failed on the second login attempt because of the absence of the "expires" parameter on the token response.
        This should fix the issue.
        Thank you for the great library!

    commit 7b152bdd587f9dbc3266e3c3b9311f8ba84445c9
    Author: Martin Grotzke <martin.grotzke@googlemail.com>
    Date:   Fri Mar 15 15:18:20 2013 +0100

        On login/signUp redirect to the referer of the first signup/login request.

        The referer is saved as original url when the login or signup page is
        hit. If there's already an original url saved in the session, this is
        not changed (e.g. the user might go to the login page, navigate to
        signup and back again to login, then we want to keep the referer of the
        first login request). To keep the request scheme/protocol, not the full
        referer (including e.g. "http") is saved, but only the path and query
        string. Otherwise, the user might be redirected from https back to
        http and loose it's session (would not be logged in on http).

        This changes the previous behaviour which used the onLoginGoTo property
        to redirect the user to on login. This is now only used when no referer
        was available.
        If s.o. complains about this change one might change the behaviour so
        that the referer is only used if no onLoginGoTo is configured.

        Closes issue #157

    commit aab0947b2ba2dfebee05cb525b69208f067f74df
    Author: Martin Grotzke <martin.grotzke@googlemail.com>
    Date:   Fri Mar 15 12:01:01 2013 +0100

        Use ssl property to determine, if redirects to login shall switch to ssl.

    commit 8a5844fc561414d81dbb7e611e6077ace69b255d
    Author: Charles McGarvey <chazmcgarvey@brokenzipper.com>
    Date:   Wed Mar 13 18:40:25 2013 -0600

        do not prevent login on missing google profile info

        The documentation[1] does not seem to mention it, but at least given_name and
        family_name are sometimes not supplied by the userinfo endpoint.

        [1] https://developers.google.com/accounts/docs/OAuth2Login#userinfocall

    commit 99ee8c4e2ba0299da02ab4fb1d7d2cc094f8a588
    Author: Martin Grotzke <martin.grotzke@googlemail.com>
    Date:   Mon Mar 11 12:17:35 2013 +0100

        Fix ClassCastException on reload when using Events

        During development we're seeing ClassCastExceptions like the following
        when the application got reloaded (due to some change) and our EventListener
        casts the Identity retrieved from event.user() to our CustomUser class:

        2013-03-11 12:08:44,701 [error]  application
        Unable to log user in. An exception was thrown
        java.lang.ClassCastException: model.MyUser cannot be cast to model.MyUser
                at controllers.SecureSocialEventListener.onEvent(SecureSocialEventListener.java:48) ~[classes/:2.1.0]
                at securesocial.core.Events$.doFire(Events.scala:94) ~[securesocial_2.10-master-SNAPSHOT.jar:master-SNAPSHOT]
                at securesocial.core.Events$.fire(Events.scala:100) ~[securesocial_2.10-master-SNAPSHOT.jar:master-SNAPSHOT]

        This happens because an outdated instance of the EventListener receives
        the call - the old instance is still kept in Events.listeners (verified via
        debugging/logging in our event listener).

        To fix this, the listeners are now retrieved from the Registry on each
        Events.fire, so that the actually registered listeners are notified.

    commit 6cfaadf8a1a5d188b20588671f94881ca451c47f
    Author: Martin Grotzke <martin.grotzke@googlemail.com>
    Date:   Tue Mar 5 23:20:09 2013 +0100

        Support redirects to /login (triggered by SecuredAction) to use SSL

        The ssl setting is used for the form action of the login page, and in
        some other places. It might also be desirable to serve the login page
        already using ssl (just to show users that they're already using ssl
        and thus the login should also be secure).

        Direct links to the login page are under the control of the application
        and can be set accordingly. SecuredActions also redirect to the login
        page, in the case of missing authentication, and in such a case it should
        also be possible to switch/redirect to ssl.

        This commit adds a new configuration property 'useSSLForLoginPage'
        that is evaluated by SecureAction handlers (both scala and java). This
        property can be seen as an extension of 'ssl', because it's an additional
        requirement. Because of this, redirections to ssl are only done if
        both ssl and useSSLForLoginPage are set to true.

commit a4d4c0cd301e457540f3e8613de11bb87360e4eb
Merge: 6f0ff34 1c78f19
Author: Jorge <jaliss@gmail.com>
Date:   Wed May 8 08:53:20 2013 -0700

    Merge pull request #204 from thesmith/master

    Foursquare avatars can be None and cause NoSuchElementException in FoursquareProvider

commit 1c78f1928e7a65e28891d8f5ad0663e07fe9d8b8
Author: Ben Smith <ben@thesmith.co.uk>
Date:   Wed Apr 24 00:46:59 2013 +0200

    fixing .get on possible Nones in FoursquareProvider

commit 6f0ff343e1647005eedfd52e264dc1c406e05b5d
Author: Jorge <jaliss@example.com>
Date:   Mon Mar 4 09:04:10 2013 -0300

    Moved RequestWithUser outside the SecureSocial controller

commit ea4e08bb3f7f9e46e7093ba36996db148ae2e1e5
Author: jorge <jaliss@gmail.com>
Date:   Tue Feb 26 21:18:47 2013 -0300

    updated change log

commit 2bb68c2bbb52e0bf4ad564cc8ce583ddef8eb18c
Merge: 9ef19a9 cbda5e8
Author: Jorge <jaliss@gmail.com>
Date:   Tue Feb 26 16:16:29 2013 -0800

    Merge pull request #160 from magro/overridable-registration-step-targets

    Allow overriding Registration step redirect targets.

commit cbda5e8de0547a253cb7ad70466eeeb0a5a5c5ab
Author: Martin Grotzke <martin.grotzke@googlemail.com>
Date:   Wed Feb 27 00:16:32 2013 +0100

    Change property names for registration redirect targets.

commit d56791925a2f6ad55144f6701ece453b0df3c908
Author: Martin Grotzke <martin.grotzke@googlemail.com>
Date:   Sat Feb 23 21:33:30 2013 +0100

    Update documentation for configuration of registration redirect targets.

commit b4ebc52f05e2c42f8ffff04ac46be1d158136c3f
Author: Martin Grotzke <martin.grotzke@googlemail.com>
Date:   Sat Feb 23 21:21:52 2013 +0100

    Allow overriding Registration step redirect targets.

    Registration actions like handleStartSignUp etc. redirected to login,
    which is not always desirable. To allow users to change this
    several properties are introduced (that can be omitted):
    * onHandleStartSignUpGoTo
    * onHandleSignUpGoTo
    * onHandleStartResetPasswordGoTo
    * onHandleResetPasswordGoTo

    In securesocial/defaults.conf these are set to "/login", but this
    could also be left out (if a property is not set it's set to
    login either).

    The properties based approach is chosen because there are already
    an onLoginGoTo and onLogoutGoTo properties.

commit 9ef19a93ad584b426eb0dc0f0a36fb6b252d4af0
Merge: 007d768 78e3a28
Author: Jorge <jaliss@gmail.com>
Date:   Tue Feb 26 16:01:40 2013 -0800

    Merge pull request #161 from magro/add-email-to-handleStartSignUp-flash

    Add the email to the flash messages in Registration.handleStartSignUp

commit 007d7687c62a8d70795574b75d949834cf8bc021
Merge: 497190f d11224f
Author: Jorge <jaliss@gmail.com>
Date:   Tue Feb 26 16:01:27 2013 -0800

    Merge pull request #162 from magro/plain-text-html-and-multipart-emails

    Add support for plain text, html and multipart emails in TemplatesPlugin

commit 497190fbb99367ded352e8b006a7dca17ddf71d0
Author: jorge <jaliss@gmail.com>
Date:   Mon Feb 25 14:56:49 2013 -0300

    updated docs

commit 57430a37716d2fb3fc3045aa6bcaa965cf898df0
Author: jorge <jaliss@gmail.com>
Date:   Mon Feb 25 14:50:59 2013 -0300

    update version in docs

commit f4c7b415013b0b7f7af70bd232721b6d4ac71448
Author: jorge <jaliss@gmail.com>
Date:   Mon Feb 25 12:39:36 2013 -0300

    updated change log

commit 657728ad25cdb1889e337a34f655e380f92e41c9
Author: jorge <jaliss@gmail.com>
Date:   Mon Feb 25 12:17:03 2013 -0300

    - clean securesocial values after login from the session
    - renamed keys used in session

commit 7f3b7bab829e045d1c171d7c45c7dc6efb18f741
Author: jorge <jaliss@gmail.com>
Date:   Mon Feb 25 10:55:27 2013 -0300

    - Added a makeTransient property for the authenticator cookie.
    - Fixed: absolute timeout was not being picked up from the conf file

commit d11224f4fe1ad7dd18b0bddd7f718ebec5065af8
Author: Martin Grotzke <martin.grotzke@googlemail.com>
Date:   Sat Feb 23 15:20:34 2013 +0100

    Update documentation for TemplatesPlugin text/html/multipart support.

commit d5520fcc922a239e56aa55932e921d52008d4ab0
Author: Martin Grotzke <martin.grotzke@googlemail.com>
Date:   Sat Feb 23 15:12:32 2013 +0100

    Add support for plain text, only html and multipart emails.

    The templates plugin already allows to return customized content
    for the emails. Though, the email content is already sent as content
    type html.
    This improves it to allow sending only text, only html or multipart
    emails. The templates plugin now returns a tuple of Option[Txt] and
    Option[Html], so that clients can choose which parts they want to
    provide. As the mailer plugin handles null or empty content gracefully
    we can reduce None simply to null or an empty string (the latter is chosen
    because the mailer plugin also passes an empty string if a part shall
    be omitted).

commit 78e3a2819a83bce19025df798cf2b8adb5981d23
Author: Martin Grotzke <martin.grotzke@googlemail.com>
Date:   Sat Feb 23 14:11:58 2013 +0100

    Add the email to the flash messages in Registration.handleStartSignUp

    This is done so that the email address that the user shall check can
    be displayed in the target page / template.
Added Remember Me feature