controllers

package
v0.0.0-...-892bc34 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateUser

func CreateUser() http.HandlerFunc

The User struct is responsible for getting the req.Body and inserting it into the database and the same is responsible for "porpulating" the JSON that returns from the database

Please you from the frontend, redirect the user to the route

/api/v{n}/authenticate

Here I just create the user, I don't have any JWT authenticate here

func IsDuplicate

func IsDuplicate(value string) string

Types

type Auth

type Auth struct {
	UserName string `json:"username" db:"username"`
	Password string `json:"passwd" db:"passwd"`
}

func (*Auth) Authenticate

func (auth *Auth) Authenticate() http.HandlerFunc

A fake function that returns the entered data in the req.Body and a token that is also fake

func (*Auth) AuthenticateSSO

func (auth *Auth) AuthenticateSSO() http.HandlerFunc

Just like the previous function, this one is no different, it will return the entered data in the req.Body and a token that is also fake

Jump to

Keyboard shortcuts

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