Skip to content

Commit

Permalink
Merge pull request #112 from wultra/issues/merge-upstream
Browse files Browse the repository at this point in the history
Merge upstream
  • Loading branch information
banterCZ authored Jun 12, 2023
2 parents 3a70e54 + 94ca124 commit b1111f2
Show file tree
Hide file tree
Showing 34 changed files with 824 additions and 1,705 deletions.
87 changes: 76 additions & 11 deletions docs/Mobile-Token-API.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,14 @@ Get the list with all operations that are pending confirmation.
"title": "Confirm Payment",
"message": "Hello,\nplease confirm following payment:",
"attributes": [
{
"type": "ALERT",
"alertType": "WARNING",
"id": "operation.warning",
"label": "Balance alert",
"title": "Insufficient Balance",
"message": "You have only $1.00 on your account with number 238400856/0300."
},
{
"type": "HEADING",
"id": "operation.heading",
Expand All @@ -152,11 +160,27 @@ Get the list with all operations that are pending confirmation.
"type": "AMOUNT",
"id": "operation.amount",
"label": "Amount",
"amount": 100,
"amount": 2199.40,
"currency": "CZK",
"amountFormatted": "100,00",
"amountFormatted": "2199,40",
"currencyFormatted": ""
},
{
"type": "AMOUNT_CONVERSION",
"id": "operation.conversion",
"label": "Conversion Rate",
"dynamic": false,
"sourceAmount": 100.00,
"sourceCurrency": "USD",
"sourceAmountFormatted": "100.00",
"sourceCurrencyFormatted": "$",
"sourceValueFormatted": "$100.00",
"targetAmount": 2199.40,
"targetCurrency": "CZK",
"targetAmountFormatted": "2199,40",
"targetCurrencyFormatted": "",
"targetValueFormatted": "2199,40 Kč"
},
{
"type": "KEY_VALUE",
"id": "operation.account",
Expand All @@ -175,6 +199,13 @@ Get the list with all operations that are pending confirmation.
"label": "Note",
"note": "Utility Bill Payment - 05/2019"
},
{
"type": "IMAGE",
"id": "operation.image",
"label": "Payment Check Preview",
"thumbnailUrl": "https://example.com/thumbnail.png",
"originalUrl": "https://example.com/image.png"
},
{
"type": "PARTY_INFO",
"id": "operation.partyInfo",
Expand Down Expand Up @@ -248,6 +279,14 @@ Get the list of confirmed or rejected Mobile Token operations.
"title": "Confirm Payment",
"message": "Hello,\nplease confirm following payment:",
"attributes": [
{
"type": "ALERT",
"alertType": "WARNING",
"id": "operation.warning",
"label": "Balance alert",
"title": "Insufficient Balance",
"message": "You have only $1.00 on your account with number 238400856/0300."
},
{
"type": "HEADING",
"id": "operation.heading",
Expand All @@ -257,11 +296,27 @@ Get the list of confirmed or rejected Mobile Token operations.
"type": "AMOUNT",
"id": "operation.amount",
"label": "Amount",
"amount": 100,
"amount": 2199.40,
"currency": "CZK",
"amountFormatted": "100,00",
"amountFormatted": "2199,40",
"currencyFormatted": ""
},
{
"type": "AMOUNT_CONVERSION",
"id": "operation.conversion",
"label": "Conversion Rate",
"dynamic": false,
"sourceAmount": 100.00,
"sourceCurrency": "USD",
"sourceAmountFormatted": "100.00",
"sourceCurrencyFormatted": "$",
"sourceValueFormatted": "$100.00",
"targetAmount": 2199.40,
"targetCurrency": "CZK",
"targetAmountFormatted": "2199,40",
"targetCurrencyFormatted": "",
"targetValueFormatted": "2199,40 Kč"
},
{
"type": "KEY_VALUE",
"id": "operation.account",
Expand All @@ -280,6 +335,13 @@ Get the list of confirmed or rejected Mobile Token operations.
"label": "Note",
"note": "Utility Bill Payment - 05/2019"
},
{
"type": "IMAGE",
"id": "operation.image",
"label": "Payment Check Preview",
"thumbnailUrl": "https://example.com/thumbnail.png",
"originalUrl": "https://example.com/image.png"
},
{
"type": "PARTY_INFO",
"id": "operation.partyInfo",
Expand Down Expand Up @@ -389,13 +451,16 @@ Reject an operation with given ID, with a provided reason.

### Form Attribute Types

| Type | Description |
|---|---|
| `AMOUNT` | Form field representing an amount with currency. |
| `KEY_VALUE` | Form field representing a key value item, where items are displayed next to each other. This realistically impose limitation on value length - it should fit into the single line. |
| `NOTE` | Form field representing a generic text note, where label is displayed above the note. As a result, note can be of an arbitrary length and can be multi-line. |
| `HEADING` | Form field representing a heading, where label is displayed as the heading text. |
| `PARTY_INFO` | Form field representing a structured object with information about a third party. |
| Type | Description |
|---------------------|-----------------------------------------------------------------------------------|
| `AMOUNT` | Form field representing an amount with currency. |
| `AMOUNT_CONVERSION` | Form field representing a conversion between amounts. |
| `KEY_VALUE` | Form field representing a key value item with single-line value. |
| `NOTE` | Form field representing a generic text note with multi-line value. |
| `HEADING` | Form field representing a heading, where label is displayed as the heading text. |
| `ALERT` | Form field representing a alert with success, info, warning or error states. |
| `PARTY_INFO` | Form field representing a structured object with information about a third party. |
| `IMAGE` | Form field representing an image. |

### Operation Rejection Reasons

Expand Down
41 changes: 41 additions & 0 deletions docs/Operation-Form-Data.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Following structured custom form data attributes are available:
- `NOTE` - free text
- `KEY_VALUE` - generic key-value field
- `HEADING` - heading with label
- `ALERT` - alert with various alert types
- `PARTY_INFO` - information about party

## Value Formatting
Expand All @@ -42,6 +43,8 @@ This snippet configure

#### AMOUNT

![Amount Cell](./images/cell_amount.png)

```json
{
"id": "operation.amount",
Expand All @@ -61,6 +64,8 @@ Remarks:

#### AMOUNT_CONVERSION

![Amount Conversion Cell](./images/cell_amount_conversion.png)

```json
{
"id": "operation.amountConversion",
Expand All @@ -83,6 +88,8 @@ Remarks:

#### IMAGE

![Image Cell](./images/cell_image.png)

```json
{
"id": "operation.image",
Expand All @@ -102,6 +109,8 @@ Remarks:

#### KEY_VALUE

![Key-Value Cell](./images/cell_key_value.png)

```json
{
"id": "operation.account",
Expand All @@ -118,6 +127,8 @@ Remarks:

#### NOTE

![Note Cell](./images/cell_note.png)

```json
{
"id": "operation.note",
Expand All @@ -134,6 +145,8 @@ Remarks:

#### HEADING

![Heading Cell](./images/cell_heading.png)

```json
{
"id": "operation.heading",
Expand All @@ -145,8 +158,36 @@ Remarks:
Remarks:
- Always use `HEADING` as `type`

#### ALERT

![Alert Cell](./images/cell_alert.png)

```json
{
"id": "operation.alert",
"type": "ALERT",
"text": "Balance alert",
"params": {
"type": "alert-type-key-may-be-changed",
"title": "title-key-may-be-changed",
"message": "message-key-may-be-changed"
}
}
```

Remarks:
- Always use `ALERT` as `type`
- Alert type can be any of `SUCCESS`, `INFO`, `WARNING` and `ERROR`
- The recommended formatting on the client side is the following:
- Each alert type should have an associated icon to it.
- If only message is specified, it is displayed as a regular text.
- If both message and title are specified, title is displayed as a highlighted part of the text (i.e., bold and above the value), message as the regular text.
- The element text present in the label value can be used for accessibility description of the cell or icon.

#### PARTY_INFO

![Party Info Cell](./images/cell_party_info.png)

```json
{
"id": "operation.partyInfo",
Expand Down
15 changes: 12 additions & 3 deletions docs/PowerAuth-Enrollment-Server-1.5.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

This guide contains instructions for migration from PowerAuth Enrollment Server version `1.4.x` to version `1.5.0`.


## Spring Boot 3

The PowerAuth Enrollment Sever was upgraded to Spring Boot 3, Spring Framework 6, and Hibernate 6.
Expand All @@ -19,14 +18,24 @@ Make sure that you use dialect without version.
# spring.jpa.database-platform=org.hibernate.dialect.OracleDialect
```


## Database Changes


### Drop MySQL Support

Since version `1.5.0`, MySQL database is not supported anymore.

## API Extensions

Since version `1.5.0`, the API supports new cell types in operation responses. These are:

- `IMAGE` - Cell with image.
- `ALERT` - Cell with alert banner.
- `AMOUNT_CONVERSION` - Cell with amount conversion between currencies.

See the documentation for attribute details:

- [Mobile Token API](./Mobile-Token-API.md)
- [Operation Form Data](./Operation-Form-Data.md)

## Dependencies

Expand Down
Binary file added docs/images/cell_alert.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/cell_amount.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/cell_amount_conversion.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/cell_heading.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/cell_image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/cell_key_value.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/cell_note.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/cell_party_info.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 18 additions & 16 deletions docs/onboarding/Configuration-Properties.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,22 +116,24 @@ The Onboarding Server uses the following public configuration properties:

## iProov Configuration

| Property | Default | Note |
|---|---|---|
| `enrollment-server-onboarding.presence-check.iproov.apiKey` | | iProov REST API key. |
| `enrollment-server-onboarding.presence-check.iproov.apiSecret` | | iProov REST API secret. |
| `enrollment-server-onboarding.presence-check.iproov.assuranceType` | `genuine_presence` | iProov assurance type. |
| `enrollment-server-onboarding.presence-check.iproov.ensureUserIdValueEnabled` | `false` | Whether iProov user ID value should be validated and trimmed. |
| `enrollment-server-onboarding.presence-check.iproov.riskProfile` | | iProov risk profile. |
| `enrollment-server-onboarding.presence-check.iproov.serviceBaseUrl` | | Base REST service URL for iProov. |
| `enrollment-server-onboarding.presence-check.iproov.serviceUserAgent` | `Wultra/OnboardingServer` | User agent to use when making HTTP calls to iProov REST service. |
| `enrollment-server-onboarding.presence-check.iproov.restClientConfig.acceptInvalidSslCertificate` | `false` | Whether invalid SSL certificate is accepted when calling Zen ID REST service. |
| `enrollment-server-onboarding.document-verification.zenid.restClientConfig.maxInMemorySize` | `10485760` | Maximum in memory size of HTTP requests when calling iProov REST service. |
| `enrollment-server-onboarding.presence-check.iproov.zenid.restClientConfig.proxyEnabled` | `false` | Whether proxy server is enabled when calling iProov REST service. |
| `enrollment-server-onboarding.presence-check.iproov.zenid.restClientConfig.proxyHost` | | Proxy host to be used when calling iProov REST service. |
| `enrollment-server-onboarding.presence-check.iproov.zenid.restClientConfig.proxyPort` | 0 | Proxy port to be used when calling iProov REST service. |
| `enrollment-server-onboarding.presence-check.iproov.zenid.restClientConfig.proxyUsername` | | Proxy username to be used when calling iProov REST service. |
| `enrollment-server-onboarding.presence-check.iproov.zenid.restClientConfig.proxyPassword` | | Proxy password to be used when calling iProov REST service. |
| Property | Default | Note |
|---------------------------------------------------------------------------------------------------|---------------------------|-------------------------------------------------------------------------------|
| `enrollment-server-onboarding.presence-check.iproov.apiKey` | | iProov REST API key. |
| `enrollment-server-onboarding.presence-check.iproov.apiSecret` | | iProov REST API secret. |
| `enrollment-server-onboarding.presence-check.iproov.assuranceType` | `genuine_presence` | iProov assurance type. |
| `enrollment-server-onboarding.presence-check.iproov.ensureUserIdValueEnabled` | `false` | Whether iProov user ID value should be validated and trimmed. |
| `enrollment-server-onboarding.presence-check.iproov.riskProfile` | | iProov risk profile. |
| `enrollment-server-onboarding.presence-check.iproov.serviceBaseUrl` | | Base REST service URL for iProov. |
| `enrollment-server-onboarding.presence-check.iproov.serviceUserAgent` | `Wultra/OnboardingServer` | User agent to use when making HTTP calls to iProov REST service. |
| `enrollment-server-onboarding.presence-check.iproov.oAuthClientUsername` | | OAuth client username to iProov REST service. |
| `enrollment-server-onboarding.presence-check.iproov.oAuthClientPassword` | | OAuth client password to iProov REST service. |
| `enrollment-server-onboarding.presence-check.iproov.restClientConfig.acceptInvalidSslCertificate` | `false` | Whether invalid SSL certificate is accepted when calling Zen ID REST service. |
| `enrollment-server-onboarding.document-verification.zenid.restClientConfig.maxInMemorySize` | `10485760` | Maximum in memory size of HTTP requests when calling iProov REST service. |
| `enrollment-server-onboarding.presence-check.iproov.zenid.restClientConfig.proxyEnabled` | `false` | Whether proxy server is enabled when calling iProov REST service. |
| `enrollment-server-onboarding.presence-check.iproov.zenid.restClientConfig.proxyHost` | | Proxy host to be used when calling iProov REST service. |
| `enrollment-server-onboarding.presence-check.iproov.zenid.restClientConfig.proxyPort` | 0 | Proxy port to be used when calling iProov REST service. |
| `enrollment-server-onboarding.presence-check.iproov.zenid.restClientConfig.proxyUsername` | | Proxy username to be used when calling iProov REST service. |
| `enrollment-server-onboarding.presence-check.iproov.zenid.restClientConfig.proxyPassword` | | Proxy password to be used when calling iProov REST service. |

## Correlation HTTP Header Configuration

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ public class OnboardingOtpEntity implements Serializable {
private static final long serialVersionUID = -5626187612981527923L;

public static final String ERROR_CANCELED = "canceledOtp";
public static final String ERROR_RESEND = "resendOtp";
public static final String ERROR_EXPIRED = "expiredOtp";
public static final String ERROR_MAX_FAILED_ATTEMPTS = "maxFailedAttemptsOtp";

Expand Down
25 changes: 18 additions & 7 deletions enrollment-server-onboarding/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,10 @@
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
<exclusions>
<exclusion>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-el</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-oauth2-client</artifactId>
</dependency>

<dependency>
Expand Down Expand Up @@ -148,6 +146,12 @@
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-el</artifactId>
<scope>test</scope>
</dependency>

<!-- Documentation -->
<dependency>
<groupId>org.springdoc</groupId>
Expand Down Expand Up @@ -202,13 +206,14 @@
</goals>
<configuration>
<verbose>false</verbose>
<inputSpec>${basedir}/src/main/resources/api/api-iproov.yaml</inputSpec>
<inputSpec>${basedir}/src/main/resources/api/api-iproov.json</inputSpec>
<generatorName>java</generatorName>
<generateApis>false</generateApis>
<generateModelDocumentation>false</generateModelDocumentation>
<generateModels>true</generateModels>
<generateModelTests>false</generateModelTests>
<generateSupportingFiles>false</generateSupportingFiles>
<skipValidateSpec>true</skipValidateSpec>
<configOptions>
<library>native</library>
<hideGenerationTimestamp>true</hideGenerationTimestamp>
Expand Down Expand Up @@ -262,6 +267,12 @@
<artifactId>spring-boot-starter-tomcat</artifactId>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-el</artifactId>
<scope>provided</scope>
</dependency>
</dependencies>
</profile>
<profile>
Expand Down
Loading

0 comments on commit b1111f2

Please sign in to comment.