https://github.com/satishbabariya/go-echo-auth0-middleware
Auth0 Middleware for go labstack/echo
https://github.com/satishbabariya/go-echo-auth0-middleware
auth0 auth0-jwt echo-framework golang jwt jwt-authentication middleware
Last synced: 6 days ago
JSON representation
Auth0 Middleware for go labstack/echo
- Host: GitHub
- URL: https://github.com/satishbabariya/go-echo-auth0-middleware
- Owner: satishbabariya
- Created: 2021-12-19T16:42:57.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2023-12-18T22:22:51.000Z (over 1 year ago)
- Last Synced: 2025-03-31T01:03:49.348Z (25 days ago)
- Topics: auth0, auth0-jwt, echo-framework, golang, jwt, jwt-authentication, middleware
- Language: Go
- Homepage:
- Size: 19.5 KB
- Stars: 9
- Watchers: 2
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# go-echo-auth0-middleware
Auth0 Middleware for go labstack/echo### Example
```go
package mainimport (
"net/http""github.com/auth0/go-jwt-middleware/v2/validator"
"github.com/labstack/echo/v4"
"github.com/labstack/echo/v4/middleware"
goechoauth0middleware "github.com/satishbabariya/go-echo-auth0-middleware"
)func main() {
e := echo.New()e.Use(middleware.Logger())
e.Use(middleware.Recover())e.Use(goechoauth0middleware.Auth0WithConfig(goechoauth0middleware.Auth0Config{
Issuer: "https:///",
Audience: []string{""},
}))// Routes
e.GET("/", func(c echo.Context) error {
claims := c.Get("claims").(*validator.ValidatedClaims)
return c.JSON(http.StatusOK, claims)
})// Start server
e.Logger.Fatal(e.Start(":3000"))
}
```