private void AppendStateCookie(AuthenticationProperties properties) { var state = new BankIdState(properties); var cookieOptions = Options.StateCookie.Build(Context, Clock.UtcNow); var cookieValue = Options.StateDataFormat.Protect(state); Response.Cookies.Append(Options.StateCookie.Name, cookieValue, cookieOptions); }
private void AppendStateCookie(AuthenticationProperties properties) { if (Options.StateDataFormat == null) { throw new ArgumentNullException(nameof(Options.StateDataFormat)); } var state = new BankIdState(properties); var cookieOptions = Options.StateCookie.Build(Context, Clock.UtcNow); var cookieValue = Options.StateDataFormat.Protect(state); Response.Cookies.Append(Options.StateCookie.Name, cookieValue, cookieOptions); }