Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vedmaka/mediawiki-opauth
Opauth integration module for Mediawiki engine
https://github.com/vedmaka/mediawiki-opauth
authentication mediawiki mediawiki-extension opauth php social-login
Last synced: 1 day ago
JSON representation
Opauth integration module for Mediawiki engine
- Host: GitHub
- URL: https://github.com/vedmaka/mediawiki-opauth
- Owner: vedmaka
- Created: 2015-08-22T20:16:23.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-04-02T15:27:06.000Z (over 7 years ago)
- Last Synced: 2024-11-06T15:56:08.466Z (about 2 months ago)
- Topics: authentication, mediawiki, mediawiki-extension, opauth, php, social-login
- Language: PHP
- Size: 13.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Mediawiki-Opauth
Opauth integration module for Mediawiki engine.
This extension integrates Opauth with 4 predefined strategies ( Facebook, Google, LinkedIn and Twitter ).
It provides Special Page entrypoint & endpoint for authentication handling via Opaith library and provides hook for external handling.# Installation
1. Put **Opauth** folder into **extensions** folder
2. Add these lines into **LocalSettings.php**:
```php
require_once "$IP/extensions/Opauth/Opauth.php";
$wgOpauthConfig['security_salt'] = 'YOUR_RANDOM_SALT_STRING';
$wgOpauthConfig['Strategy'] = array('Facebook' => array(
'app_id' => 'YOUR_APP_ID',
'app_secret' => 'YOUR_APP_SECRET',
'scope' => 'public_profile,email'
),'Google' => array(
'client_id' => 'YOUR_APP_ID',
'client_secret' => 'YOUR_APP_SECRET'
),'Twitter' => array(
'key' => 'YOUR_APP_ID',
'secret' => 'YOUR_APP_SECRET'
),'LinkedIn' => array(
'api_key' => 'YOUR_APP_ID',
'secret_key' => 'YOUR_APP_SECRET'
));
```
3. For more configuration information please see https://github.com/opauth/opauth
5. Use code below to fetch social-auth url:
```php
OpauthHelper::getLoginLink('facebook'); // where 'facebook' is provider name
```
4. Create your own extension which listen **OpauthUserAuthorized** hook. This hook will be called with parameters listed below in sample callback function:
```php
public static function onOpauthUserAuthorized( $provider, $uid, $info, $raw ) { ... }
```