https://github.com/vahdet/go-refresh-token-store-redis
A generic refresh token store docker image source code
https://github.com/vahdet/go-refresh-token-store-redis
docker-image go grpc redis refresh-token
Last synced: 5 months ago
JSON representation
A generic refresh token store docker image source code
- Host: GitHub
- URL: https://github.com/vahdet/go-refresh-token-store-redis
- Owner: vahdet
- License: mit
- Created: 2018-02-24T19:04:28.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-03-18T21:47:17.000Z (over 8 years ago)
- Last Synced: 2025-12-20T03:12:27.542Z (7 months ago)
- Topics: docker-image, go, grpc, redis, refresh-token
- Language: Go
- Homepage:
- Size: 3.06 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# go-refresh-token-store
This module manages the storage of the **refresh tokens**.
It listens to the port **5300**.

> Requires a valid refresh token, **cannot generate** one itself.
### Before all
* Have Go
* Have gRPC
* Have Docker
* Set Environment variables:
* `REFRESH_TOKEN_STORE_REDIS_URL` (used in `./dal/client.go`)
installed.
### gRPC settings
Everything starts with designing the [protobuf](https://github.com/google/protobuf) file
(`./proto/token.proto` for this project) and once the messages and services are designed
(or changed later) the following command should be run:
```sh
cd $GOPATH/src/github.com/vahdet/go-refresh-token-store
protoc -I proto proto/token.proto --go_out=plugins=grpc:proto
```
This command will generate (or recreate if it exists) a `.pb.go` file just beside itself.
It is `./proto/token.pb.go` here and it allows implementing Go services, repositories, in short any Go code
behind the services defined in the `.proto` file.
For this case, the server implementation is performed in `./grpcserver/server.go` file.
### Git Tips for humble beings
The [StackOverflow answer](https://stackoverflow.com/a/23328996/4636715) resembles three lines of general purpose git commands
that can be used anytime a change is made and should be committed to `master` branch:
```bash
git add .
git commit -a -m "My classical message to be replaced"
git push
```