Skip to content

Commit

Permalink
fixed issue
Browse files Browse the repository at this point in the history
  • Loading branch information
aman-alfresco committed Dec 17, 2024
1 parent feca30c commit 46c531b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion auth/src/main/java/com/alfresco/auth/DiscoveryService.kt
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ class DiscoveryService(
*/
fun contentServiceUrl(
endpoint: String,
authType: AuthTypeProvider = AuthTypeProvider.NONE
authType: AuthTypeProvider = AuthTypeProvider.NONE,
): Uri =
PkceAuthService.endpointWith(endpoint, authConfig)
.buildUpon()
Expand Down
6 changes: 2 additions & 4 deletions auth/src/main/java/com/alfresco/auth/pkce/PkceAuthService.kt
Original file line number Diff line number Diff line change
Expand Up @@ -163,11 +163,10 @@ internal class PkceAuthService(context: Context, authState: AuthState?, authConf
authState.get().clientAuthentication
}


suspendCancellableCoroutine<String> {
authService.performTokenRequest(
authorizationResponse.createTokenExchangeRequest(),
clientAuth
clientAuth,
) { response: TokenResponse?, ex: AuthorizationException? ->
authState.get().update(response, ex)

Expand Down Expand Up @@ -257,8 +256,7 @@ internal class PkceAuthService(context: Context, authState: AuthState?, authConf
if (authConfig.authType == AuthTypeProvider.NEW_IDP) {
authConfig.scope.takeIf { it.isNotEmpty() }?.let { builder.setScope(it) }
authConfig.additionalParams.takeIf { it.isNotEmpty() }?.let { builder.setAdditionalParameters(it) }
}

}

return builder.build()
}
Expand Down

0 comments on commit 46c531b

Please sign in to comment.