Skip to content

Commit

Permalink
[STB-71] [ID-27] Change namespace to Sainsbury's
Browse files Browse the repository at this point in the history
Freeze guzzle/guzzle to 3.x
Add composer.lock
Bring in .gitignore

Signed-off-by: Daniel Macedo <[email protected]>
  • Loading branch information
dm committed May 18, 2016
1 parent 90b3753 commit 356835d
Show file tree
Hide file tree
Showing 12 changed files with 197 additions and 15 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/bin/
/build/
/vendor/
phpunit.xml
1 change: 1 addition & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
The MIT License (MIT)

Copyright (c) 2013 Bojan Zivanovic
Copyright (c) 2016 Daniel Macedo, Sainsbury's Supermarkets Ltd.

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Ways to use it:
Just set an access token and make a request.
```php
use Guzzle\Http\Client;
use CommerceGuys\Guzzle\Plugin\Oauth2\Oauth2Plugin;
use Sainsburys\Guzzle\Plugin\Oauth2\Oauth2Plugin;

$accessToken = array(
'access_token' => 'e72758a43e1646969f9f7bd7737d0cd637ed17ae',
Expand All @@ -34,9 +34,9 @@ Or use a grant type.
Optionally, add a refresh token grant type, used to refresh expired access tokens.
```php
use Guzzle\Http\Client;
use CommerceGuys\Guzzle\Plugin\Oauth2\Oauth2Plugin;
use CommerceGuys\Guzzle\Plugin\Oauth2\GrantType\PasswordCredentials;
use CommerceGuys\Guzzle\Plugin\Oauth2\GrantType\RefreshToken;
use Sainsburys\Guzzle\Plugin\Oauth2\Oauth2Plugin;
use Sainsburys\Guzzle\Plugin\Oauth2\GrantType\PasswordCredentials;
use Sainsburys\Guzzle\Plugin\Oauth2\GrantType\RefreshToken;

$oauth2Client = new Client('https://mysite.com/oauth2/token');
$config = array(
Expand Down
9 changes: 6 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"name": "commerceguys/guzzle-oauth2-plugin",
"name": "sainsburys/guzzle-oauth2-plugin",
"description": "An OAuth2 plugin for guzzle",
"license": "MIT",
"require": {
"guzzle/guzzle": ">=v3.0"
"guzzle/guzzle": "^3.0"
},
"autoload": {
"psr-0": {
"CommerceGuys\\Guzzle": "src"
"Sainsburys\\Guzzle": "src"
}
},
"authors": [
Expand All @@ -16,6 +16,9 @@
},
{
"name": "Damien Tournoud"
},
{
"name": "Daniel Macedo"
}
]
}
174 changes: 174 additions & 0 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace CommerceGuys\Guzzle\Plugin\Oauth2\GrantType;
namespace Sainsburys\Guzzle\Plugin\Oauth2\GrantType;

use Guzzle\Common\Collection;
use Guzzle\Http\ClientInterface;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace CommerceGuys\Guzzle\Plugin\Oauth2\GrantType;
namespace Sainsburys\Guzzle\Plugin\Oauth2\GrantType;

use Guzzle\Common\Collection;
use Guzzle\Http\ClientInterface;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace CommerceGuys\Guzzle\Plugin\Oauth2\GrantType;
namespace Sainsburys\Guzzle\Plugin\Oauth2\GrantType;

interface GrantTypeInterface
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace CommerceGuys\Guzzle\Plugin\Oauth2\GrantType;
namespace Sainsburys\Guzzle\Plugin\Oauth2\GrantType;

use Symfony\Component\Security\Core\SecurityContextInterface;
use HWI\Bundle\OAuthBundle\Security\Http\ResourceOwnerMap;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace CommerceGuys\Guzzle\Plugin\Oauth2\GrantType;
namespace Sainsburys\Guzzle\Plugin\Oauth2\GrantType;

use Guzzle\Common\Collection;
use Guzzle\Http\ClientInterface;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace CommerceGuys\Guzzle\Plugin\Oauth2\GrantType;
namespace Sainsburys\Guzzle\Plugin\Oauth2\GrantType;

use Guzzle\Common\Collection;
use Guzzle\Http\ClientInterface;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php

namespace CommerceGuys\Guzzle\Plugin\Oauth2;
namespace Sainsburys\Guzzle\Plugin\Oauth2;

use CommerceGuys\Guzzle\Plugin\Oauth2\GrantType\GrantTypeInterface;
use Sainsburys\Guzzle\Plugin\Oauth2\GrantType\GrantTypeInterface;
use Guzzle\Common\Event;
use Guzzle\Http\Exception\BadResponseException;
use Guzzle\Http\Message\RequestInterface;
Expand Down

0 comments on commit 356835d

Please sign in to comment.