diff --git a/libs/fluxc/src/main/java/org/wordpress/android/fluxc/network/rest/wpapi/WPcomLoginClient.kt b/libs/fluxc/src/main/java/org/wordpress/android/fluxc/network/rest/wpapi/WPcomLoginClient.kt index 7104eee54a75..8ae0f0f8814b 100644 --- a/libs/fluxc/src/main/java/org/wordpress/android/fluxc/network/rest/wpapi/WPcomLoginClient.kt +++ b/libs/fluxc/src/main/java/org/wordpress/android/fluxc/network/rest/wpapi/WPcomLoginClient.kt @@ -63,7 +63,7 @@ class WPcomLoginClient @Inject constructor( } else { val json = response.body?.string() ?: return@withContext Result.failure(WPcomLoginError.InvalidResponse) val gson = Gson().fromJson(json, WPcomAuthorizationCodeResponse::class.java) - Result.success(gson.access_token) + Result.success(gson.accessToken) } } } diff --git a/libs/fluxc/src/main/java/org/wordpress/android/fluxc/network/rest/wpapi/applicationpasswords/WPcomAuthorizationCodeResponse.kt b/libs/fluxc/src/main/java/org/wordpress/android/fluxc/network/rest/wpapi/applicationpasswords/WPcomAuthorizationCodeResponse.kt index 6b604e78beb5..0a4f368b9420 100644 --- a/libs/fluxc/src/main/java/org/wordpress/android/fluxc/network/rest/wpapi/applicationpasswords/WPcomAuthorizationCodeResponse.kt +++ b/libs/fluxc/src/main/java/org/wordpress/android/fluxc/network/rest/wpapi/applicationpasswords/WPcomAuthorizationCodeResponse.kt @@ -1,9 +1,11 @@ package org.wordpress.android.fluxc.network.rest.wpapi.applicationpasswords +import com.google.gson.annotations.SerializedName + data class WPcomAuthorizationCodeResponse( - val access_token: String, - val token_type: String, - val blog_id: String, - val blog_url: String, + @SerializedName("access_token") val accessToken: String, + @SerializedName("token_type") val tokenType: String, + @SerializedName("blog_id") val blogId: String, + @SerializedName("blog_url") val blogUrl: String, val scope: String )