Skip to content

olmax99/beego-auth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

beego-auth

The main goal of this project is to develop a small stand-alone user login for the Beego Framework by astaxie. This work is mainly a continuation of the beego-acme example presented in the article ”A Word From The Beegoist” (2014, Richard Eng).

Further Topics

Prerequisites

  • Beego v2.0.2
  • Go 1.16.x
  • Vault v1.9.0
  • Sendgrid (Account, Api Token)

Getting Started

Run Main

  • Run beego-auth
$ source .beego.env
$ go build
$ ./beego-auth

Commands

# rebuild database (all prior data lost!)
./beego-auth orm syncdb -h
./beego-auth orm syncdb -db "auth" -force=true -v=true

# Schema
./beego-auth orm sqlall -db "auth"

Testing

$ mage Check  # run all tests

General Instructions

Beego Config

  • loaded by default beego/beego/v2/core/config/ini.go
  • may lead to [W] (Beego Warning):
2021/12/01 12:09:06.965 [W]  init global config instance failed. If you donot
use this, just ignore it.  open conf/app.conf: no such file or directory
  • work-around by providing empty app.conf with include.

Create Vault Transit Key

$ vault secrets enable transit
$ vault write -f transit/keys/beego-key
$ vault list transit/keys
$ vault read transit/keys/beego-key

# decrypt data previously encrypted by Vault Transit
$ mage decrypt vault:v1:oZTuFdqpTReBPCV/qHj3itmTa86tybxHBUQxR6Xx3k7IQ0h3DcX6a7s=

Where to go from here?

..

Credits

About

A more comprehensive implementation of a basic user authentication using the Beego framework.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published