-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #62 from wultra/develop
Prepare release 0.21.0
- Loading branch information
Showing
31 changed files
with
279 additions
and
135 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
# Customizing PowerAuth Web Flow Appearance | ||
|
||
Web Flow resources which can be customized are available in the ext-resources folder: | ||
|
||
- [ext-resources](../ext-resources) | ||
|
||
## Overriding Default Web Flow Resource Location | ||
|
||
The general process of updating Web Flow resources: | ||
|
||
- Clone project [powerauth-webflow-customization](https://github.com/wultra/powerauth-webflow-customization) from GitHub. | ||
- Update Web Flow resources by overriding existing texts, CSS, fonts and images or by adding additional resources. | ||
- When deploying Web Flow, configure the following Spring Boot property: | ||
|
||
```properties | ||
powerauth.webflow.page.ext-resources.location=classpath:/static/resources/ | ||
``` | ||
|
||
For example, if you placed the Web Flow customization files to `/opt/webflow/ext-resources`, set the property to: | ||
|
||
```properties | ||
powerauth.webflow.page.ext-resources.location=file:/opt/webflow/ext-resources | ||
``` | ||
|
||
See the documentation of your container for configuration of properties. | ||
|
||
## Customizing Web Flow Texts | ||
|
||
Web Flow texts are stored in `ext-resources/message_[lang].properties` files, see: | ||
|
||
- [ext-resources/messages_en.properties](../ext-resources/messages_en.properties) | ||
|
||
- [ext-resources/messages_cs.properties](../ext-resources/messages_cs.properties) | ||
|
||
After you make a copy of the `powerauth-webflow-customization` project, you can update the texts and deploy changes to the folder `/path/to/your/ext-resources`. | ||
|
||
## Customizing Web Flow CSS Styles | ||
|
||
Web Flow CSS files are stored in `ext-resources/css` folder, see: | ||
|
||
- [ext-resources/css](../ext-resources/css) | ||
|
||
After you make a copy of the `powerauth-webflow-customization` project, you can update the CSS and deploy changes to the folder `/path/to/your/ext-resources/css`. Make sure to only edit the `customization.css` file. We may change CSS in `base.css` file at any time and you would have to migrate the changes we made to your customization. | ||
|
||
## Customizing Web Flow Images | ||
|
||
Web Flow images are stored in `ext-resources/images` folder, see: | ||
|
||
- [ext-resources/images](../ext-resources/images) | ||
|
||
After you make a copy of the `powerauth-webflow-customization` project, you can update the images and deploy changes to the folder `/path/to/your/ext-resources/css`. | ||
|
||
You can also add new images and configure these images in overridden CSS files. | ||
|
||
## Customizing Web Flow Fonts | ||
|
||
Additional fonts for Web Flow can be stored in `ext-resources/fonts` folder, see: | ||
- [ext-resources/fonts](../ext-resources/fonts) | ||
|
||
After you make a copy of the `powerauth-webflow-customization` project, you can add new fonts to the folder `/path/to/your/ext-resources/fonts` and update the `customization.css` file (see above) to use the added fonts in Web Flow. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# PowerAuth Web Flow Customization | ||
|
||
The purpose of this project is to provide client specific customization, such as adapting to client backend APIs, CSS customization, updated texts, images, fonts and other changes required for customizing Web Flow for clients. | ||
|
||
Web Flow can be customized in following areas: | ||
|
||
- Appearance (texts, CSS, fonts and images) - chapter [Customizing Web Flow Appearance](./Customizing-Web-Flow-Appearance.md) | ||
- Integration with clients backends - chapter [Implementing the Data Adapter Interface](./Implementing-the-Data-Adapter-Interface.md) | ||
|
||
Data Adapter is integrated with Web Flow using REST API. For documentation see: [Data Adapter REST API Reference](https://github.com/wultra/powerauth-webflow/blob/develop/docs/Data-Adapter-REST-API-Reference.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# Implementing the Data Adapter Interface | ||
|
||
Data Adapter is used for connecting Web Flow to client backend systems. It allows to interact with backends for user authentication, SMS authorization, read additional data required for the operation as well as notify client backend about operation changes. | ||
|
||
## DataAdapter Interface | ||
|
||
The interface methods are defined in the [DataAdapter interface](../powerauth-data-adapter/src/main/java/io/getlime/security/powerauth/app/dataadapter/api/DataAdapter.java): | ||
|
||
- [authenticateUser](../powerauth-data-adapter/src/main/java/io/getlime/security/powerauth/app/dataadapter/api/DataAdapter.java#L43) - perform user authentication with remote backend based on provided credentials | ||
- [fetchUserDetail](../powerauth-data-adapter/src/main/java/io/getlime/security/powerauth/app/dataadapter/api/DataAdapter.java#L52) - retrieve user details for given user ID | ||
- [decorateFormData](../powerauth-data-adapter/src/main/java/io/getlime/security/powerauth/app/dataadapter/api/DataAdapter.java#L62) - retrieve operation form data and decorate it | ||
- [formDataChangedNotification](../powerauth-data-adapter/src/main/java/io/getlime/security/powerauth/app/dataadapter/api/DataAdapter.java#L71) - method is called when operation form data changes to allow notification of client backends | ||
- [operationChangedNotification](../powerauth-data-adapter/src/main/java/io/getlime/security/powerauth/app/dataadapter/api/DataAdapter.java#L80) - method is called when operation status changes to allow notification of client backends | ||
- [generateAuthorizationCode](../powerauth-data-adapter/src/main/java/io/getlime/security/powerauth/app/dataadapter/api/DataAdapter.java#L89) - generate authorization code for authorization SMS message | ||
- [generateSMSText](../powerauth-data-adapter/src/main/java/io/getlime/security/powerauth/app/dataadapter/api/DataAdapter.java#L100) - generate SMS text for authorization SMS message | ||
- [sendAuthorizationSMS](../powerauth-data-adapter/src/main/java/io/getlime/security/powerauth/app/dataadapter/api/DataAdapter.java#L110) - send authorization SMS message | ||
|
||
## Customizing Data Adapter | ||
|
||
Following steps are required for customization of Data Adapter. | ||
|
||
### 1. Implement Interface Methods | ||
|
||
Consider which of the following methods need to be implemented in your project: | ||
|
||
- [authenticateUser](../powerauth-data-adapter/src/main/java/io/getlime/security/powerauth/app/dataadapter/api/DataAdapter.java#L43) (optional) - implementation is required in case any Web Flow operation needs to authenticate the user using a username/password login form | ||
- [fetchUserDetail](../powerauth-data-adapter/src/main/java/io/getlime/security/powerauth/app/dataadapter/api/DataAdapter.java#L52) (required) - provides information about the user (user ID and name) for the OAuth 2.0 protocol | ||
- [decorateFormData](../powerauth-data-adapter/src/main/java/io/getlime/security/powerauth/app/dataadapter/api/DataAdapter.java#L62) (optional) - implementation is required in case any Web Flow operation form data needs to be updated after authentication (e.g. add information about user bank accounts) | ||
- [formDataChangedNotification](../powerauth-data-adapter/src/main/java/io/getlime/security/powerauth/app/dataadapter/api/DataAdapter.java#L71) (optional) - implementation is required in case the client backends need to be notified about user input during an operation | ||
- [operationChangedNotification](../powerauth-data-adapter/src/main/java/io/getlime/security/powerauth/app/dataadapter/api/DataAdapter.java#L80) (optional) - implementation is required in case the client backends need to be notified about operation status changes | ||
- [generateAuthorizationCode](../powerauth-data-adapter/src/main/java/io/getlime/security/powerauth/app/dataadapter/api/DataAdapter.java#L89) (optional) - implementation is required in case any Web Flow operation needs to authorize the user using SMS authorization | ||
- [generateSMSText](../powerauth-data-adapter/src/main/java/io/getlime/security/powerauth/app/dataadapter/api/DataAdapter.java#L100) (optional) - implementation is required in case any Web Flow operation needs to authorize the user using SMS authorization | ||
- [sendAuthorizationSMS](../powerauth-data-adapter/src/main/java/io/getlime/security/powerauth/app/dataadapter/api/DataAdapter.java#L110) (optional) - implementation is required in case any Web Flow operation needs to authorize the user using SMS authorization | ||
|
||
### 2. Implement the `DataAdapter` Interface | ||
|
||
Implement the actual changes in Data Adapter so that it connects to an actual data source. | ||
|
||
- Clone project [powerauth-webflow-customization](https://github.com/wultra/powerauth-webflow-customization) from GitHub. | ||
- Update the `pom.xml` to add any required additional dependencies. | ||
- Create a proprietary client (+ client config) for your web services. | ||
- Implement the Data Adapter interface by providing your own implementation in the [DataAdapterService class](../powerauth-data-adapter/src/main/java/io/getlime/security/powerauth/app/dataadapter/impl/service/DataAdapterService.java). You can override the sample implementation. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
**Customizing Web Flow** | ||
|
||
- [Home](./Home.md) | ||
- [Customizing Web Flow Appearance](./Customizing-Web-Flow-Appearance.md) | ||
- [Implementing Data Adapter Interface](./Implementing-the-Data-Adapter-Interface.md) | ||
- [Data Adapter REST API Reference](https://github.com/wultra/powerauth-webflow/blob/develop/docs/Data-Adapter-REST-API-Reference.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.