Step 1. Add the JitPack repository to your build file
Add it in your root settings.gradle at the end of repositories:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
maven { url 'https://jitpack.io' }
}
}
Add it in your settings.gradle.kts at the end of repositories:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
maven { url = uri("https://jitpack.io") }
}
}
Add to pom.xml
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
Add it in your build.sbt at the end of resolvers:
resolvers += "jitpack" at "https://jitpack.io"
Add it in your project.clj at the end of repositories:
:repositories [["jitpack" "https://jitpack.io"]]
Step 2. Add the dependency
dependencies {
implementation 'com.github.realm:realm-android-user-store:v1.0.1'
}
dependencies {
implementation("com.github.realm:realm-android-user-store:v1.0.1")
}
<dependency>
<groupId>com.github.realm</groupId>
<artifactId>realm-android-user-store</artifactId>
<version>v1.0.1</version>
</dependency>
libraryDependencies += "com.github.realm" % "realm-android-user-store" % "v1.0.1"
:dependencies [[com.github.realm/realm-android-user-store "v1.0.1"]]
Realm is a mobile database that runs directly inside phones, tablets or wearables.
This repository holds the library to allow Sync client under Android Realm Object Server to encrypt the
token saved in SharedPreferences
, once the user is authenticated. The encryption uses the Android KeyStore available
to generate and uses RSA
and AES
keys for encryption operations.
This library only works together with Realm Java. Please see the detailed instructions in our docs to add Realm to your project.
To add the this library to your project, add the following to you app's dependencies:
repositories {
jcenter()
}
dependencies {
compile 'io.realm:secure-userstore:1.0.1'
}
This library is only compatible with Realm Java 0.90 and above.
Documentation for Realm can be found at realm.io/docs/java. The API reference is located at realm.io/docs/java/api.
If you want to test recent bugfixes or features that have not been packaged in an official release yet, you can use a -SNAPSHOT release of the current development version of Realm via Gradle, available on OJO
repositories {
maven {
url 'http://oss.jfrog.org/artifactory/oss-snapshot-local'
}
}
dependencies {
compile 'io.realm:secure-userstore:<version>'
}
See version.txt for the latest version number.
In case you don't want to use the precompiled version, you can build the library yourself from source.
Prerequisites:
Once you have completed all the pre-requisites building the library is done with a simple command
./gradlew assemble
That command will generate:
aar
file for the library in app/build/outputs/aar/android-sync-user-encryption-release.aar
you can also install the aar
into your local maven repository.
./gradlew publishAARPublicationToMavenLocal
See CONTRIBUTING.md for more details!
This project adheres to the Contributor Covenant Code of Conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to info@realm.io.
Realm Sync User Encryption is published under the Apache 2.0 license.
If you use Realm or the library and are happy with it, all we ask is that you please consider sending out a tweet mentioning @realm, or email help@realm.io to let us know about it!
And if you don't like it, please let us know what you would like improved, so we can fix it!