Skip to content
This repository was archived by the owner on Apr 9, 2025. It is now read-only.
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
9 changes: 8 additions & 1 deletion Config/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,11 @@
* ));
*
*/
Configure::write('Opauth.Strategy', array());
Configure::write('Opauth.Strategy', array());

/**
* AuthComponent Class Name
* Use to allow access to Opauth methods for users of AuthComponent
* eg. for Auth $this->Auth->allow() is used
*/
Configure::write('Opauth.AuthComponent','Auth');
5 changes: 3 additions & 2 deletions Controller/OpauthController.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ class OpauthController extends OpauthAppController {

public function beforeFilter() {
// Allow access to Opauth methods for users of AuthComponent
if (is_object($this->Auth) && method_exists($this->Auth, 'allow')) {
$this->Auth->allow();
$Auth = Configure::read('Opauth.AuthComponent');
if ($Auth && is_object($this->{$Auth}) && method_exists($this->{$Auth}, 'allow')) {
$this->{$Auth}->allow();
}

//Disable Security for the plugin actions in case that Security Component is active
Expand Down