forked from techjoomla/plg_api_users
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue techjoomla#19 feat: Add support for sign-in / sign-up using JFB…
…Connect
- Loading branch information
1 parent
ce0937b
commit 2a4e538
Showing
5 changed files
with
447 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,11 @@ | ||
; @package API | ||
; @subpackage plg_api_users | ||
; | ||
; @author Techjoomla <[email protected]> | ||
; @copyright Copyright (C) 2009 - 2019 Techjoomla, Tekdi Technologies Pvt. Ltd. All rights reserved. | ||
; @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL | ||
; Note All ini files need to be saved as UTF-8 | ||
|
||
PLG_API_USERS="API - Users" | ||
PLG_API_USERS_DESCRIPTION="This plugin exposes users to the Joomla! API. Supports creation, listing and login for users." | ||
PLG_API_USERS_BAD_REQUEST_MESSAGE="Bad request" | ||
|
@@ -15,3 +23,8 @@ PLG_API_USERS_UNSUPPORTED_METHOD_POST="unsupported method,please use get method" | |
PLG_API_USERS_USERS="users/" | ||
PLG_API_USERS_IN_DELETE="in delete" | ||
PLG_API_USERS_IN_POST="in post" | ||
|
||
; Since v2.1.0 | ||
PLG_API_USERS_JFBCONNECT_NOT_INSTALLED="JFBConnect not installed or not enabled" | ||
PLG_API_USERS_JFBCONNECT_MISSING_PROVIDER="Provider not sent" | ||
PLG_API_USERS_JFBCONNECT_MISSING_ACCESS_TOKEN="Access token not sent" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,15 @@ | ||
<?php | ||
/** | ||
* @package API plugins | ||
* @copyright Copyright (C) 2009 2014 Techjoomla, Tekdi Technologies Pvt. Ltd. All rights reserved. | ||
* @license GNU GPLv2 <http://www.gnu.org/licenses/old-licenses/gpl-2.0.html> | ||
* @link http://www.techjoomla.com | ||
*/ | ||
* @package API | ||
* @subpackage plg_api_users | ||
* | ||
* @author Techjoomla <[email protected]> | ||
* @copyright Copyright (C) 2009 - 2019 Techjoomla, Tekdi Technologies Pvt. Ltd. All rights reserved. | ||
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL | ||
*/ | ||
|
||
defined('_JEXEC') or die( 'Restricted access' ); | ||
// No direct access. | ||
defined('_JEXEC') or die('Restricted access'); | ||
|
||
jimport('joomla.plugin.plugin'); | ||
|
||
|
@@ -17,15 +20,16 @@ public function __construct(&$subject, $config = array()) | |
parent::__construct($subject, $config = array()); | ||
|
||
ApiResource::addIncludePath(dirname(__FILE__).'/users'); | ||
/*load language file for plugin frontend*/ | ||
$lang = JFactory::getLanguage(); | ||
|
||
// Load language file for plugin frontend | ||
$lang = JFactory::getLanguage(); | ||
$lang->load('plg_api_users', JPATH_ADMINISTRATOR,'',true); | ||
|
||
// Set the login resource to be public | ||
$this->setResourceAccess('login', 'public','get'); | ||
$this->setResourceAccess('users', 'public', 'post'); | ||
$this->setResourceAccess('config', 'public', 'get'); | ||
$this->setResourceAccess('user', 'public', 'post'); | ||
$this->setResourceAccess('jfbconnect', 'public', 'post'); | ||
} | ||
} |
Oops, something went wrong.