mirror of
https://code.mensbeam.com/MensBeam/Arsse.git
synced 2024-12-22 13:12:41 +00:00
Change session lifetimes to more closely match TTRSS
At least some clients seem to expect the default timeout of one day.
This commit is contained in:
parent
59fee52074
commit
ddf55e0665
4 changed files with 14 additions and 5 deletions
|
@ -135,7 +135,6 @@ We are not aware of any other extensions to the TTRSS protocol. If you know of a
|
|||
- Input that cannot be parsed as JSON normally returns a `NOT_LOGGED_IN` error; The Arsse returns a non-standard `MALFORMED_INPUT` error instead
|
||||
- Feed, category, and label names are normally unrestricted; The Arsse rejects empty strings, as well as strings composed solely of whitespace
|
||||
- Discovering multiple feeds during `subscribeToFeed` processing normally produces an error; The Arsse instead chooses the first feed it finds
|
||||
- Log-in session lifetime is intentionally shorter in The Arsse
|
||||
- Providing the `setArticleLabel` operation with an invalid label normally silently fails; The Arsse returns an `INVALID_USAGE` error instead
|
||||
- Article hashes are normally SHA1; The Arsse uses SHA256 hashes
|
||||
- Article attachments normally have unique IDs; The Arsse always gives attachments an ID of `"0"`
|
||||
|
|
|
@ -32,12 +32,12 @@ class Conf {
|
|||
public $userPreAuth = false;
|
||||
/** @var integer Desired length of temporary user passwords */
|
||||
public $userTempPasswordLength = 20;
|
||||
/** @var string Period of inactivity after which log-in sessions should be considered invalid, as an ISO 8601 duration (default: 1 hour)
|
||||
/** @var string Period of inactivity after which log-in sessions should be considered invalid, as an ISO 8601 duration (default: 24 hours)
|
||||
* @see https://en.wikipedia.org/wiki/ISO_8601#Durations */
|
||||
public $userSessionTimeout = "PT1H";
|
||||
/** @var string Maximum lifetime of log-in sessions regardless of activity, as an ISO 8601 duration (default: 24 hours);
|
||||
public $userSessionTimeout = "PT24H";
|
||||
/** @var string Maximum lifetime of log-in sessions regardless of activity, as an ISO 8601 duration (default: 7 days);
|
||||
* @see https://en.wikipedia.org/wiki/ISO_8601#Durations */
|
||||
public $userSessionLifetime = "PT24H";
|
||||
public $userSessionLifetime = "P7D";
|
||||
|
||||
/** @var string Class of the background feed update service driver in use (Forking by default) */
|
||||
public $serviceDriver = Service\Forking\Driver::class;
|
||||
|
|
|
@ -11,6 +11,11 @@ use Phake;
|
|||
|
||||
trait SeriesCleanup {
|
||||
public function setUpSeries() {
|
||||
// set up the configuration
|
||||
Arsse::$conf->import([
|
||||
'userSessionTimeout' => "PT1H",
|
||||
'userSessionLifetime' => "PT24H",
|
||||
]);
|
||||
// set up the test data
|
||||
$nowish = gmdate("Y-m-d H:i:s", strtotime("now - 1 minute"));
|
||||
$yesterday = gmdate("Y-m-d H:i:s", strtotime("now - 1 day"));
|
||||
|
|
|
@ -12,6 +12,11 @@ use Phake;
|
|||
|
||||
trait SeriesSession {
|
||||
public function setUpSeries() {
|
||||
// set up the configuration
|
||||
Arsse::$conf->import([
|
||||
'userSessionTimeout' => "PT1H",
|
||||
'userSessionLifetime' => "PT24H",
|
||||
]);
|
||||
// set up the test data
|
||||
$past = gmdate("Y-m-d H:i:s", strtotime("now - 1 minute"));
|
||||
$future = gmdate("Y-m-d H:i:s", strtotime("now + 1 minute"));
|
||||
|
|
Loading…
Reference in a new issue