forked from membrane/api-gateway
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathproxiesSSL.xml
More file actions
38 lines (30 loc) · 1.25 KB
/
proxiesSSL.xml
File metadata and controls
38 lines (30 loc) · 1.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<spring:beans xmlns="http://membrane-soa.org/proxies/1/"
xmlns:spring="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-4.2.xsd
http://membrane-soa.org/proxies/1/ http://membrane-soa.org/schemas/proxies-1.xsd">
<router>
<serviceProxy port="8080">
<ssl>
<keystore location="../../../../conf/membrane.p12" password="secret" keyPassword="secret" />
<truststore location="../../../../conf/membrane.p12" password="secret" />
</ssl>
<oauth2Resource2>
<github
clientId="Enter client ID from Github here"
clientSecret="Enter client Secret from Github here" />
</oauth2Resource2>
<!-- this will act as the secret resource to make the example simple. See below in the comments for an alternative -->
<groovy>
def email = exc.properties.'membrane.oauth2'.userinfo.email
exc.response = Response.ok("Hello " + email + ".").build()
RETURN
</groovy>
<!--
Use the <target> instead of the <groovy> interceptor to forward requests to another host:
<target host="membrane-soa.org" port="80" />
-->
</serviceProxy>
</router>
</spring:beans>