Skip to content

Instantly share code, notes, and snippets.

@terrancesnyder
Created September 14, 2023 02:59
Show Gist options
  • Save terrancesnyder/bacae10af3c29c639d733ceff4a15146 to your computer and use it in GitHub Desktop.
Save terrancesnyder/bacae10af3c29c639d733ceff4a15146 to your computer and use it in GitHub Desktop.
Example of protecting with Ory Oathkeeper Access to API (GET)
{
"id": "Protect a People API with Consent Check",
"match": {
"url": "http://api.woven-city.io/api/people/contacts",
"methods": [ "GET" ]
},
"upstream": {
"url": "https://my_container_or_dns:8080/api/people/contacts"
},
"authenticators": [{
"handler": "oauth2_introspection",
"config": {
"required_scope": [
"https://www.googleapis.com/auth/userinfo.profile",
"https://www.googleapis.com/auth/contacts.readonly"
]
}
}]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment