Skip to content

Commit 2859c5d

Browse files
author
Sergio Rabellino
committed
Complete rewriting of the code and up-to-date for Google+ Deprecation
1 parent 58ed954 commit 2859c5d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+6728
-1194
lines changed

CHANGELOG.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,41 @@
11
Changelog
22
==========
33

4+
Release 3.1
5+
-----------
6+
* Adapted the google oauth2 provider to the Google+ API removal (March 2019)
7+
* Unable to add Twitter because not supported by the oauth2-client library 2.x (pls don't ask...)
8+
9+
Release 3.0
10+
-----------
11+
* Lead Mantainer change from Jerome Mouneyrac to Sergio Rabellino
12+
* Updated the League library to v2.2
13+
* Updated the providers to v2.0
14+
* REMOVED BattleNet as not supported anymore by oauth2-client library 2.x (pls don't ask...)
15+
* Unable to add Instagram because does not provide the user email via API (pls don't ask...)
16+
* Unable to add Amazon because not supported by the oauth2-client library 2.x (pls don't ask...)
17+
* Code refactoring/cleaning (moodle code guidelines)
18+
* Font update
19+
* #165 check https is working
20+
* #221 guzzle is deprecated
21+
* #110 - configure for Restrict Domains from which accounts can authenticate ( thanks to simonevr )
22+
* #110 - configure for not allow create new account ( thanks to simonevr )
23+
* Fixed missing buttons when loginhttps is enabled
24+
* Fixed unworking "enable all providers" link when loginhttps is enabled
25+
* Changed some redirect path, so take care on updating production sites that a change in oauth2 registration should be required
26+
* Now the profile picture is updated from most providers (Dropbox it's the only missing one)
27+
* If email address needs to be verified on the provider, an error is shown to the user (code cleaned)
28+
* Added method get_userinfo()
29+
* Added option for provider links style visualization
30+
31+
Release 2.4 -> 2.9
32+
-----------
33+
* never released
34+
35+
Release 2.3
36+
-----------
37+
* Facebook emergency patch
38+
439
Release 2.2
540
-----------
641
* #177 Create new button similar to socialsharekit but open source

README.md

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
**No new versions are planned starting from Moodle 3.3:** starting from Moodle 3.3, Oauth2 should be implemented in Moodle core. It will require you to upgrade to Moodle 3.3 and switch to the Oauth2 core authentication (and probably do some migration), but it is a great news as authentication is a really sensible matter and having Oauth2 plugins in core will guarantee their maintenance. So starting from Moodle 3.3 I recommend to use the new Oauth2 core plugins ((https://docs.moodle.org/dev/Better_Office_Integrations_3.3#Core_API_for_managing_Authorized_OAuth_Applications) ). Missing core providers will likely be implemented by someone and publish in Moodle.org plugin repository. There will probably be a new Oauth2 categories in the Moodle plugin repository. wait and see...
1+
2+
**Warning for Moodle 3.3 and later:** starting from Moodle 3.3, Oauth2 should be implemented in core. I suppose it likely will be a system that requires creation of individual plugins for each authentication providers. I won't be supporting this plugin starting the release of Oauth2 implementation in Moodle, so starting 3.3 (https://docs.moodle.org/dev/Better_Office_Integrations_3.3#Core_API_for_managing_Authorized_OAuth_Applications) I recommend to use new plugins using this new Moodle core system. They are likely to quickly be implemented by someone else and publish in Moodle.org plugin repository. There will probably be a new Oauth2 categories in the Moodle plugin repository.
23

34
-
45

5-
This plugin adds the "Sign-in with Google / Github / Linkedin / Windows Live" buttons on the login page. The first time the user login with a social account, a new Moodle account is created.
6+
This plugin adds the "Sign-in with Google / Facebook / Github / Linkedin / Windows Live" buttons on the login page. The first time the user login with a social account, a new Moodle account is created.
67

78
### Requirements
89
PHP 5.5
@@ -11,7 +12,7 @@ PHP 5.5
1112
1. add the plugin into /auth/googleoauth2/
1213
2. Install composer.phar: curl -sS https://getcomposer.org/installer | php
1314
3. Install the 'vendor' folder: php composer.phar install
14-
4. apply the changes listed in VENDOR CHANGES.md
15+
4. apply the changes listed in VENDOR CHANGES.md (if any)
1516
5. run the Moodle upgrade
1617
6. in the Moodle administration, enable the plugin (Admin block > Plugins > Authentication)
1718
7. in the plugin settings, follow the displayed instructions.
@@ -21,24 +22,17 @@ If you have any issues you can follow the Git chapter of my free mini-course [ho
2122

2223
### Implement your own provider (for devs)
2324
1. add your third party provider for Oauth2 client as explain in https://github.com/thephpleague/oauth2-client
24-
2. create /classes/provider/newprovidername.php and newprovidername_redirect.php. Then add the lang strings in /lang/en/auth_googleoauth2.php
25-
and add the provider name to lib.php:provider_list (if you have time you can change the function logic to automatically load the classes from the provider folder
26-
and then send me a pull request, thanks :))
27-
28-
### Use the table access token (for devs)
29-
In order to store the user access tokens, you must set the config with:
30-
set_config('saveaccesstoken', 1, 'auth/googleoauth2');
31-
32-
Then you can use them in your own plugin. The Oauth2 plugin also trigger an event on login.
33-
You can retrieve the access token from it too.
25+
2. create [PLUGIN_HOME]/classes/provider/newprovidername.php and [PLUGIN_HOME]/newprovidername_redirect.php. Then add the lang strings in /lang/en/auth_googleoauth2.php.
3426

3527
### Composer (for devs)
3628
The plugin does not include the 'vendor' folder as explained by [composer best practice](https://getcomposer.org/doc/faqs/should-i-commit-the-dependencies-in-my-vendor-directory.md).
3729
If you need to know more about composer, you can read [Composer Namespaces in 5 Minutes](https://jtreminio.com/2012/10/composer-namespaces-in-5-minutes/)
3830

39-
### Continuous integration
40-
[![Build Status](https://travis-ci.org/rabser/moodle-auth_googleoauth2.svg?branch=master)](https://travis-ci.org/rabser/moodle-auth_googleoauth2)
31+
### Continuous integration, tracker...
32+
[![Build Status](https://travis-ci.org/mouneyrac/moodle-auth_googleoauth2.svg?branch=master)](https://travis-ci.org/mouneyrac/moodle-auth_googleoauth2)
4133
[![Codacy Badge](https://www.codacy.com/project/badge/84928dc4c553414786735ba745e57c93)](https://www.codacy.com/app/jerome/moodle-auth_googleoauth2)
34+
[![bountysource](https://api.bountysource.com/badge/team?team_id=49212&style=raised)](https://www.bountysource.com/teams/oauth2-authentication-plugin-for-moodle/backers)
35+
4236

4337
### Credits
4438
* [Contributors](https://github.com/mouneyrac/auth_googleoauth2/graphs/contributors)
@@ -49,4 +43,6 @@ If you need to know more about composer, you can read [Composer Namespaces in 5
4943
* [illuminate contracts](https://github.com/illuminate/contracts)
5044
* [Symfony EventDispatcher](http://symfony.com/)
5145

46+
### +1 the plugin
47+
To like the plugin, go to the [Moodle.org repository plugin page](https://moodle.org/plugins/view/auth_googleoauth2), login and click on 'Add to my Favorites'. Find other ways to contribute on the [github plugin page](http://mouneyrac.github.io/moodle-auth_googleoauth2/).
5248

VENDOR CHANGES.md

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)