Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions extensions/components/com_redcore/admin/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,16 @@
<option value="1">JYES</option>
<option value="0">JNO</option>
</field>
<field
name="oauth2_joomla_logout_right_after_authorize"
class="btn-group"
type="radio"
default="0"
label="COM_REDCORE_CONFIG_OAUTH2_JOOMLA_LOGOUT_RIGHT_AFTER_AUTHORIZE"
description="COM_REDCORE_CONFIG_OAUTH2_JOOMLA_LOGOUT_RIGHT_AFTER_AUTHORIZE_DESC">
<option value="1">JYES</option>
<option value="0">JNO</option>
</field>
</fieldset>
<fieldset name="REDCORE_PAYMENT_API_OPTIONS"
addfieldpath="/libraries/redcore/form/fields"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -542,3 +542,5 @@ COM_REDCORE_PAYMENT_REFUND_PAYMENT_FAILED="Refund payment failed: %s"
COM_REDCORE_PAYMENT_DELETE_PAYMENT="Delete payment from gateway"
COM_REDCORE_PAYMENT_DELETE_PAYMENT_SUCCESS="Delete payment from gateway success"
COM_REDCORE_PAYMENT_DELETE_PAYMENT_FAILED="Delete payment from gateway failed: %s"
COM_REDCORE_CONFIG_OAUTH2_JOOMLA_LOGOUT_RIGHT_AFTER_AUTHORIZE="Joomla logout after authorize"
COM_REDCORE_CONFIG_OAUTH2_JOOMLA_LOGOUT_RIGHT_AFTER_AUTHORIZE_DESC="Let to not remember Joomla user next time client executes authorize"
5 changes: 5 additions & 0 deletions extensions/libraries/redcore/api/oauth2/oauth2.php
Original file line number Diff line number Diff line change
Expand Up @@ -500,6 +500,11 @@ public function apiAuthorize()

$this->response = $response;

if (RBootstrap::getConfig('oauth2_joomla_logout_right_after_authorize', false))
{
JFactory::getApplication()->logout($user->id);
}

return $this;
}

Expand Down