public ShadyAuthenticationToken(ClaimsPrincipal principal, ShadyAuthenticationOptions options, bool isPersistent) { Principal = principal; IsPersistent = isPersistent; IssuedUtc = DateTime.UtcNow; ExpiresUtc = DateTime.UtcNow + (isPersistent ? options.PersistentExpireTimeSpan : options.RegularExpireTimeSpan); PrincipalIssuedUtc = DateTime.UtcNow; PrincipalExpiresUtc = DateTime.UtcNow + options.PrincipalExpireTimespan; }
public OAuthService(IOptions <ShadyAuthenticationOptions> shadyOptionsAccessor) { ShadyOptions = shadyOptionsAccessor?.Value ?? new ShadyAuthenticationOptions(); }