Skip to content
This repository was archived by the owner on Mar 23, 2024. It is now read-only.

Commit 41514f0

Browse files
committed
🛀 renamed & moved some things
1 parent 56e4ff8 commit 41514f0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+643
-625
lines changed

config/.env_example

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# https://zerossl.com/
1+
IS_CI=FALSE
22

33
# https://account.arena.net/applications
44
GW2_TOKEN=
@@ -28,12 +28,12 @@ BITLY_KEY=
2828
BITLY_SECRET=
2929
BITLY_CALLBACK_URL=
3030

31-
#
31+
# http://developers.deezer.com/myapps/
3232
DEEZER_KEY=
3333
DEEZER_SECRET=
3434
DEEZER_CALLBACK_URL=
3535

36-
#
36+
# https://www.deviantart.com/developers/apps
3737
DEVIANTART_KEY=
3838
DEVIANTART_SECRET=
3939
DEVIANTART_CALLBACK_URL=
@@ -178,7 +178,11 @@ WORDPRESS_KEY=
178178
WORDPRESS_SECRET=
179179
WORDPRESS_CALLBACK_URL=
180180

181-
#
181+
# https://developer.yahoo.com/apps/
182182
YAHOO_KEY=
183183
YAHOO_SECRET=
184184
YAHOO_CALLBACK_URL=
185+
186+
YAHOOSOCIAL_KEY=
187+
YAHOOSOCIAL_SECRET=
188+
YAHOOSOCIAL_CALLBACK_URL=

config/.env_travis

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ MYSQL_PORT=3306
33
MYSQL_DATABASE=dbtest
44
MYSQL_USERNAME=root
55
MYSQL_PASSWORD=
6+
IS_CI=TRUE

examples/OAuth1Testprovider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
namespace chillerlan\OAuthExamples;
1414

15-
use chillerlan\OAuth\Providers\OAuth1Provider;
15+
use chillerlan\OAuth\Core\OAuth1Provider;
1616

1717
/**
1818
*

examples/OAuth2Testprovider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
namespace chillerlan\OAuthExamples;
1414

15-
use chillerlan\OAuth\Providers\{
15+
use chillerlan\OAuth\Core\{
1616
ClientCredentials, CSRFToken, CSRFTokenTrait, OAuth2ClientCredentialsTrait,
1717
OAuth2Provider, OAuth2TokenRefreshTrait, TokenExpires, TokenRefresh,
1818
};

examples/oauth-example-common.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
Log, LogOptionsTrait, Output\ConsoleLog, Output\LogOutputAbstract
1818
};
1919
use chillerlan\OAuth\{
20-
OAuthOptions, Storage\SessionTokenStorage
20+
OAuthOptions, Storage\SessionStorage
2121
};
2222
use chillerlan\TinyCurl\Request;
2323
use chillerlan\Traits\{
@@ -95,6 +95,6 @@ public function request(string $url, array $params = null, string $method = null
9595
$db = new Database($options);
9696
#$db->setLogger($logger);
9797

98-
/** @var \chillerlan\OAuth\Storage\TokenStorageInterface $storage */
99-
$storage = new SessionTokenStorage($options); //new DBTokenStorage($options, $db);
98+
/** @var \chillerlan\OAuth\Storage\OAuthStorageInterface $storage */
99+
$storage = new SessionStorage($options); //new DBStorage($options, $db);
100100
#$storage->setLogger($logger);

src/Token.php renamed to src/Core/AccessToken.php

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
<?php
22
/**
3-
* Class Token
3+
* Class AccessToken
44
*
5-
* @filesource Token.php
5+
* @filesource AccessToken.php
66
* @created 09.07.2017
7-
* @package chillerlan\OAuth
7+
* @package chillerlan\OAuth\Core
88
* @author Smiley <smiley@chillerlan.net>
99
* @copyright 2017 Smiley
1010
* @license MIT
1111
*/
1212

13-
namespace chillerlan\OAuth;
13+
namespace chillerlan\OAuth\Core;
1414

