The 3rd generation of a SeaCat client for Android.
Installation from GitHub
The installation procedure has been inspired by this blog article. We assume that your Android project is managed by Git version control system.
-
From Android Studio project terminal add git sub-module
git submodule add https://github.com/TeskaLabs/SeaCat-Android-G3.git
-
Open Android Studio > File menu > Project Structure...
-
Go to "Modules" and hit "+" (aka New Module)
-
Select "Import Gradle Project"
-
Select "Source directory", it is "SeaCat-Android-G3" folder in your project.
-
Unselect "demo" checkbox.
-
Press "Finish".
-
Wait for Gradle to finish.
-
Stay in "Project Structure" dialog, go to "Dependencies". select your application and "+" (aka Add Dependency)
-
Select "Module Dependency"
-
Select "seacat" and press "OK"
- Press "OK" to close "Project Structure" dialog.
- The SeaCat client has been added to your project, please continue to a "Quick start" chapter.
-
SeaCat client needs to be initialized in your application class.
Kotlin:
... import com.teskalabs.seacat.SeaCat ... class MyApplication : Application() { ... lateinit var seacat: SeaCat ... override fun onCreate() { ... seacat = SeaCat(this, "https://pki.seacat.io/seacat-demo/seacat") ... } }
Remark:
https://pki.seacat.io/seacat-demo/seacat
is a public demo instance of the SeaCat PKI. -
Test
Make URL request to SeaCat gateway at https://seacat-demo.seacat.io/hello
- 200 means that all is good and the client is authenticated by SeaCat
- 403 means that the authentication failed (the client is untrusted by a gateway)