lijasonvip commented on a change in pull request #581: [SCB-378] add readme 
document for samples
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/581#discussion_r173472817
 
 

 ##########
 File path: samples/auth-sample/README.md
 ##########
 @@ -0,0 +1,59 @@
+## Auth-Sample
+
+To make sure the security between the interfaces of services, users can enable 
`RSA Authorizaiton` by simple configuration as below.
+
+## Consumer Service
+
+* Add dependence in pom.xml file:
+
+  ```xml
+  <dependency>
+        <groupId>org.apache.servicecomb</groupId>
+        <artifactId>handler-publickey-auth</artifactId>
+   </dependency>
+  ```
+
+* Add handler chain in microservice.yaml:
+
+  ```yaml
+  cse:
+    # other configurations omitted
+    handler:
+      chain:
+        Consumer:
+          default: auth-consumer
+  ```
+
+## Provider Service
+
+* Add dependence in pom.xml file:
+
+  ```xml
+  <dependency>
+        <groupId>org.apache.servicecomb</groupId>
+        <artifactId>handler-publickey-auth</artifactId>
+   </dependency>
+  ```
+
+* Add handler chain in microservice.yaml:
+
+  ```yaml
+  cse:
+    # other configurations omitted
+    handler:
+      chain:
+        Consumer:
+          default: auth-provider
+  ```
+
+## Sample Quick Start
+
+Auth sample use `RestTemplate` to present RSA communication between provider 
and consumer.
+
+* Start ServiceComb/Service Center
+
+  [how to start service 
center](http://servicecomb.incubator.apache.org/users/setup-environment/#)
+
+* Start auth-provider
 
 Review comment:
   ok, will do that ASAP.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to