Skip to content

raiich/envoy-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Envoy Example

CORS

cd cors
docker-compose down ; docker-compose up --build
curl -i http://localhost:10000 -H "Authorization: Bearer $(curl -XPOST -H 'Content-Type: application/json' -d '{"aud":"books.read","exp":2345678901,"iss":"my.issuer.local","sub":"bob"}' http://localhost:8080)"

Authentication/Authorization

cd auth-nz
docker-compose down ; docker-compose up --build

With Permission

JWT_TOKEN=$(curl -XPOST -H 'Content-Type: application/json' -d '{"aud":"books.read","exp":2345678901,"iss":"my.issuer.local","sub":"bob"}' http://localhost:8080)
echo ${JWT_TOKEN}
curl -i http://localhost:10000 -H "Authorization: Bearer ${JWT_TOKEN}"

Without Permission

# sub = "ng bob", including `ng` 
JWT_TOKEN=$(curl -XPOST -H 'Content-Type: application/json' -d '{"aud":"books.read","exp":2345678901,"iss":"my.issuer.local","sub":"ng bob"}' http://localhost:8080)
echo ${JWT_TOKEN}
curl -i http://localhost:10000 -H "Authorization: Bearer ${JWT_TOKEN}"

1 liner

curl -i http://localhost:10000 -H "Authorization: Bearer $(curl -XPOST -H 'Content-Type: application/json' -d '{"aud":"books.read","exp":2345678901,"iss":"my.issuer.local","sub":"ng bob"}' http://localhost:8080)"

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published