Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 5.0.6 #218

Merged
merged 4 commits into from
Nov 24, 2017
Merged
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: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Change Log

## [5.0.6](https://github.com/auth0/auth0-PHP/tree/5.0.4) (2017-11-24)
[Full Changelog](https://github.com/auth0/auth0-PHP/compare/5.0.4...5.0.6)

**Added**
- Add support for the new users by email API [\#213](https://github.com/auth0/auth0-PHP/pull/213) ([erichard](https://github.com/erichard))

**Fixed**
- Fixes build [\#211](https://github.com/auth0/auth0-PHP/pull/211) ([aknosis](https://github.com/aknosis))

## [5.0.4](https://github.com/auth0/auth0-PHP/tree/5.0.4) (2017-06-26)
[Full Changelog](https://github.com/auth0/auth0-PHP/compare/5.0.0...5.0.4)

Expand Down
2 changes: 2 additions & 0 deletions src/API/Management.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
use Auth0\SDK\API\Management\Tickets;
use Auth0\SDK\API\Management\UserBlocks;
use Auth0\SDK\API\Management\Users;
use Auth0\SDK\API\Management\UsersByEmail;

use Auth0\SDK\API\Helpers\ApiClient;
use Auth0\SDK\API\Header\Authorization\AuthorizationBearer;
Expand Down Expand Up @@ -146,6 +147,7 @@ public function __construct($token, $domain, $guzzleOptions = []) {
$this->tickets = new Tickets($this->apiClient);
$this->userBlocks = new UserBlocks($this->apiClient);
$this->users = new Users($this->apiClient);
$this->usersByEmail = new UsersByEmail($this->apiClient);
}

protected function setApiClient() {
Expand Down
18 changes: 18 additions & 0 deletions src/API/Management/UsersByEmail.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?php

namespace Auth0\SDK\API\Management;

class UsersByEmail extends GenericResource
{
public function get($params = array())
{
$client = $this->apiClient->get()
->addPath('users-by-email');

foreach ($params as $param => $value) {
$client->withParam($param, $value);
}

return $client->call();
}
}
4 changes: 2 additions & 2 deletions tests/API/Management/AuthApiTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ public function testAuthorizeWithRO() {
$this->assertArrayHasKey('email', $userinfo);
$this->assertArrayHasKey('email_verified', $userinfo);
$this->assertArrayHasKey('user_id', $userinfo);
$this->assertEquals('auth@test.com', $userinfo['email']);
$this->assertEquals('auth0|57e293c6247600bf0ba47fc2', $userinfo['user_id']);
$this->assertEquals('german@auth0.com', $userinfo['email']);
$this->assertEquals('auth0|58adc60b82b0ca0774643eef', $userinfo['user_id']);
}

public function testOauthToken() {
Expand Down