This repository was archived by the owner on Mar 19, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +6
-10
lines changed
owncloudComLibrary/src/main/java/com/owncloud/android/lib/resources/oauth/services Expand file tree Collapse file tree 2 files changed +6
-10
lines changed Original file line number Diff line number Diff line change 23
23
*/
24
24
package com.owncloud.android.lib.resources.oauth.services
25
25
26
+ import com.owncloud.android.lib.common.OwnCloudClient
26
27
import com.owncloud.android.lib.common.operations.RemoteOperationResult
27
28
import com.owncloud.android.lib.resources.oauth.responses.OIDCDiscoveryResponse
28
29
29
30
interface OIDCService {
30
31
31
- fun getOIDCServerDiscovery (baseUrl : String ): RemoteOperationResult <OIDCDiscoveryResponse >
32
+ fun getOIDCServerDiscovery (ownCloudClient : OwnCloudClient ): RemoteOperationResult <OIDCDiscoveryResponse >
32
33
33
34
}
Original file line number Diff line number Diff line change 23
23
*/
24
24
package com.owncloud.android.lib.resources.oauth.services.implementation
25
25
26
- import android.net.Uri
27
26
import com.owncloud.android.lib.common.OwnCloudClient
28
- import com.owncloud.android.lib.common.authentication.OwnCloudCredentialsFactory
29
27
import com.owncloud.android.lib.common.operations.RemoteOperationResult
30
28
import com.owncloud.android.lib.resources.oauth.GetOIDCDiscoveryRemoteOperation
31
29
import com.owncloud.android.lib.resources.oauth.responses.OIDCDiscoveryResponse
32
30
import com.owncloud.android.lib.resources.oauth.services.OIDCService
33
31
34
32
class OCOIDCService () : OIDCService {
35
33
36
- override fun getOIDCServerDiscovery (baseUrl : String ): RemoteOperationResult <OIDCDiscoveryResponse > =
37
- GetOIDCDiscoveryRemoteOperation ().execute(createClientFromPath(baseUrl))
38
-
39
- private fun createClientFromPath (path : String ): OwnCloudClient =
40
- OwnCloudClient (Uri .parse(path)).apply {
41
- credentials = OwnCloudCredentialsFactory .getAnonymousCredentials()
42
- }
34
+ override fun getOIDCServerDiscovery (
35
+ ownCloudClient : OwnCloudClient
36
+ ): RemoteOperationResult <OIDCDiscoveryResponse > =
37
+ GetOIDCDiscoveryRemoteOperation ().execute(ownCloudClient)
43
38
44
39
}
You can’t perform that action at this time.
0 commit comments