Git commits in Moodle 2.1.3 by Jerome Mouneyrac

commit 375c26deb32a6d7843dd70d22ff39022d09f78d1
Author: Jerome Mouneyrac <jerome@moodle.com>
Date:   Fri, 11 Nov 2011 15:07:18 +0800
Tag:    v2.1.3

MDL-28629 more checks during web service authentication

commit 500ba8b11e17adcb477e152a644bf322779fda94
Author: Jerome Mouneyrac <jerome@moodle.com>
Date:   Wed, 02 Nov 2011 09:38:02 +0800
Tag:    v2.1.3

MDL-30043 token.php should not return a mix of EXTERNAL_TOKEN_PERMANENT and EXTERNAL_TOKEN_EMBEDDED

commit fae4f8f1b916acb755a1f7754c3cc23ad5d95e40
Author: Jerome Mouneyrac <jerome@moodle.com>
Date:   Mon, 31 Oct 2011 10:57:06 +0800
Tag:    v2.1.3

MDL-29931 remove unneeded join and selects

commit 0d7773c0984aca797a466d9f0588cef869fa220b
Author: Jerome Mouneyrac <jerome@moodle.com>
Date:   Tue, 25 Oct 2011 11:17:18 +0800
Tag:    v2.1.3

MDL-29716 Make token more flexible to support third party client - also fix issue with some code not matching the way the server authenticate/authorize token, missing iprestriction/validuntil for restricted users (there are iprestriction/validiuntil on token and on restricted user). Also add missing check when the user is not listed in the authorised list.