From 554fefd27e89adaa43e11fab75f42d3ade396e90 Mon Sep 17 00:00:00 2001 From: Colin Frick Date: Thu, 19 Dec 2024 12:07:15 +0100 Subject: [PATCH] fix: remove codeChallenge and codeChallengeMethod These are not supported through `additionalParameters`. Closes #130 --- .../mobilesdk/oauth/OAuthAuthorizationService.kt | 2 -- .../mobilesdk/oauth/OAuthAuthorizeOptions.kt | 4 ---- .../mobilesdk/oauth/OAuthCodeChallengeMethod.kt | 10 ---------- 3 files changed, 16 deletions(-) delete mode 100644 library/src/main/java/io/fusionauth/mobilesdk/oauth/OAuthCodeChallengeMethod.kt diff --git a/library/src/main/java/io/fusionauth/mobilesdk/oauth/OAuthAuthorizationService.kt b/library/src/main/java/io/fusionauth/mobilesdk/oauth/OAuthAuthorizationService.kt index 00862d4..e09f8ad 100644 --- a/library/src/main/java/io/fusionauth/mobilesdk/oauth/OAuthAuthorizationService.kt +++ b/library/src/main/java/io/fusionauth/mobilesdk/oauth/OAuthAuthorizationService.kt @@ -152,8 +152,6 @@ class OAuthAuthorizationService internal constructor( locale?.let { additionalParameters["locale"] = it } // Authorize Options - options?.codeChallenge?.let { additionalParameters["code_challenge"] = it } - options?.codeChallengeMethod?.let { additionalParameters["code_challenge_method"] = it.name } options?.idpHint?.let { additionalParameters["idp_hint"] = it } options?.deviceDescription?.let { additionalParameters["metaData.device.description"] = it } options?.userCode?.let { additionalParameters["user_code"] = it } diff --git a/library/src/main/java/io/fusionauth/mobilesdk/oauth/OAuthAuthorizeOptions.kt b/library/src/main/java/io/fusionauth/mobilesdk/oauth/OAuthAuthorizeOptions.kt index 26c95a0..41c8e1b 100644 --- a/library/src/main/java/io/fusionauth/mobilesdk/oauth/OAuthAuthorizeOptions.kt +++ b/library/src/main/java/io/fusionauth/mobilesdk/oauth/OAuthAuthorizeOptions.kt @@ -11,8 +11,6 @@ import android.content.Intent * @property redirectUri The redirect URI to be used for the OAuth authorize request. * Default is "io.fusionauth.app:/oauth2redirect". * @property idpHint The identity provider hint to be used for the OAuth authorize request. - * @property codeChallenge The code challenge to be used for the OAuth authorize request. - * @property codeChallengeMethod The code challenge method to be used for the OAuth authorize request. * @property loginHint An optional email address or top level domain that can allow you to bypass the FusionAuth login * page when using managed domains. * @property deviceDescription An optional human-readable description of the device used during login. @@ -26,8 +24,6 @@ import android.content.Intent data class OAuthAuthorizeOptions( val redirectUri: String = "io.fusionauth.app:/oauth2redirect", val idpHint: String? = null, - val codeChallenge: String? = null, - val codeChallengeMethod: OAuthCodeChallengeMethod? = null, val loginHint: String? = null, val deviceDescription: String? = null, val nonce: String? = null, diff --git a/library/src/main/java/io/fusionauth/mobilesdk/oauth/OAuthCodeChallengeMethod.kt b/library/src/main/java/io/fusionauth/mobilesdk/oauth/OAuthCodeChallengeMethod.kt deleted file mode 100644 index 2239591..0000000 --- a/library/src/main/java/io/fusionauth/mobilesdk/oauth/OAuthCodeChallengeMethod.kt +++ /dev/null @@ -1,10 +0,0 @@ -package io.fusionauth.mobilesdk.oauth - -/** - * Code Challenge Method for PKCE. - * - * @see OAuthAuthorizeOptions - */ -enum class OAuthCodeChallengeMethod { - S256, -}