You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+9-7Lines changed: 9 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,8 @@ Mastercard Petstore API
4
4
- API version: 1.0.0
5
5
- App version: 1.0.0
6
6
7
-
This is a sample API to demonstrate an API that aligns to Mastercard's API Gold Standards. It covers all expected use cases. Please see [here](https://developer.mastercard.com/reference-service-ngw/documentation) to view our sample documentation.
7
+
This application provides an examples of how an API provided by Mastercard Development will implement authentication, authorisation and payload encryption.
8
+
Please see [here](https://developer.mastercard.com/reference-service-ngw/documentation) the documentation which covers all you need to use this application and adopt it to your needs.
8
9
9
10
For more information, please visit [https://developer.mastercard.com/support](https://developer.mastercard.com/support)
10
11
@@ -16,7 +17,7 @@ Building the API client library requires:
16
17
17
18
## Installation
18
19
19
-
To being please run
20
+
Please follow the instruction bellow to begin
20
21
21
22
```shell
22
23
mvn clean install
@@ -28,19 +29,19 @@ This will generate all required files as defined in [petstore.yaml](src/main/res
28
29
29
30
Set properties in [application.properties](src/main/resources/application.properties)
30
31
31
-
The authentication mode must be set using (mTLS or oAuth).
32
+
The authentication mode (MTLS or oOAuth1.0a) must be set using
32
33
```
33
34
-Dspring.profiles.active=oauth
34
35
-Dspring.profiles.active=mtls
35
36
```
36
-
If using the API in oAuth mode the following are required in [application-oauth.properties](src/main/resources/application-oauth.properties)
37
+
If using the API in OAuth-1.0a mode the following are required in [application-oauth.properties](src/main/resources/application-oauth.properties)
37
38
```
38
39
mastercard.oauth.pkcs12KeyFile
39
40
mastercard.oauth.consumerKey
40
41
mastercard.oauth.keyAlias
41
42
mastercard.oauth.keyPassword
42
43
```
43
-
If using the API in mTLS mode the following are required in [application-mtls.properties](src/main/resources/application-mtls.properties)
44
+
If using the API in MTLS mode the following are required in [application-mtls.properties](src/main/resources/application-mtls.properties)
To see how the average flow of each use case please see the [flow folder](src/test/java/com/mastercard/app/petstore/flow) and run a test. Note this tests will not
59
60
run if a `basePath` in [application.properties](src/main/resources/application.properties) is not set. These tests call
60
-
out to the service so they must be set.
61
+
out to the service, so they must be set.
61
62
62
63
The tests can be run using
63
64
```shell
@@ -68,6 +69,7 @@ or
68
69
mvn test -Dspring.profiles.active=mtls
69
70
```
70
71
72
+
## Tested Scenarios
71
73
### Adoption Flow Test Case
72
74
This demonstrates the typical flow for an adoption.
0 commit comments