SecureSessionVault 1.0.0

dotnet add package SecureSessionVault --version 1.0.0
                    
NuGet\Install-Package SecureSessionVault -Version 1.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="SecureSessionVault" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="SecureSessionVault" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="SecureSessionVault" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add SecureSessionVault --version 1.0.0
                    
#r "nuget: SecureSessionVault, 1.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#addin nuget:?package=SecureSessionVault&version=1.0.0
                    
Install SecureSessionVault as a Cake Addin
#tool nuget:?package=SecureSessionVault&version=1.0.0
                    
Install SecureSessionVault as a Cake Tool

SecureSessionVault (.NET)

A plug-and-play .NET package for securely storing and retrieving session data via HTTP using efetch and ethernmyth/secure-session-vault from docker. Requires zero boilerplate in consuming apps.

NuGet Version NuGet Downloads

Features

  • Static access: SecureSession.GetItem("key")
  • Uses efetch to persist session to remote API
  • Configurable via appsettings.json

Installation

Install via NuGet Package Manager:

Install-Package SecureSessionVault

Or via .NET CLI:

dotnet add package SecureSessionVault

Important Notes

  • This package is designed to work with the ethernmyth/secure-session-vault Docker image. You must have this image running to use the package.

  • Follow the instructions below to set up the Docker image and container.

  • Run the backend using Docker, the backend is available on docker hub at Docker Hub:

docker run -p 17000:17000 ethernmyth/secure-session-vault:latest

Or include it in your Docker Compose setup with:

services:
  vault:
    image: ethernmyth/secure-session-vault:latest
    ports:
      - "17000:17000"

Configuration

{
    "Efetch": {
        "BaseUrl": "http://localhost:17000",
        "DefaultHeaders": {
          "Authorization": null,
          "Accept": "application/json"
        },
        "RetryCount": 3
    }
}

Usage

Program.cs
-----------------

using SecureSessionVault.Extensions;

builder.Services.AddSecureSessionVault(builder.Configuration);

SampleController.cs
------------------

using Microsoft.AspNetCore.Mvc;
using SecureSessionVault.Static;

namespace SecureSessionVault.Test.Controllers
{
    [Route("api/[controller]")]
    [ApiController]
    public class SampleController : ControllerBase
    {
        [HttpGet("{key}")]
        public async Task<IActionResult> Get(string key)
        {
            var value = await SecureSession.GetItem(key);
            return Ok(value);
        }

        [HttpPost("{key}/{value}")]
        public async Task<IActionResult> Post(string key, string value)
        {
            var results = await SecureSession.SetItem(key, value);
            return Ok(results);
        }

        [HttpDelete("{key}")]
        public async Task<IActionResult> Delete(string key)
        {
            var results = await SecureSession.DeleteItem(key);
            return Ok(results);
        }
    }
}

Author

Created and Maintained by: Ethern-Myth


Give a like to this project, Thanks.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.0 56 5/24/2025