Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: 3 months 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 (about 3 years ago)
- Default Branch: master
- Last Pushed: 2023-12-18T22:22:51.000Z (about 1 year ago)
- Last Synced: 2024-04-18T21:40:07.848Z (10 months ago)
- Topics: auth0, auth0-jwt, echo-framework, golang, jwt, jwt-authentication, middleware
- Language: Go
- Homepage:
- Size: 19.5 KB
- Stars: 9
- Watchers: 3
- Forks: 0
- 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"))
}
```