Java Mobile-ID interface for Estonia/Lithuania
Java Shell Batchfile
Latest commit cb665e7 Nov 20, 2015 @asolntsev asolntsev add logo
Failed to load latest commit information.
gradle-wrapper upgrade to gradle 2.7 Oct 8, 2015
test Fixed sample application. The URL to test service has changed and cor… Oct 7, 2015
.gitattributes defining jks files as binary Jan 25, 2012
.gitignore upgraded to gradle 2.1 Sep 11, 2014
LICENSE change license to less restrictive MIT Nov 16, 2015


Mobile-ID (Mobiil-ID) is a personal mobile identity in Estonia and Lithuania, provided by an additional application on a SIM card. The good thing is that it is backed by government and provides the same level of security for authentication and digital signatures as a national ID card without the need of having a smart card reader.

Java and Mobile-ID

The official Mobile-ID API is a SOAP web service, so it usually takes time to generate the code and start using it in a Java application.

This small library tries to solve this problem: just add the mobileid.jar (with dependencies) to your project and you have a working Mobile-ID support. It already contains all the generated classes (by axis v1) as well as a simplified API of our own.

The same jar works in Scala as well or any other JVM-based language.

You can also use Maven/Ivy/Gradle/SBT or your favorite dependency manager that can fetch jars from the official Maven2 repo:

com.codeborne :: mobileid


Just use the public methods in MobileIDAuthenticator class:

  • startLogin(phoneNumber) - to initiate the login session, which will send a flash message to your mobile phone. The returned MobileIDSession contains the challenge code that you need to display to the user.
  • waitForLogin(session) - to wait until user finally signs the challenge. This is a blocking call for simplicity.
  • isLoginComplete(session) - if you want to do polling from the client side

See working example in - run the main() method.


Many thanks to these incredible tools that help us creating open-source software:

Intellij IDEA

YourKit Java profiler


mobile-id is open-source project and distributed under MIT license

Build Status