diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 5e2f673..ac568a7 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -5,7 +5,7 @@ plugins { android { namespace = "com.shielddagger.auth.oidc_debugger" - compileSdk = 34 + compileSdk = 35 defaultConfig { applicationId = "com.shielddagger.auth.oidc_debugger" diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index ab0be0f..516fb2f 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -14,6 +14,21 @@ android:supportsRtl="true" android:theme="@style/Theme.OIDCDebugger" tools:targetApi="31"> + + + + + + + + + + + + + + + - \ No newline at end of file diff --git a/app/src/main/java/com/shielddagger/auth/oidc_debugger/ValidateActivity.kt b/app/src/main/java/com/shielddagger/auth/oidc_debugger/ValidateActivity.kt new file mode 100644 index 0000000..72ec821 --- /dev/null +++ b/app/src/main/java/com/shielddagger/auth/oidc_debugger/ValidateActivity.kt @@ -0,0 +1,52 @@ +package com.shielddagger.auth.oidc_debugger + +import android.os.Bundle +import androidx.activity.ComponentActivity +import androidx.activity.compose.setContent +import androidx.activity.enableEdgeToEdge +import androidx.compose.foundation.layout.fillMaxSize +import androidx.compose.foundation.layout.padding +import androidx.compose.material3.Scaffold +import androidx.compose.material3.Text +import androidx.compose.runtime.Composable +import androidx.compose.ui.Modifier +import androidx.compose.ui.tooling.preview.Preview +import com.shielddagger.auth.oidc_debugger.ui.theme.OIDCDebuggerTheme + +class ValidateActivity : ComponentActivity() { + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + + val action = intent?.action + val data = intent?.data + + enableEdgeToEdge() + setContent { + OIDCDebuggerTheme { + Scaffold(modifier = Modifier.fillMaxSize()) { innerPadding -> + Greeting2( + data = data.toString(), + action = action.toString(), + modifier = Modifier.padding(innerPadding) + ) + } + } + } + } +} + +@Composable +fun Greeting2(data: String, action: String, modifier: Modifier = Modifier) { + Text( + text = "$data\n$action", + modifier = modifier + ) +} + +@Preview(showBackground = true) +@Composable +fun GreetingPreview2() { + OIDCDebuggerTheme { + Greeting2("data", "action") + } +} \ No newline at end of file diff --git a/app/src/main/java/com/shielddagger/auth/oidc_debugger/oidc/OIDCCore.kt b/app/src/main/java/com/shielddagger/auth/oidc_debugger/oidc/OIDCCore.kt index ef7351d..7ae58a4 100644 --- a/app/src/main/java/com/shielddagger/auth/oidc_debugger/oidc/OIDCCore.kt +++ b/app/src/main/java/com/shielddagger/auth/oidc_debugger/oidc/OIDCCore.kt @@ -1,6 +1,7 @@ package com.shielddagger.auth.oidc_debugger.oidc import android.net.Uri +import java.io.Serializable import java.util.ArrayList import kotlin.io.encoding.Base64 import kotlin.io.encoding.ExperimentalEncodingApi @@ -66,12 +67,13 @@ enum class OIDCAuthState(private val type: String) { class OIDCCore( private val responseType: List, - private val scope: List, - private val clientId: String, - private val redirectUri: String, - private val authorizeUri: String, - private val tokenUri: String, - private val clientSecret: String = "", + val scope: List, + val clientId: String, + val redirectUri: String, + val authorizeUri: String, + val tokenUri: String, + val userinfoUri: String, + val clientSecret: String = "", private val clientAuth: ClientAuthType = ClientAuthType.BASIC ) { diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 2957fe0..d3381e9 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -1,3 +1,5 @@ OIDC Debugger + OIDC Debugger - Redirect + https://oidcdebugger.shielddaggerhosted.com/redirect \ No newline at end of file