A demo web application that authenticates users via Wultra Mobile Token.
- Install JDK 11
- Install Maven 3.6
- Install PostgreSQL 13.5
- Create an API Key at https://sendgrid.com/
- Get credentials to the Wultra Mobile Token API
- Clone this repository
- Run
mvn clean package spring-boot:repackage
- Configure the following application properties:
email.email-verification.body
to the body of the sent email verification emails in the format of a MessageFormat pattern with a single format element representing a UUID verification code (e.g.Your email verification link is: http://example.com?code={0}.
)email.from.address
to the email address of the sent emails' sendersendgrid.api-key
to the SendGrid API Keyspring.datasource.url
to the URL of the PostgreSQL databasespring.datasource.username
to the name of the PostgreSQL userspring.datasource.password
to the password of the PostgreSQL userwultra-mtoken.rest.root-uri
to the base URL of the Wultra Mobile Token APIwultra-mtoken.rest.username
to the name of the Wultra Mobile Token API userwultra-mtoken.rest.password
to the password of the Wultra Mobile Token API user- optionally,
accesstoken.bytes
to the length of access tokens in bytes before encoding to Base64 - optionally,
accesstoken.validity
to the validity of access tokens in seconds - optionally,
cors.allowed-origins
to the origins for which cross-origin requests are allowed from a browser - optionally,
email.email-verification.subject
to the subject of the sent email verification emails - optionally,
email.from.name
to the display name of the sent emails' sender
- Run
java -jar target/mtoken-0.0.1-SNAPSHOT.jar
The documentation is available at the Wultra Developer Portal.
All sources are licensed using the Apache 2.0 license. You can use them with no restrictions.
If you need any assistance, do not hesitate to drop us a line at [email protected] or our official gitter.im/wultra channel.