Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenhan wang
pastebin
Commits
7f2a2a31
Commit
7f2a2a31
authored
Dec 16, 2022
by
chenhan wang
Browse files
版本1.1
parent
be1252fa
Changes
2
Show whitespace changes
Inline
Side-by-side
.history/backend/app/middleware/login_20221216215609.go
deleted
100644 → 0
View file @
be1252fa
package
middleware
import
(
"github.com/labstack/echo/v4"
//"http/net"
//"pastebin_backend/app/controller"
)
func
Auth
(
next
echo
.
HandlerFunc
)
echo
.
HandlerFunc
{
return
func
(
c
echo
.
Context
)
error
{
//c.Bind("User")
/*
cookie, _ := c.Cookie("user")
if cookie == nil {
err := controller.AskPasswd(c)
if err != nil {
return nil
}
}*/
//c.Set("uid", cookie.Value)
c
.
Set
(
"uid"
,
114514
)
return
next
(
c
)
}
}
/*
func CookieAuth(c echo.Context) error{
cookie, err := c.Cookie()
if err != nil {
return err
}
}*/
.history/backend/app/middleware/login_20221216223311.go
deleted
100644 → 0
View file @
be1252fa
package
middleware
import
(
"github.com/labstack/echo/v4"
//"http/net"
//"pastebin_backend/app/controller"
)
func
Auth
(
next
echo
.
HandlerFunc
)
echo
.
HandlerFunc
{
return
func
(
c
echo
.
Context
)
error
{
//c.Bind("User")
/*
cookie, _ := c.Cookie("user")
if cookie == nil {
err := controller.AskPasswd(c)
if err != nil {
return nil
}
}*/
//c.Set("uid", cookie.Value)
c
.
Set
(
"uid"
,
114514
)
return
next
(
c
)
}
}
/*
func CookieAuth(c echo.Context) error{
cookie, err := c.Cookie()
if err != nil {
return err
}
}*/
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment