File tree Expand file tree Collapse file tree
auth0/src/main/java/com/auth0/android/authentication/storage Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -134,6 +134,12 @@ public class CredentialsManager @VisibleForTesting(otherwise = VisibleForTesting
134134 return @execute
135135 }
136136
137+ val tokenType = storage.retrieveString(KEY_TOKEN_TYPE )
138+ validateDPoPState(tokenType)?.let { dpopError ->
139+ callback.onFailure(dpopError)
140+ return @execute
141+ }
142+
137143 val request = authenticationClient.ssoExchange(refreshToken)
138144 try {
139145 if (parameters.isNotEmpty()) {
@@ -623,7 +629,8 @@ public class CredentialsManager @VisibleForTesting(otherwise = VisibleForTesting
623629 return @execute
624630 }
625631
626- validateDPoPState(apiCredentialType)?.let { dpopError ->
632+ val tokenType = apiCredentialType ? : storage.retrieveString(KEY_TOKEN_TYPE )
633+ validateDPoPState(tokenType)?.let { dpopError ->
627634 callback.onFailure(dpopError)
628635 return @execute
629636 }
Original file line number Diff line number Diff line change @@ -282,6 +282,12 @@ public class SecureCredentialsManager @VisibleForTesting(otherwise = VisibleForT
282282 return @execute
283283 }
284284
285+ val tokenType = storage.retrieveString(KEY_TOKEN_TYPE ) ? : existingCredentials.type
286+ validateDPoPState(tokenType)?.let { dpopError ->
287+ callback.onFailure(dpopError)
288+ return @execute
289+ }
290+
285291 val request =
286292 authenticationClient.ssoExchange(existingCredentials.refreshToken)
287293 try {
@@ -1021,7 +1027,8 @@ public class SecureCredentialsManager @VisibleForTesting(otherwise = VisibleForT
10211027 return @execute
10221028 }
10231029
1024- validateDPoPState(apiCredentialType)?.let { dpopError ->
1030+ val tokenType = apiCredentialType ? : storage.retrieveString(KEY_TOKEN_TYPE ) ? : existingCredentials.type
1031+ validateDPoPState(tokenType)?.let { dpopError ->
10251032 callback.onFailure(dpopError)
10261033 return @execute
10271034 }
You can’t perform that action at this time.
0 commit comments