mirror of
https://github.com/kataras/iris.git
synced 2026-01-10 21:45:57 +00:00
New: OAuth2 support via gothic. Example: https://github.com/iris-contrib/gothic/blob/master/example/main.go
https://github.com/iris-contrib/gothic/blob/master/example/main.go
This commit is contained in:
@@ -112,7 +112,7 @@ func main() {
|
||||
func myAuthMiddleware(c *iris.Context) {
|
||||
s := c.Session()
|
||||
|
||||
if s.GetString("username") == "myusername" && s.GetString("passowrd") == "mypassword" {
|
||||
if s.GetString("username") == "myusername" && s.GetString("password") == "mypassword" {
|
||||
c.Next()
|
||||
} else {
|
||||
c.EmitError(iris.StatusUnauthorized)
|
||||
|
||||
Reference in New Issue
Block a user