Skip to content

Commit

Permalink
Merge pull request #167 from thephpleague/microsoft-oauth-endpoints
Browse files Browse the repository at this point in the history
Updating authorize and token URLs for MSFT, according to #146
  • Loading branch information
ramsey committed Dec 3, 2014
2 parents b835827 + f202e42 commit 6629d50
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/Provider/Microsoft.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ class Microsoft extends AbstractProvider

public function urlAuthorize()
{
return 'https://oauth.live.com/authorize';
return 'https://login.live.com/oauth20_authorize.srf';
}

public function urlAccessToken()
{
return 'https://oauth.live.com/token';
return 'https://login.live.com/oauth20_token.srf';
}

public function urlUserDetails(AccessToken $token)
Expand Down
10 changes: 9 additions & 1 deletion test/src/Provider/MicrosoftTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,20 @@ public function testAuthorizationUrl()
$this->assertNotNull($this->provider->state);
}

public function testUrlAuthorize()
{
$url = $this->provider->urlAuthorize();
$uri = parse_url($url);

$this->assertEquals('/oauth20_authorize.srf', $uri['path']);
}

public function testUrlAccessToken()
{
$url = $this->provider->urlAccessToken();
$uri = parse_url($url);

$this->assertEquals('/token', $uri['path']);
$this->assertEquals('/oauth20_token.srf', $uri['path']);
}

public function testGetAccessToken()
Expand Down

0 comments on commit 6629d50

Please sign in to comment.