Loading .gitlab-ci.yml +3 −0 Original line number Diff line number Diff line Loading @@ -6,6 +6,9 @@ stages: before_script: - echo email.key=$PEPPER >> local.properties - echo MURENA_CLIENT_ID=$MURENA_CLIENT_ID >> local.properties - echo MURENA_CLIENT_SECRET=$MURENA_CLIENT_SECRET >> local.properties - echo MURENA_REDIRECT_URI=$MURENA_REDIRECT_URI >> local.properties - echo GOOGLE_CLIENT_ID=$GOOGLE_CLIENT_ID >> local.properties - echo GOOGLE_REDIRECT_URI=$GOOGLE_REDIRECT_URI >> local.properties - echo YAHOO_CLIENT_ID=$YAHOO_CLIENT_ID >> local.properties Loading app/build.gradle +6 −1 Original line number Diff line number Diff line Loading @@ -108,6 +108,10 @@ android { } defaultConfig { buildConfigField "String", "MURENA_CLIENT_ID", "\"${retrieveKey("MURENA_CLIENT_ID")}\"" buildConfigField "String", "MURENA_CLIENT_SECRET", "\"${retrieveKey("MURENA_CLIENT_SECRET")}\"" buildConfigField "String", "MURENA_REDIRECT_URI", "\"${retrieveKey("MURENA_REDIRECT_URI")}\"" buildConfigField "String", "GOOGLE_CLIENT_ID", "\"${retrieveKey("GOOGLE_CLIENT_ID")}\"" buildConfigField "String", "GOOGLE_REDIRECT_URI", "\"${retrieveKey("GOOGLE_REDIRECT_URI")}\"" Loading @@ -115,7 +119,8 @@ android { manifestPlaceholders = [ 'appAuthRedirectScheme': applicationId, "googleAuthRedirectScheme": retrieveKey("GOOGLE_REDIRECT_URI") "googleAuthRedirectScheme": retrieveKey("GOOGLE_REDIRECT_URI"), "murenaAuthRedirectScheme": retrieveKey("MURENA_REDIRECT_URI") ] } Loading app/src/main/AndroidManifest.xml +1 −0 Original line number Diff line number Diff line Loading @@ -677,6 +677,7 @@ <data android:scheme="${appAuthRedirectScheme}" /> <data android:scheme="${googleAuthRedirectScheme}" /> <data android:scheme="${murenaAuthRedirectScheme}" /> </intent-filter> </activity> Loading app/src/main/java/at/bitfire/davdroid/authorization/IdentityProvider.java +11 −0 Original line number Diff line number Diff line Loading @@ -33,6 +33,17 @@ import at.bitfire.davdroid.BuildConfig; */ public class IdentityProvider { public static final IdentityProvider MURENA = new IdentityProvider( "https://accounts.eeo.one/auth/realms/eeo.one/.well-known/openid-configuration", null, null, BuildConfig.MURENA_CLIENT_ID, BuildConfig.MURENA_CLIENT_SECRET, BuildConfig.MURENA_REDIRECT_URI + ":/redirect", "openid address profile email phone roles offline_access web-origins microprofile-jwt", null ); public static final IdentityProvider GOOGLE = new IdentityProvider( "https://accounts.google.com/.well-known/openid-configuration", null, Loading app/src/main/java/at/bitfire/davdroid/network/HttpClient.kt +27 −4 Original line number Diff line number Diff line Loading @@ -156,10 +156,9 @@ class HttpClient private constructor( } // use account settings for authentication and cookies if (accountSettings != null) addAuthentication(null, accountSettings.credentials(), authStateCallback = { authState: AuthState -> accountSettings.credentials(Credentials(authState = authState)) }) if (accountSettings != null) { addAuthentication(accountSettings) } } constructor(context: Context, host: String?, credentials: Credentials?) : this(context) { Loading @@ -167,6 +166,30 @@ class HttpClient private constructor( addAuthentication(host, credentials) } private fun addAuthentication(accountSettings: AccountSettings) { val credential = accountSettings.credentials() addAuthentication( null, credential, authStateCallback = { authState: AuthState -> updateCredentials(accountSettings, authState, credential.clientSecret) }) } private fun updateCredentials( accountSettings: AccountSettings, authState: AuthState, clientSecret: String? ) { accountSettings.credentials( Credentials( authState = authState, clientSecret = clientSecret ) ) } fun addAuthentication(host: String?, credentials: Credentials, insecurePreemptive: Boolean = false, authStateCallback: BearerAuthInterceptor.AuthStateUpdateCallback? = null): Builder { if (credentials.userName != null && credentials.password != null) { val authHandler = BasicDigestAuthHandler(UrlUtils.hostToDomain(host), credentials.userName, credentials.password, insecurePreemptive) Loading Loading
.gitlab-ci.yml +3 −0 Original line number Diff line number Diff line Loading @@ -6,6 +6,9 @@ stages: before_script: - echo email.key=$PEPPER >> local.properties - echo MURENA_CLIENT_ID=$MURENA_CLIENT_ID >> local.properties - echo MURENA_CLIENT_SECRET=$MURENA_CLIENT_SECRET >> local.properties - echo MURENA_REDIRECT_URI=$MURENA_REDIRECT_URI >> local.properties - echo GOOGLE_CLIENT_ID=$GOOGLE_CLIENT_ID >> local.properties - echo GOOGLE_REDIRECT_URI=$GOOGLE_REDIRECT_URI >> local.properties - echo YAHOO_CLIENT_ID=$YAHOO_CLIENT_ID >> local.properties Loading
app/build.gradle +6 −1 Original line number Diff line number Diff line Loading @@ -108,6 +108,10 @@ android { } defaultConfig { buildConfigField "String", "MURENA_CLIENT_ID", "\"${retrieveKey("MURENA_CLIENT_ID")}\"" buildConfigField "String", "MURENA_CLIENT_SECRET", "\"${retrieveKey("MURENA_CLIENT_SECRET")}\"" buildConfigField "String", "MURENA_REDIRECT_URI", "\"${retrieveKey("MURENA_REDIRECT_URI")}\"" buildConfigField "String", "GOOGLE_CLIENT_ID", "\"${retrieveKey("GOOGLE_CLIENT_ID")}\"" buildConfigField "String", "GOOGLE_REDIRECT_URI", "\"${retrieveKey("GOOGLE_REDIRECT_URI")}\"" Loading @@ -115,7 +119,8 @@ android { manifestPlaceholders = [ 'appAuthRedirectScheme': applicationId, "googleAuthRedirectScheme": retrieveKey("GOOGLE_REDIRECT_URI") "googleAuthRedirectScheme": retrieveKey("GOOGLE_REDIRECT_URI"), "murenaAuthRedirectScheme": retrieveKey("MURENA_REDIRECT_URI") ] } Loading
app/src/main/AndroidManifest.xml +1 −0 Original line number Diff line number Diff line Loading @@ -677,6 +677,7 @@ <data android:scheme="${appAuthRedirectScheme}" /> <data android:scheme="${googleAuthRedirectScheme}" /> <data android:scheme="${murenaAuthRedirectScheme}" /> </intent-filter> </activity> Loading
app/src/main/java/at/bitfire/davdroid/authorization/IdentityProvider.java +11 −0 Original line number Diff line number Diff line Loading @@ -33,6 +33,17 @@ import at.bitfire.davdroid.BuildConfig; */ public class IdentityProvider { public static final IdentityProvider MURENA = new IdentityProvider( "https://accounts.eeo.one/auth/realms/eeo.one/.well-known/openid-configuration", null, null, BuildConfig.MURENA_CLIENT_ID, BuildConfig.MURENA_CLIENT_SECRET, BuildConfig.MURENA_REDIRECT_URI + ":/redirect", "openid address profile email phone roles offline_access web-origins microprofile-jwt", null ); public static final IdentityProvider GOOGLE = new IdentityProvider( "https://accounts.google.com/.well-known/openid-configuration", null, Loading
app/src/main/java/at/bitfire/davdroid/network/HttpClient.kt +27 −4 Original line number Diff line number Diff line Loading @@ -156,10 +156,9 @@ class HttpClient private constructor( } // use account settings for authentication and cookies if (accountSettings != null) addAuthentication(null, accountSettings.credentials(), authStateCallback = { authState: AuthState -> accountSettings.credentials(Credentials(authState = authState)) }) if (accountSettings != null) { addAuthentication(accountSettings) } } constructor(context: Context, host: String?, credentials: Credentials?) : this(context) { Loading @@ -167,6 +166,30 @@ class HttpClient private constructor( addAuthentication(host, credentials) } private fun addAuthentication(accountSettings: AccountSettings) { val credential = accountSettings.credentials() addAuthentication( null, credential, authStateCallback = { authState: AuthState -> updateCredentials(accountSettings, authState, credential.clientSecret) }) } private fun updateCredentials( accountSettings: AccountSettings, authState: AuthState, clientSecret: String? ) { accountSettings.credentials( Credentials( authState = authState, clientSecret = clientSecret ) ) } fun addAuthentication(host: String?, credentials: Credentials, insecurePreemptive: Boolean = false, authStateCallback: BearerAuthInterceptor.AuthStateUpdateCallback? = null): Builder { if (credentials.userName != null && credentials.password != null) { val authHandler = BasicDigestAuthHandler(UrlUtils.hostToDomain(host), credentials.userName, credentials.password, insecurePreemptive) Loading