Extension:GoogleLogin/PreAuthManager/tr

GoogleLogin uzantısı, viki kullanıcılarının Google Hesapları ile giriş yapmalarına izin verir. Uzantı, kullanıcı verilerini istemek için Google API kullanır. Kullanıcı ilk kez oturum açtıysa, uzantı, Google e-posta adresi ve Google kullanıcı adı (veya verilen ad veya kendi adı) ile bir kullanıcı oluşturmaya izin verir.

Gereksinimler
Bu uzantıyı kullanmak için ihtiyacınız olan:
 * MediaWiki 1.23+ (v0.2.0 ve üzeri sürümler için en az MediaWiki 1.24'e ihtiyacınız var)
 * MySQL (şimdilik PostgreSQL veya SQLite desteği yok!)
 * PHP 5.3+
 * Google Geliştirici Erişimi
 * Google+ API erişimi
 * Web Uygulaması için API Kimlik Bilgileri (İstemci Kimliği ve İstemci Sırrı)
 * 0.3.1 sürümüne kadar olan sürüm v0.2.1, Extension GoogleAPIClient, aksi takdirde yalnızca  çalıştırın.

Yapılandırma
Uzantı, İstemci Kimliğini ve İstemci Sırrını ayarlamak için iki yapılandırma değişkeni sağlar (bu çifti Google Geliştirici Konsolu'nda alırsınız, "<" ve ">" öğesini kaldırın).

Google Geliştirici Konsolu'ndaki ayarlar
Bu uzantıyı kullanmak için bir Google geliştirici hesabına ve geliştirici konsoluna erişiminiz olması gerekir. Bu basit (çok basit!) Adım adım bir kılavuzdur (bunlarla birlikte resmi adım adım örnek Adım 1'i kullanın.):
 * 1) Google geliştirici konsolu açın
 * 2) Hizmet şartlarını okuyun ve kabul edin
 * 3) İlk projenizi oluşturun
 * 4) APIS & AUTH gidin
 * 5) APIs gidin ve Google+ API etkinleştirin (şartları oku ve kabul et)
 * 6) Credentials gidin
 * 7) OAuth bölümünde Create new Client ID tıklayın
 * 8) Web application ile APPLICATION TYPE, ile Authorized JavaScript origins alanınızı yazın (joker karakterlere ve dizine izin verilmez!)
 * 9) Aşağıdaki örnekte olduğu gibi Authorized redirect URI yazın:
 * Etki alanınız example.com ise ve etki alanınızın Köküne MediaWiki yüklediyseniz, yönlendirme URI'si aşağıdaki gibidir: http://example.com/index.php/Special:GoogleLogin
 * 1) Oluşturun ve Client ID ve Client Secret ile LocalSettings.php'deki yapılandırma değişkenlerine kopyalayın.

"Special:GoogleLoginReturn" veya (Almancada örnek) "Spezial:Mit_Google_anmelden"
The allowed redirect URI in Google developer console must be in content language. So, if your wiki has content language German, then type in "Spezial:Mit_Google_anmelden" and not "Special:GoogleLogin". If you used the wrong language, all Authentication requests will fail with redirect uri mismatch.

Debug
Normally, you can see the error message on all generic error pages. Sometimes there are Internal Errors, called Exceptions. In this case, please add with value true in LocalSettings.php to see the complete Exception message. For a support request, please provide always the lines of the Exception.

Use on a private wiki
If you have set your Wiki to private with

you have to whitelist the "Special:GoogleLogin" page, so that anonymous users can access the callback URL after being redirected from the authentication provider. You can do this by adding the following line to your LocalSettings.php:

Allow account creation only via GoogleLogin
It's possible to deactivate the account creation function of MediaWiki. Normally GoogleLogin don't give the option to create a new account, too. It's possible to change this, that Users can still create an account with GoogleLogin, but can't with the vanilla account creation form. For this you need to set up the following configuration varaibles in your : If you want to remove the Login form of MediaWiki, too, you can set this configuration variable, too: If you want to remove GoogleLogin in the future for any reason, your users can still login into your MediaWiki installation without to register a new account. GoogleLogin creates normal MediaWiki-accounts with a random password. Your users just have to reset their password with the special page Special:PasswordReset.

MobileFrontend <-> GoogleLogin conflict (only with and MediaWiki <= 1.26!)
MobileFrontend, the extension to provide a mobile optimized version of your wiki, actually conflicts with GoogleLogin if you set  to   (to disallow login with the vanilla login form). In the case, that MobileFrontend is loaded after GoogleLogin (the require_once line of MobileFrontend in your  is after the one of GoogleLogin), the special page UserLogin (which handles the login with username and password) will be overwritten by GoogleLogin the first time and by MobileFrontend the second time (to provide a mobile optimized login page). In this case, MobileFrontends Replacement will win and mobile users can still login with username and passwords.

Actually this problem is solved in the MediaWiki release branch/version 1.26 (tracked in ) of MobileFrontend. For older versions of MediaWiki/MobileFrontend you need to change the order in which the Extensions are loaded. Put the require_once and configuration lines of GoogleLogin somewhere after the ones of MobileFrontend in your. This workaround should be obsolete in one of the next versions of MobileFrontend.

What can this extension do
With the database update, the extension will create a new table called prefix_user_google_user which contains the needed connection between the wiki users and Google accounts. It stores only the Google UserId and the Wiki UserId.

If a user calls the special page GoogleLogin, they will instantly redirected to Google Authentication request to give your application access to some user information stored by Google. The user must accept this request (or they can not use the login with Google). After accepting, the user has the possibility, if they are not logged in as a wiki user, to create a new account. The username they can choose self or choose one of the suggestions, based on the Google user name and given name (if one s free and createable). If the chosen username is creatable (free, valid and not blocked), a new user with the username and the Google-Mail as e-mail-address will be created and linked to the Google Account.

If the user is logged in (means: they have already a wiki account) they can link this account with the Google account, this the user must do only once. If the connection is created, the user will be able to login simply by clicking Login with Google button on Special:Login.

If the wiki account and Google account is connected, the user can, if they navigate to "Special:GoogleLogin", unlink his account and Google account.

Google API PHP Client
This Extension uses the Google API PHP Client (included in versions before 0.2.1), distributed under the Apache 2.0 License. The Client can be downloaded from GitHub.