Loading app/src/main/java/at/bitfire/davdroid/authorization/IdentityProvider.java +11 −0 Original line number Diff line number Diff line Loading @@ -44,15 +44,26 @@ public class IdentityProvider { null ); @Nullable private final Uri mDiscoveryEndpoint; @Nullable private final Uri mAuthEndpoint; @Nullable private final Uri mTokenEndpoint; @NonNull private final String mClientId; @Nullable private final String mClientSecret; @NonNull private final Uri mRedirectUri; @Nullable private final String mScope; @Nullable private final String mUserInfoEndpoint; IdentityProvider( Loading app/src/main/java/at/bitfire/davdroid/syncadapter/CalendarsSyncAdapterService.kt +9 −6 Original line number Diff line number Diff line Loading @@ -53,11 +53,10 @@ open class CalendarsSyncAdapterService : SyncAdapterService() { - sync conditions (e.g. "sync only in WiFi") are not met AND - this is is an automatic sync (i.e. manual syncs are run regardless of sync conditions) */ if (!extras.containsKey(ContentResolver.SYNC_EXTRAS_MANUAL) && !checkSyncConditions( accountSettings ) ) if (!extras.containsKey(ContentResolver.SYNC_EXTRAS_MANUAL) && !checkSyncConditions(accountSettings)) { return } if (accountSettings.getEventColors()) AndroidCalendar.insertColors(provider, account) Loading Loading @@ -93,9 +92,13 @@ open class CalendarsSyncAdapterService : SyncAdapterService() { if (authState.needsTokenRefresh) { val tokenRequest = authState.createTokenRefreshRequest() val clientSecretString = accountSettings.credentials().clientSecret val clientSecret = OpenIdUtils.getClientAuthentication(clientSecretString) val clientSecret = OpenIdUtils.getClientAuthentication(clientSecretString) AuthorizationService(context).performTokenRequest(tokenRequest, clientSecret) { tokenResponse, ex -> AuthorizationService(context).performTokenRequest( tokenRequest, clientSecret ) { tokenResponse, ex -> authState.update(tokenResponse, ex) accountSettings.credentials( Credentials( Loading Loading
app/src/main/java/at/bitfire/davdroid/authorization/IdentityProvider.java +11 −0 Original line number Diff line number Diff line Loading @@ -44,15 +44,26 @@ public class IdentityProvider { null ); @Nullable private final Uri mDiscoveryEndpoint; @Nullable private final Uri mAuthEndpoint; @Nullable private final Uri mTokenEndpoint; @NonNull private final String mClientId; @Nullable private final String mClientSecret; @NonNull private final Uri mRedirectUri; @Nullable private final String mScope; @Nullable private final String mUserInfoEndpoint; IdentityProvider( Loading
app/src/main/java/at/bitfire/davdroid/syncadapter/CalendarsSyncAdapterService.kt +9 −6 Original line number Diff line number Diff line Loading @@ -53,11 +53,10 @@ open class CalendarsSyncAdapterService : SyncAdapterService() { - sync conditions (e.g. "sync only in WiFi") are not met AND - this is is an automatic sync (i.e. manual syncs are run regardless of sync conditions) */ if (!extras.containsKey(ContentResolver.SYNC_EXTRAS_MANUAL) && !checkSyncConditions( accountSettings ) ) if (!extras.containsKey(ContentResolver.SYNC_EXTRAS_MANUAL) && !checkSyncConditions(accountSettings)) { return } if (accountSettings.getEventColors()) AndroidCalendar.insertColors(provider, account) Loading Loading @@ -93,9 +92,13 @@ open class CalendarsSyncAdapterService : SyncAdapterService() { if (authState.needsTokenRefresh) { val tokenRequest = authState.createTokenRefreshRequest() val clientSecretString = accountSettings.credentials().clientSecret val clientSecret = OpenIdUtils.getClientAuthentication(clientSecretString) val clientSecret = OpenIdUtils.getClientAuthentication(clientSecretString) AuthorizationService(context).performTokenRequest(tokenRequest, clientSecret) { tokenResponse, ex -> AuthorizationService(context).performTokenRequest( tokenRequest, clientSecret ) { tokenResponse, ex -> authState.update(tokenResponse, ex) accountSettings.credentials( Credentials( Loading