Skip to content

Commit

Permalink
Bugfix in extend validity
Browse files Browse the repository at this point in the history
  • Loading branch information
malaqueueit committed Oct 7, 2015
1 parent ce1b94d commit 71d2820
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 2 additions & 3 deletions QueueIT.Security/SessionValidateResultRepository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,6 @@ public override void SetValidationResult(IQueue queue, IValidateResult validatio

if (acceptedResult != null)
{
if (!expirationTime.HasValue && !ExtendValidity)
expirationTime = DateTime.UtcNow.AddMinutes(HttpContext.Current.Session.Timeout);

var key = GenerateKey(queue.CustomerId, queue.EventId);
SessionStateModel model = new SessionStateModel()
{
Expand All @@ -110,6 +107,8 @@ public override void SetValidationResult(IQueue queue, IValidateResult validatio
model.Expiration = expirationTime;
else if (acceptedResult.KnownUser.RedirectType == RedirectType.Idle)
model.Expiration = DateTime.UtcNow.Add(IdleExpiration);
else if (!ExtendValidity)
model.Expiration = DateTime.UtcNow.AddMinutes(HttpContext.Current.Session.Timeout);

HttpContext.Current.Session[key] = model;
}
Expand Down
6 changes: 6 additions & 0 deletions QueueIT.Security/SessionValidationController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ namespace QueueIT.Security
/// });
/// ]]>
/// </code>
/// <code>
/// <![CDATA[
/// //PHP
/// SessionValidationController::configure(null, function () { return new SessionValidateResultRepository(); });
/// ]]>
/// </code>
/// A thrid option is to implement a new validation result provider by implementing the IValidateResultRepository repository.
/// <br/><br/>
/// View members for additional information and examples
Expand Down

0 comments on commit 71d2820

Please sign in to comment.