-
Notifications
You must be signed in to change notification settings - Fork 109
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from stevenmaguire/add-psr2-compliance
Add psr2 compliance
- Loading branch information
Showing
3 changed files
with
118 additions
and
60 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
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
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,18 +1,35 @@ | ||
<?php | ||
|
||
namespace TheNetworg\OAuth2\Client\Provider; | ||
|
||
use League\OAuth2\Client\Provider\ResourceOwnerInterface; | ||
|
||
class AzureResourceOwner implements ResourceOwnerInterface | ||
{ | ||
/** | ||
* Response payload | ||
* | ||
* @var array | ||
*/ | ||
protected $response; | ||
|
||
public function __construct($response = []) { | ||
/** | ||
* Creates new azure resource owner. | ||
* | ||
* @param array $response | ||
*/ | ||
public function __construct($response = []) | ||
{ | ||
$this->response = $response; | ||
} | ||
|
||
public function getId() { | ||
|
||
/** | ||
* Retrieves id of azure resource owner. | ||
* | ||
* @return string|null | ||
*/ | ||
public function getId() | ||
{ | ||
return $this->response['objectId'] ?: null; | ||
} | ||
} | ||
|