22 Commits

Author SHA1 Message Date
Damyon Wiese
6cee96c8af MDL-58220 oauth2: obey $CFG->authpreventaccountcreation 2017-04-05 12:52:32 +08:00
Damyon Wiese
7b9f5b9986 MDL-58220 oauth2: Cleanup on user delete
Delete the linked logins for this user account when it is deleted.
2017-04-03 13:43:27 +08:00
Damyon Wiese
512e681a3b MDL-58220 oauth2: Don't login as deleted users
Also prevent sesskey error on first page of new logins.
2017-04-03 13:43:27 +08:00
Damyon Wiese
7f15866006 MDL-58220 oauth2: Use email as default username
And give better error messages.
2017-04-03 13:43:27 +08:00
Damyon Wiese
c45d4b6a73 MDL-58220 oauth2: Change $OUTPUT to $this 2017-04-03 13:43:26 +08:00
Damyon Wiese
5b0b35c096 MDL-58220 oauth2: Add is_configured to issuer
Saves repeated checks for clientid and clientsecret.
2017-04-03 13:43:25 +08:00
Damyon Wiese
5aa0f0ae48 MDl-58220 auth_oauth2: Skip upgrade for new plugin 2017-04-03 13:43:25 +08:00
Damyon Wiese
ae596d4a54 MDL-58220 auth_oauth2: Remove allow linked logins
This was already removed - I just missed some spots.
2017-04-03 13:43:25 +08:00
Damyon Wiese
bfc60d386d MDL-58220 auth_oauth: return false for non-oauth
Always return false for non-oauth logins.
2017-04-03 13:43:25 +08:00
Damyon Wiese
13b449f4a5 MDL-58220 oauth2: cibot cleanups 2017-04-03 13:43:25 +08:00
Damyon Wiese
28b592d5a6 MDL-58338 oauth2: Force email confirmation
New accounts and linking a login to an existing account MUST go through email verification.
We cannot trust the emails we get from oauth providers have been confirmed.

Part of MDL-58220
2017-04-03 13:43:25 +08:00
Damyon Wiese
c21a66e40a MDL-58220 auth_oauth2: Restrict logins to a set of domains
This is set on the issuer, so you can have different lists for each oauth2 provider.
2017-04-03 13:43:25 +08:00
Damyon Wiese
979d1f66dd MDL-58220 auth_oauth2: Fix new account creation
This was not allowing new accounts to be registered.
2017-04-03 13:41:19 +08:00
Damyon Wiese
eca128bf47 MDL-58220 oauth2: Global enable/disable for issuers. 2017-04-03 13:41:19 +08:00
Damyon Wiese
72fd103add MDL-58219 cibot: Fixes
Fixes for cibot warnings.

Part of MDL-58220
2017-04-03 13:41:19 +08:00
Damyon Wiese
28dddbc129 MDL-58219 oauth2: Show connected system account info
Show the username and email of the connected system account (if it ever requires refreshing - this will help identity the account
to re-authorise).

Part of MDL-58220
2017-04-03 13:41:18 +08:00
Damyon Wiese
1dca8d1a1d MDL-58168 auth_oauth2: Allow linking other accounts
Part of MDL-58220
2017-04-03 13:40:13 +08:00
Damyon Wiese
0e59638bdb MDL-58126 googledocs: Re-implement the google docs repo
Use latest REST API (v3) - but avoid the google client libraries
(too big, too much to update, not integrated with auth).

Part of MDL-58220
2017-04-03 13:40:13 +08:00
Damyon Wiese
299112498b MDL-58090 oauth2: Coding style
Part of MDL-58220
2017-04-03 13:40:13 +08:00
Damyon Wiese
f9f243f93e MDL-58090 oauth2: Complete phpdocs
Part of MDL-58220
2017-04-03 13:40:13 +08:00
Damyon Wiese
8445556b4c MDL-58090 oauth2: Move code from subclasses to config
Allow the behaviour of each oauth service to be customised by config instead of
subclasses.

Part of MDL-58220
2017-04-03 13:39:44 +08:00
Damyon Wiese
60237253a2 MDL-58090 oauth2: Store a list of oauth2 services
Build an admin page where OAuth 2 services can be installed and configured.

Part of MDL-58220
2017-04-03 13:39:02 +08:00