├── Example ├── .gitignore ├── src │ └── main │ │ ├── res │ │ ├── values │ │ │ ├── strings.xml │ │ │ ├── colors.xml │ │ │ └── styles.xml │ │ ├── mipmap-hdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ ├── mipmap-mdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ ├── mipmap-xhdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxhdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxxhdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ ├── mipmap-anydpi-v26 │ │ │ ├── ic_launcher.xml │ │ │ └── ic_launcher_round.xml │ │ ├── layout │ │ │ ├── fragment_main_activity.xml │ │ │ ├── fragment_main.xml │ │ │ ├── activity_login.xml │ │ │ └── activity_main.xml │ │ ├── drawable-v24 │ │ │ └── ic_launcher_foreground.xml │ │ └── drawable │ │ │ └── ic_launcher_background.xml │ │ ├── java │ │ └── com │ │ │ └── infomaniak │ │ │ └── login │ │ │ └── example │ │ │ ├── FragmentMainActivity.kt │ │ │ ├── FragmentMainFragment.kt │ │ │ ├── LoginActivity.kt │ │ │ └── MainActivity.kt │ │ └── AndroidManifest.xml ├── proguard-rules.pro └── build.gradle ├── Library ├── .gitignore ├── src │ └── main │ │ ├── res │ │ ├── values │ │ │ ├── values.xml │ │ │ └── strings.xml │ │ ├── menu │ │ │ └── webview_menu.xml │ │ ├── values-es │ │ │ └── strings.xml │ │ ├── values-de │ │ │ └── strings.xml │ │ ├── values-it │ │ │ └── strings.xml │ │ ├── drawable │ │ │ └── ic_baseline_close.xml │ │ ├── values-fr │ │ │ └── strings.xml │ │ └── layout │ │ │ └── activity_web_view_login.xml │ │ └── java │ │ └── com │ │ └── infomaniak │ │ └── lib │ │ └── login │ │ ├── ApiToken.kt │ │ ├── WebViewUtils.kt │ │ ├── ProgressWebChromeClient.kt │ │ ├── ext │ │ ├── BindingExt.kt │ │ └── OkHttpClientExt.kt │ │ ├── WebViewLoginActivity.kt │ │ ├── WebViewCreateAccountActivity.kt │ │ ├── LoginWebViewClient.kt │ │ └── InfomaniakLogin.kt ├── proguard-rules.pro └── build.gradle ├── jitpack.yml ├── gradle ├── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties └── libs.versions.toml ├── .idea ├── copyright │ ├── profiles_settings.xml │ └── Infomaniak_Open_Source.xml └── codeStyles │ ├── codeStyleConfig.xml │ └── Project.xml ├── .gitignore ├── gradle.properties ├── settings.gradle ├── gradlew.bat ├── README.md ├── gradlew └── LICENSE /Example/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /Library/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /jitpack.yml: -------------------------------------------------------------------------------- 1 | jdk: 2 | - openjdk17 3 | -------------------------------------------------------------------------------- /Example/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | Login Example 3 | 4 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infomaniak/android-login/master/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /.idea/copyright/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea 5 | .DS_Store 6 | /build 7 | /captures 8 | .externalNativeBuild 9 | .cxx 10 | -------------------------------------------------------------------------------- /Example/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infomaniak/android-login/master/Example/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /Example/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infomaniak/android-login/master/Example/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /Example/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infomaniak/android-login/master/Example/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /Example/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infomaniak/android-login/master/Example/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /Example/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infomaniak/android-login/master/Example/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /Example/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infomaniak/android-login/master/Example/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /Example/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infomaniak/android-login/master/Example/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /Example/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infomaniak/android-login/master/Example/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /Example/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infomaniak/android-login/master/Example/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /Example/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infomaniak/android-login/master/Example/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /.idea/codeStyles/codeStyleConfig.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536m 2 | android.useAndroidX=true 3 | android.enableJetifier=true 4 | kotlin.code.style=official 5 | android.nonTransitiveRClass=false 6 | android.nonFinalResIds=false 7 | -------------------------------------------------------------------------------- /Library/src/main/res/values/values.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Example/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #6200EE 4 | #3700B3 5 | #03DAC5 6 | 7 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Thu Dec 10 12:28:33 CET 2020 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip 7 | -------------------------------------------------------------------------------- /Example/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Example/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Example/src/main/res/layout/fragment_main_activity.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Library/src/main/res/menu/webview_menu.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 10 | 11 | -------------------------------------------------------------------------------- /Library/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Access denied 4 | 5 | An error has occurred 6 | Internet connection problem 7 | Create an account 8 | Login 9 | 10 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | pluginManagement { 2 | repositories { 3 | gradlePluginPortal() 4 | google() 5 | mavenCentral() 6 | } 7 | } 8 | 9 | dependencyResolutionManagement { 10 | repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) 11 | repositories { 12 | google() 13 | mavenCentral() 14 | } 15 | } 16 | 17 | rootProject.name = 'android-login' 18 | include ':Library', ':Example' 19 | -------------------------------------------------------------------------------- /Library/src/main/res/values-es/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Acceso rechazado 4 | 5 | Se produjo un error 6 | Problema de conexión a Internet 7 | Crear una cuenta 8 | Ingresa en 9 | 10 | -------------------------------------------------------------------------------- /Library/src/main/res/values-de/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Zugang verweigert 4 | 5 | Ein Fehler ist aufgetreten 6 | Internet-Verbindungsproblem 7 | Ein Konto erstellen 8 | Anmeldung 9 | 10 | -------------------------------------------------------------------------------- /Library/src/main/res/values-it/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Accesso rifiutato 4 | 5 | Si è verificato un errore 6 | Problema di connessione a Internet 7 | Creare un account 8 | Accesso 9 | 10 | -------------------------------------------------------------------------------- /Library/src/main/res/drawable/ic_baseline_close.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /Example/src/main/java/com/infomaniak/login/example/FragmentMainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.infomaniak.login.example 2 | 3 | import android.os.Bundle 4 | import androidx.appcompat.app.AppCompatActivity 5 | 6 | class FragmentMainActivity : AppCompatActivity() { 7 | 8 | override fun onCreate(savedInstanceState: Bundle?) { 9 | super.onCreate(savedInstanceState) 10 | setContentView(R.layout.fragment_main_activity) 11 | if (savedInstanceState == null) { 12 | supportFragmentManager.beginTransaction() 13 | .replace(R.id.container, FragmentMainFragment.newInstance()) 14 | .commitNow() 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /Library/src/main/java/com/infomaniak/lib/login/ApiToken.kt: -------------------------------------------------------------------------------- 1 | package com.infomaniak.lib.login 2 | 3 | import android.os.Parcelable 4 | import kotlinx.parcelize.Parcelize 5 | import kotlinx.serialization.SerialName 6 | import kotlinx.serialization.Serializable 7 | 8 | @Parcelize 9 | @Serializable 10 | data class ApiToken( 11 | @SerialName("access_token") val accessToken: String, 12 | @SerialName("refresh_token") val refreshToken: String? = null, 13 | @SerialName("token_type") val tokenType: String, 14 | @SerialName("expires_in") val expiresIn: Int = 7200, 15 | @SerialName("user_id") val userId: Int, 16 | @SerialName("scope") val scope: String? = null, 17 | @Transient var expiresAt: Long? = null 18 | ) : Parcelable 19 | -------------------------------------------------------------------------------- /Example/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 12 | 13 | 17 | 18 | -------------------------------------------------------------------------------- /Example/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile 22 | -------------------------------------------------------------------------------- /Library/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile 22 | -------------------------------------------------------------------------------- /Example/src/main/res/layout/fragment_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 |