Auth0 Middleware for go labstack/echo

go-echo-auth0-middleware

Auth0 Middleware for go labstack/echo

Example

package main

import (
	"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://<your tenant domain>/",
		Audience: []string{"<your api identifier>"},
	}))

	// 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"))
}
Owner
Satish Babariya
Software Engineer (Swift / Go / TypeScript)
Satish Babariya
Similar Resources

A minimal framework to build web apps; with handler chaining, middleware support; and most of all standard library compliant HTTP handlers(i.e. http.HandlerFunc).

A minimal framework to build web apps; with handler chaining, middleware support; and most of all standard library compliant HTTP handlers(i.e. http.HandlerFunc).

WebGo v4.1.3 WebGo is a minimalistic framework for Go to build web applications (server side) with zero 3rd party dependencies. Unlike full-fledged fr

Jan 1, 2023

Gzip Middleware for Go

 Gzip Middleware for Go

An out-of-the-box, also customizable gzip middleware for Gin and net/http.

Dec 19, 2022

Prometheus middleware for wish

Prometheus middleware for wish

promwish Package promwish provides a simple wish middleware exposing some Prometheus metrics. Example Usage You can add promwish as a middleware to yo

Nov 26, 2022

X-Response-Time middleware for fiber/v2

fiber-responsetime X-Response-Time middleware for fiber/v2 go get github.com/husanu/fiber-responsetime/v2 package main import ( "time" "github.com

Dec 17, 2021

Gin middleware/handler to enable CORS support.

wcors Gin middleware/handler to enable CORS support. Usage Start using it Download and install it: go get github.com/wyy-go/wcors Import it in your co

Jan 8, 2022

Episodio V: Rise of the middleware

APITrials0.5 Episodio V: Rise of the middleware Captain's log: Up to date this file contains some simple errors to be corrected. They come from severa

Jan 10, 2022

⚡Simple cors middleware package for minima

⚡Simple cors middleware package for minima

This is package is wrapper based on rs/cors package made for minima. Geting Started Install the package using go get github.com/gominima/cors and call

Mar 7, 2022

auth0 is a package helping to authenticate using the Auth0 service.

auth0 auth0 is a package helping to authenticate using the Auth0 service. Installation go get github.com/auth0-community/go-auth0 Client Credentials

Feb 15, 2022

auth0 is a package helping to authenticate using the Auth0 service.

auth0 auth0 is a package helping to authenticate using the Auth0 service. Instal

Jan 13, 2022

Example app using labstack/echo and ozzo-validator.

Example app using labstack/echo and ozzo-validator.

Oct 17, 2022

Um chat feito em go utilizando gorilla/websocket, go-redis/redis,golang-jwt/jwte labstack/echo.

go-chat Um chat feito em go utilizando gorilla/websocket, go-redis/redis,golang-jwt/jwte labstack/echo. Why Eu gostaria de aprender algumas ferramenta

Jul 14, 2022

echo-http - Echo http service

echo-http - Echo http service Responds with json-formatted echo of the incoming request and with a predefined message. Can be install directly (go get

Dec 4, 2022

Echo-server - An HTTP echo server designed for testing applications and proxies

echo-server An HTTP echo server designed for testing applications and proxies. R

Dec 20, 2022

Golang-echo-sample - Make an out-of-the-box backend based on golang-echo

Golang-echo-sample - Make an out-of-the-box backend based on golang-echo

Dec 31, 2021

Echo-mongo-api - Simple Golang REST application with Echo Framework & MongoDB

Echo-mongo-api - Simple Golang REST application with Echo Framework & MongoDB

Feb 14, 2022

Bootstrapper and middleware for Echo framework in golang.

Bootstrapper and middleware for Echo framework in golang.

rk-echo Interceptor & bootstrapper designed for echo framework. Currently, supports bellow functionalities. Name Description Start with YAML Start ser

Jul 9, 2022

EchoMiddleware - Echo Middleware with golang

EchoMiddleware middleware for echo server usage import ( "github.com/universe-3

Jan 4, 2022

auth0 jwt validator with jwks caching

JWT Validator for Auth0 (https://auth0.com/) that caches public JWKS (since there is a limit on calls to public JWKS URL) Example securing a GraphQL s

Mar 4, 2022

A web app written in Go, using Auth0 and deployed to Heroku

hundred-go This project demonstrates a web app written in Go that uses free Auth0 for authentication and authorization. Web Apps - Plan for Auth Early

Dec 22, 2021
EchoMiddleware - Echo Middleware with golang

EchoMiddleware middleware for echo server usage import ( "github.com/universe-3

Jan 4, 2022
CRUD API server of Clean Architecture with Go(Echo), Gorm, MySQL, Docker and Swagger
CRUD API server of Clean Architecture with Go(Echo), Gorm, MySQL, Docker and Swagger

CRUD API Server of Clean Architecture Go(echo) gorm mysql docker swagger build docker-compose up -d --build API Postman and Fiddler is recommended to

May 14, 2022
Golang Echo Framework

template-golang-echo Creator: 한승진 Date: 2021/10/13 Description Kubernetes-Istio 환경인 리얼패킹 클라우드에 배포하기 위한 Golang Echo 서버 기초 템플릿입니다. 배포 타겟 기술스텍 : Kubernet

Oct 13, 2021
REST API boilerplate built with go and clean architecture - Echo Framework

GO Boilerplate Prerequisite Install go-migrate for running migration https://github.com/golang-migrate/migrate App requires 2 database (postgreSQL an

Jan 2, 2023
REST API with Echo Framework from Go
REST API with Echo Framework from Go

REST API with Echo Framework from Go

Nov 16, 2021
Simple REST-API implementation using Golang with several packages (Echo, GORM) and Docker

Simple REST-API Boilerplate This is a simple implementation of REST-API using Golang and several packages (Echo and GORM). By default, I use PostgreSQ

Sep 13, 2022
It took me a while to figure out how I can use GraphQL with the ent ORM and serve the GraphQL endpoint via the Echo framework

Go + Graphql + Ent + Echo Boilerplate It took me a while to figure out how I can use GraphQL with the ent ORM and serve the GraphQL endpoint via the E

Sep 28, 2022
A Golang restful API boilerplate based on Echo framework v4

A Golang restful API boilerplate based on Echo framework v4. Includes tools for module generation, db migration, authorization, authentication and more.

Nov 15, 2022
Goa is a web framework based on middleware, like koa.js.

Goa Goa is under construction, if you are familiar with koa or go and interested in this project, please join us. What is goa? goa = go + koa Just lik

Sep 27, 2022
⚡ Rux is an simple and fast web framework. support middleware, compatible http.Handler interface. 简单且快速的 Go web 框架,支持中间件,兼容 http.Handler 接口

Rux Simple and fast web framework for build golang HTTP applications. NOTICE: v1.3.x is not fully compatible with v1.2.x version Fast route match, sup

Dec 8, 2022