Skip to content
Snippets Groups Projects
Verified Commit b1411364 authored by Mateusz Brawański's avatar Mateusz Brawański
Browse files

Updated protobuf.

parent b0c64175
No related branches found
No related tags found
No related merge requests found
......@@ -18,7 +18,7 @@
</PropertyGroup>
<PropertyGroup>
<VersionPrefix>0.6.0</VersionPrefix>
<VersionPrefix>0.6.1</VersionPrefix>
<GeneratePackageOnBuild>False</GeneratePackageOnBuild>
<Authors>Emzi0767</Authors>
<Company>Emzi0767</Company>
......@@ -51,7 +51,7 @@
<ItemGroup>
<PackageReference Include="Emzi0767.Common" Version="2.6.6" />
<PackageReference Include="Emzi0767.Shoppl.Data.Protobuf" Version="0.4.1-ci-*" />
<PackageReference Include="Emzi0767.Shoppl.Data.Protobuf" Version="0.4.2-ci-*" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="6.0.5" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Core" Version="2.2.5" />
<PackageReference Include="Microsoft.AspNetCore.Server.Kestrel.Core" Version="2.2.0" />
......
......@@ -86,4 +86,14 @@ public sealed class TokenGenerator
this._jwtHandler.WriteToken(authenticationToken),
this._jwtHandler.WriteToken(refreshToken));
}
/// <summary>
/// Computes expiration date for a session.
/// </summary>
/// <param name="remember">Whether to remember the user (extend session validity).</param>
/// <returns>Computed timestamp of expiration.</returns>
public DateTimeOffset GetExpirationDate(bool remember)
=> DateTimeOffset.UtcNow.AddSeconds(remember
? this._configuration.RememberExpirationSeconds
: this._configuration.ExpirationSeconds);
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment