Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c3a663d

Browse files
author
Dave Rochwerger
committed
Fixed invalid default lifetimes
1 parent a6f81f5 commit c3a663d

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

lib/OAuth2.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,9 @@ class OAuth2 {
6363
* @var int
6464
* @see OAuth2::setDefaultOptions()
6565
*/
66-
const DEFAULT_ACCESS_TOKEN_LIFETIME = 3600;
67-
const DEFAULT_REFRESH_TOKEN_LIFETIME = 30;
68-
const DEFAULT_AUTH_CODE_LIFETIME = 1209600;
66+
const DEFAULT_ACCESS_TOKEN_LIFETIME = 3600;
67+
const DEFAULT_REFRESH_TOKEN_LIFETIME = 1209600;
68+
const DEFAULT_AUTH_CODE_LIFETIME = 30;
6969
const DEFAULT_WWW_REALM = 'Service';
7070

7171
/**
@@ -332,7 +332,7 @@ class OAuth2 {
332332
*/
333333
public function __construct(IOAuth2Storage $storage, $config = array()) {
334334
$this->storage = $storage;
335-
335+
336336
// Configuration options
337337
$this->setDefaultOptions();
338338
foreach ($config as $name => $value) {
@@ -355,7 +355,7 @@ protected function setDefaultOptions() {
355355
self::RESPONSE_TYPE_CODE_AND_TOKEN
356356
),
357357
// This is expected to be passed in on construction. Scopes can be an aribitrary string.
358-
self::CONFIG_SUPPORTED_SCOPES => array()
358+
self::CONFIG_SUPPORTED_SCOPES => array()
359359
);
360360
}
361361

@@ -371,8 +371,8 @@ protected function setDefaultOptions() {
371371
* The value of the variable.
372372
*/
373373
public function getVariable($name, $default = NULL) {
374-
$name = strtolower($name);
375-
374+
$name = strtolower($name);
375+
376376
return isset($this->conf[$name]) ? $this->conf[$name] : $default;
377377
}
378378

0 commit comments

Comments
 (0)