forked from membrane/api-gateway
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapis.yaml
More file actions
18 lines (18 loc) · 710 Bytes
/
apis.yaml
File metadata and controls
18 lines (18 loc) · 710 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# yaml-language-server: $schema=https://www.membrane-api.io/v7.1.2.json
api:
port: 8080
flow:
- oauth2Resource2:
google:
clientId: Enter client ID from Google here
clientSecret: Enter client Secret from Google here
# this will act as the secret resource to make the example simple. See below in the comments for an alternative
- groovy:
src: |
def email = exc.properties.'membrane.oauth2'.userinfo.email
exc.response = Response.ok("Hello " + email + ".").build()
RETURN
# Use the 'target' instead of the 'groovy' interceptor to forward requests to another host:
# target:
# host: membrane-soa.org
# port: 80