Skip to content

Commit

Permalink
fixed code error
Browse files Browse the repository at this point in the history
  • Loading branch information
aman-alfresco committed Nov 29, 2024
1 parent 2d29ea1 commit 2e856fa
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 4 additions & 1 deletion auth/src/main/java/com/alfresco/auth/DiscoveryService.kt
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,10 @@ class DiscoveryService(
/**
* Return content service url based on [endpoint].
*/
fun contentServiceUrl(endpoint: String, authType: AuthTypeProvider): Uri =
fun contentServiceUrl(
endpoint: String,
authType: AuthTypeProvider = AuthTypeProvider.NONE
): Uri =
PkceAuthService.endpointWith(endpoint, authConfig)
.buildUpon()
.appendPath(if (authType == AuthTypeProvider.NEW_IDP) "alfresco" else authConfig.contentServicePath)
Expand Down
4 changes: 3 additions & 1 deletion sample/src/main/java/com/alfresco/sample/LoginActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ import androidx.lifecycle.ViewModel
import androidx.lifecycle.ViewModelProvider
import com.alfresco.auth.AuthConfig
import com.alfresco.auth.AuthType
import com.alfresco.auth.AuthTypeProvider
import com.alfresco.auth.Credentials
import com.alfresco.auth.data.OAuth2Data
import com.alfresco.auth.ui.AuthenticationActivity
import com.alfresco.auth.ui.AuthenticationViewModel
import com.alfresco.sample.databinding.ActivityLoginBinding
Expand All @@ -32,7 +34,7 @@ class LoginViewModel(override var context: Context) : AuthenticationViewModel()
}
}

private fun onAuthType(authType: AuthType) {
private fun onAuthType(authType: AuthType, oAuth2Data: OAuth2Data?) {
if (authType == AuthType.PKCE) {
pkceLogin(server, AuthConfig.defaultConfig)
} else {
Expand Down

0 comments on commit 2e856fa

Please sign in to comment.