An open API service indexing awesome lists of open source software.

https://github.com/tokizuoh/statice

[Finished] Implementation of session management using cookies by Go.
https://github.com/tokizuoh/statice

golang web

Last synced: about 1 month ago
JSON representation

[Finished] Implementation of session management using cookies by Go.

Awesome Lists containing this project

README

          

# statice
Implementation of session management using cookies by Go.

## Docker Version

```sh
> docker --version
Docker version 20.10.8, build 3967b7d
```

## Usage
Task: https://taskfile.dev/#/installation

### 1. Setup Docker-Container

```sh
# (= docker-compose up --build -d)
> task build

# (= docker-compose exec front go run main.go)
> task rf
```

### 2. Access `localhost:8081/login`

![](./docs/login.png)

### 3. Enter ID and password
If you submit the correct ID and password, a SessionID will be generated and redirected to `/home`. SessionID is stored in a cookie.

- ID: `test-id`
- password: `test-password`

Even if you transition to `/login` after login, if SessionID is present in the cookie, you will be redirected to `/home.`