1515
use chillerlan\Traits\{
1616
Container, ContainerInterface, Crypto\MemzeroDestructorTrait
@@ -31,25 +31,25 @@
3131
* @property int $expires
3232
* @property string $provider
3333
*/
34-
class Token implements ContainerInterface{
34+
class AccessToken implements ContainerInterface{
3535
use MemzeroDestructorTrait, Container{
3636
__construct as constructContainer;
3737
}
3838

3939
/**
4040
* Denotes an unknown end of life time.
4141
*/
42-
const EOL_UNKNOWN = -9001;
42+
public const EOL_UNKNOWN = -9001;
4343

4444
/**
4545
* Denotes a token which never expires
4646
*/
47-
const EOL_NEVER_EXPIRES = -9002;
47+
public const EOL_NEVER_EXPIRES = -9002;
4848

4949
/**
5050
* defines a maximum expiry period (1 year)
5151
*/
52-
const EXPIRY_MAX = 86400 * 365;
52+
public const EXPIRY_MAX = 86400 * 365;
5353

5454
/**
5555
* @var string
@@ -94,7 +94,7 @@ class Token implements ContainerInterface{
9494
protected $provider;
9595

9696
/**
97-
* Token constructor.
97+
* AccessToken constructor.
9898
*
9999
* @param array|null $properties
100100
*/
@@ -105,7 +105,7 @@ public function __construct(array $properties = null){
105105
}
106106

107107
/**
108-
* Token setter
108+
* AccessToken setter
109109
*
110110
* @param string $property
111111
* @param mixed $value
@@ -125,9 +125,9 @@ public function __set(string $property, $value){
125125
/**
126126
* @param int $expires
127127
*
128-
* @return \chillerlan\OAuth\Token
128+
* @return \chillerlan\OAuth\Core\AccessToken
129129
*/
130-
public function setExpiry(int $expires = null):Token{
130+
public function setExpiry(int $expires = null):AccessToken{
131131
$now = time();
132132

133133
if($expires!== null){

src/Providers/AccessTokenForRefresh.php renamed to src/Core/AccessTokenForRefresh.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
*
55
* @filesource AccessTokenForRefresh.php
66
* @created 29.01.2018
7-
* @package chillerlan\OAuth\Providers
7+
* @package chillerlan\OAuth\Core
88
* @author smiley <smiley@chillerlan.net>
99
* @copyright 2018 smiley
1010
* @license MIT
1111
*/
1212

13-
namespace chillerlan\OAuth\Providers;
13+
namespace chillerlan\OAuth\Core;
1414

1515
interface AccessTokenForRefresh{
1616

src/Providers/CSRFToken.php renamed to src/Core/CSRFToken.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
*
55
* @filesource CSRFToken.php
66
* @created 29.01.2018
7-
* @package chillerlan\OAuth\Providers
7+
* @package chillerlan\OAuth\Core
88
* @author smiley <smiley@chillerlan.net>
99
* @copyright 2018 smiley
1010
* @license MIT
1111
*/
1212

13-
namespace chillerlan\OAuth\Providers;
13+
namespace chillerlan\OAuth\Core;
1414

1515
interface CSRFToken{
1616

src/Providers/CSRFTokenTrait.php renamed to src/Core/CSRFTokenTrait.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,27 @@
44
*
55
* @filesource CSRFTokenTrait.php
66
* @created 17.03.2018
7-
* @package chillerlan\OAuth\Providers
7+
* @package chillerlan\OAuth\Core
88
* @author smiley <smiley@chillerlan.net>
99
* @copyright 2018 smiley
1010
* @license MIT
1111
*/
1212

13-
namespace chillerlan\OAuth\Providers;
13+
namespace chillerlan\OAuth\Core;
1414

1515
/**
16-
* @implements chillerlan\OAuth\Providers\CSRFToken
16+
* @implements chillerlan\OAuth\Core\CSRFToken
1717
*
18-
* @property string $serviceName
19-
* @property \chillerlan\OAuth\Storage\TokenStorageInterface $storage
18+
* @property string $serviceName
19+
* @property \chillerlan\OAuth\Storage\OAuthStorageInterface $storage
2020
*/
2121
trait CSRFTokenTrait{
2222

2323
/**
2424
* @param string|null $state
2525
*
26-
* @return \chillerlan\OAuth\Providers\OAuth2Interface
27-
* @throws \chillerlan\OAuth\Providers\ProviderException
26+
* @return \chillerlan\OAuth\Core\OAuth2Interface
27+
* @throws \chillerlan\OAuth\Core\ProviderException
2828
*/
2929
protected function checkState(string $state = null):OAuth2Interface{
3030

src/Providers/ClientCredentials.php renamed to src/Core/ClientCredentials.php

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,21 @@
44
*
55
* @filesource ClientCredentials.php
66
* @created 29.01.2018
7-
* @package chillerlan\OAuth\Providers
7+
* @package chillerlan\OAuth\Core
88
* @author smiley <smiley@chillerlan.net>
99
* @copyright 2018 smiley
1010
* @license MIT
1111
*/
1212

13-
namespace chillerlan\OAuth\Providers;
14-
15-
use chillerlan\OAuth\Token;
13+
namespace chillerlan\OAuth\Core;
1614

1715
interface ClientCredentials{
1816

1917
/**
2018
* @param array $scopes
2119
*
22-
* @return \chillerlan\OAuth\Token
20+
* @return \chillerlan\OAuth\Core\AccessToken
2321
*/
24-
public function getClientCredentialsToken(array $scopes = null):Token;
22+
public function getClientCredentialsToken(array $scopes = null):AccessToken;
2523

2624
}

0 commit comments

Comments
 (0)