diff --git a/README.md b/README.md index a745a0a..bc77bc0 100644 --- a/README.md +++ b/README.md @@ -19,18 +19,18 @@ dependencies { Initialization requires 5 parameters, which are all str type: | Name (in order) | Must | Description | | ---------------- | ---- | --------------------------------------------------- | -| endpoint | Yes | Casdoor Server Url, such as `http://localhost:8000` | +| endpoint | Yes | Casdoor Server Url, such as `https://door.casdoor.com` | | clientID | Yes | Application.clientID | -| appName | Yes | Application.name | -| organizationName | Yes |Organization name +| appName | Yes | Application name | +| organizationName | Yes |Organization name | ```kotlin val casdoorConfig = CasdoorConfig( - endpoint = "http://localhost:8000", - clientID = "ced4d6db2f4644b85a75", - organizationName = "organization_6qvtvh", + endpoint = "https://door.casdoor.com", + clientID = "294b09fbc17f95daf2fe", redirectUri = "casdoor://callback", - appName = "application_y38644" + organizationName = "casbin", + appName = "app-vue-python-example" ) ``` diff --git a/library/src/main/java/org/casdoor/Casdoor.kt b/library/src/main/java/org/casdoor/Casdoor.kt index 905a8cf..c44eb5a 100644 --- a/library/src/main/java/org/casdoor/Casdoor.kt +++ b/library/src/main/java/org/casdoor/Casdoor.kt @@ -25,9 +25,7 @@ import okhttp3.internal.EMPTY_REQUEST import okio.IOException import java.lang.reflect.Type - class Casdoor(private val config: CasdoorConfig) { - private var codeVerifier: String? = null private var nonce: String? = null @@ -103,7 +101,6 @@ class Casdoor(private val config: CasdoorConfig) { throw IOException("response error: $it") } } - } /** @@ -132,7 +129,6 @@ class Casdoor(private val config: CasdoorConfig) { } } - } /** @@ -163,7 +159,6 @@ class Casdoor(private val config: CasdoorConfig) { } } - } /** @@ -185,6 +180,4 @@ class Casdoor(private val config: CasdoorConfig) { } } } - - -} \ No newline at end of file +} diff --git a/library/src/test/java/org/casdoor/CasdoorConfigTest.kt b/library/src/test/java/org/casdoor/CasdoorConfigTest.kt index 4e32e2a..dd6c763 100644 --- a/library/src/test/java/org/casdoor/CasdoorConfigTest.kt +++ b/library/src/test/java/org/casdoor/CasdoorConfigTest.kt @@ -25,15 +25,14 @@ import org.junit.Test class CasdoorConfigTest { @Test fun testCasdoorConfig() { - val casdoorConfig1 = CasdoorConfig( - clientID = "", - organizationName = "", - redirectUri = "", - endpoint = "http://bar.com", - appName = "" + endpoint = "https://door.casdoor.com", + clientID = "294b09fbc17f95daf2fe", + redirectUri = "casdoor://callback", + organizationName = "casbin", + appName = "app-vue-python-example" ) - assertEquals("http://bar.com", casdoorConfig1.endpoint) + assertEquals("https://door.casdoor.com", casdoorConfig1.endpoint) } } \ No newline at end of file