@@ -166,7 +166,7 @@ public class AuthenticationAPIClient @VisibleForTesting(otherwise = VisibleForTe
166166 * Example usage:
167167 *
168168 * ```
169- * client.signinWithPasskey("{authSession}", "{authResponse}","{realm}")
169+ * client.signinWithPasskey("{authSession}", "{authResponse}","{realm}","${organization}" )
170170 * .validateClaims() //mandatory
171171 * .setScope("{scope}")
172172 * .start(object: Callback<Credentials, AuthenticationException> {
@@ -191,7 +191,7 @@ public class AuthenticationAPIClient @VisibleForTesting(otherwise = VisibleForTe
191191 setGrantType(ParameterBuilder .GRANT_TYPE_PASSKEY )
192192 set(AUTH_SESSION_KEY , authSession)
193193 realm?.let { setRealm(it) }
194- organization?.let { set(ORGANIZATION_KEY ,organization) }
194+ organization?.let { set(ORGANIZATION_KEY , organization) }
195195 }.asDictionary()
196196
197197 return loginWithToken(params)
@@ -213,7 +213,7 @@ public class AuthenticationAPIClient @VisibleForTesting(otherwise = VisibleForTe
213213 * Example usage:
214214 *
215215 * ```
216- * client.signinWithPasskey("{authSession}", "{authResponse}","{realm}")
216+ * client.signinWithPasskey("{authSession}", "{authResponse}","{realm}","{organization}" )
217217 * .validateClaims() //mandatory
218218 * .setScope("{scope}")
219219 * .start(object: Callback<Credentials, AuthenticationException> {
@@ -225,18 +225,20 @@ public class AuthenticationAPIClient @VisibleForTesting(otherwise = VisibleForTe
225225 * @param authSession the auth session received from the server as part of the public key challenge request.
226226 * @param authResponse the public key credential authentication response in JSON string format that follows the standard webauthn json format
227227 * @param realm the connection to use. If excluded, the application will use the default connection configured in the tenant
228+ * @param organization id of the organization to be associated with the user while signing in
228229 * @return a request to configure and start that will yield [Credentials]
229230 */
230231 public fun signinWithPasskey (
231232 authSession : String ,
232233 authResponse : String ,
233- realm : String? = null
234+ realm : String? = null,
235+ organization : String? = null,
234236 ): AuthenticationRequest {
235237 val publicKeyCredentials = gson.fromJson(
236238 authResponse,
237239 PublicKeyCredentials ::class .java
238240 )
239- return signinWithPasskey(authSession, publicKeyCredentials, realm)
241+ return signinWithPasskey(authSession, publicKeyCredentials, realm, organization )
240242 }
241243
242244
@@ -250,7 +252,7 @@ public class AuthenticationAPIClient @VisibleForTesting(otherwise = VisibleForTe
250252 *
251253 *
252254 * ```
253- * client.signupWithPasskey("{userData}","{realm}")
255+ * client.signupWithPasskey("{userData}","{realm}","{organization}" )
254256 * .addParameter("scope","scope")
255257 * .start(object: Callback<PasskeyRegistration, AuthenticationException> {
256258 * override fun onSuccess(result: PasskeyRegistration) { }
@@ -299,14 +301,15 @@ public class AuthenticationAPIClient @VisibleForTesting(otherwise = VisibleForTe
299301 * Example usage:
300302 *
301303 * ```
302- * client.passkeyChallenge("{realm}")
304+ * client.passkeyChallenge("{realm}", "{organization}" )
303305 * .start(object: Callback<PasskeyChallenge, AuthenticationException> {
304306 * override fun onSuccess(result: PasskeyChallenge) { }
305307 * override fun onFailure(error: AuthenticationException) { }
306308 * })
307309 * ```
308310 *
309311 * @param realm the connection to use. If excluded, the application will use the default connection configured in the tenant
312+ * @param organization id of the organization to be associated with the user while signing in
310313 * @return a request to configure and start that will yield [PasskeyChallenge]
311314 */
312315 public fun passkeyChallenge (
0 commit comments