# README
Gin-Gonic Django Authentication Handler
If you have a django backend/admin portal this module allows for the connection of you application to the django backend
authentication and authorisation system.
We use the sessionid cookie from the django sessions table to authenticate/authorise
request coming into the gin router.
Features
- Secure Gin routes with a Django session cookie
- Adding login handler to create session on the django server
- Support for multiple flavours of sql database
Installation
go get github.com/dowling-john/gin_django_auth
Required environment variables
GINDJANGOAUTHDBCONNECTIONSTRING : "postgres://<username>:<password>@<host>:5432/<db>?sslmode=disable"
GINDJANGOAUTHDBDIALECT: "postgres"
Login Required Usage
import (
"github.com/Flexin1981/gin_django_auth/middleware"
)
router.POST("/graphql", middleware.LoginRequired, handlers.GraphQlHandler)
Handler Usage
import (
"github.com/Flexin1981/gin_django_auth/handlers"
)
router.POST("/login", handlers.DjangoLoginHandler)
# Packages
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author