Documentation ¶
Index ¶
Constants ¶
View Source
const JWTExpireInterval = 8
JWTExpireInterval - how long the JWT will last in hours
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthController ¶
type AuthController struct { AuthStrategy union.Union JWTSecretsKeeper jwt.SecretsKeeper // contains filtered or unexported fields }
func New ¶
func New(dataStore datastore.DataStore) *AuthController
func (*AuthController) AuthMiddleware ¶
func (a *AuthController) AuthMiddleware(next http.Handler) http.Handler
func (*AuthController) Login ¶
func (a *AuthController) Login(w http.ResponseWriter, r *http.Request)
func (*AuthController) Logout ¶
func (a *AuthController) Logout(w http.ResponseWriter, r *http.Request)
Logout endpoint for user signin
func (*AuthController) RegisterUser ¶
func (a *AuthController) RegisterUser(w http.ResponseWriter, r *http.Request)
Signup register a user to the db
Click to show internal directories.
Click to hide internal directories.