heimdall

module
v0.0.0-...-d43696c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 23, 2022 License: MIT

README

Heimdall

Docker Test GitHub GitHub go.mod Go version

Heimdall is a god who keeps watch for invaders and the onset of Ragnarök from his dwelling Himinbjörg, where the burning rainbow bridge Bifröstmeets the sky.

Features

  • Generate the Json Web Signature of the payload
  • Encrypt the payload before signing it for confidentiality
  • Verify and parse the payload from the given token
  • Verify and set the payload data to HTTP response headers to be used as authentication service
  • Token authentication and generation via REST API
  • Token generation via gRPC

Usage

Environment Variable
Name Required? Default value Note
JWS_SECRET_KEY YES
PAYLOAD_ENCRYPTION_KEY If omitted, payload will not be encrypted
TOKEN_VALID_TIME
SENTRY_DSN
MODE development
GIN_MODE debug
GIN_PORT 8080
GRPC_PORT 5050
Docker
docker run -p 8080:8080 -p 5050:5050 -e JWS_SECRET_KEY=SecretKey thetkpark/heimdall
API Specification
REST API

Swagger UI is availble at /swagger/index.html

gRPC

Please look at the Protocol Buffers file in cmd/heimdall/proto/token.proto

Directories

Path Synopsis
cmd
Package docs GENERATED BY SWAG; DO NOT EDIT This file was generated by swaggo/swag
Package docs GENERATED BY SWAG; DO NOT EDIT This file was generated by swaggo/swag
pkg
test
mock_encryption
Package mock_encryption is a generated GoMock package.
Package mock_encryption is a generated GoMock package.
mock_signature
Package mock_signature is a generated GoMock package.
Package mock_signature is a generated GoMock package.
mock_token
Package mock_token is a generated GoMock package.
Package mock_token is a generated GoMock package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL