Skip to content
This repository was archived by the owner on Dec 17, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Autogenerated from Pigeon (v9.0.2), do not edit directly.
// Autogenerated from Pigeon (v9.1.1), do not edit directly.
// See also: https://pub.dev/packages/pigeon

package com.onegini.mobile.sdk.flutter.pigeonPlugin
Expand Down Expand Up @@ -31,6 +31,12 @@ private fun wrapError(exception: Throwable): List<Any?> {
}
}

/**
* Error class for passing custom error details to Flutter via a thrown PlatformException.
* @property code The error code.
* @property message The error message.
* @property details The error details. Must be a datatype supported by the api codec.
*/
class FlutterError (
val code: String,
override val message: String? = null,
Expand Down Expand Up @@ -96,7 +102,7 @@ data class OWCustomInfo (
@Suppress("UNCHECKED_CAST")
fun fromList(list: List<Any?>): OWCustomInfo {
val status = list[0].let { if (it is Int) it.toLong() else it as Long }
val data = list[1] as? String
val data = list[1] as String?
return OWCustomInfo(status, data)
}
}
Expand Down Expand Up @@ -193,15 +199,15 @@ data class OWRegistrationResponse (
@Suppress("UNCHECKED_CAST")
fun fromList(list: List<Any?>): OWRegistrationResponse {
val userProfile = OWUserProfile.fromList(list[0] as List<Any?>)
val customInfo: OWCustomInfo? = (list[1] as? List<Any?>)?.let {
val customInfo: OWCustomInfo? = (list[1] as List<Any?>?)?.let {
OWCustomInfo.fromList(it)
}
return OWRegistrationResponse(userProfile, customInfo)
}
}
fun toList(): List<Any?> {
return listOf<Any?>(
userProfile?.toList(),
userProfile.toList(),
customInfo?.toList(),
)
}
Expand All @@ -220,15 +226,15 @@ data class OWRequestDetails (
fun fromList(list: List<Any?>): OWRequestDetails {
val path = list[0] as String
val method = HttpRequestMethod.ofRaw(list[1] as Int)!!
val headers = list[2] as? Map<String?, String?>
val body = list[3] as? String
val headers = list[2] as Map<String?, String?>?
val body = list[3] as String?
return OWRequestDetails(path, method, headers, body)
}
}
fun toList(): List<Any?> {
return listOf<Any?>(
path,
method?.raw,
method.raw,
headers,
body,
)
Expand Down Expand Up @@ -438,10 +444,9 @@ interface UserClientApi {
val channel = BasicMessageChannel<Any?>(binaryMessenger, "dev.flutter.pigeon.UserClientApi.registerUser", codec)
if (api != null) {
channel.setMessageHandler { message, reply ->
var wrapped = listOf<Any?>()
val args = message as List<Any?>
val identityProviderIdArg = args[0] as? String
val scopesArg = args[1] as? List<String>
val identityProviderIdArg = args[0] as String?
val scopesArg = args[1] as List<String>?
api.registerUser(identityProviderIdArg, scopesArg) { result: Result<OWRegistrationResponse> ->
val error = result.exceptionOrNull()
if (error != null) {
Expand All @@ -460,7 +465,6 @@ interface UserClientApi {
val channel = BasicMessageChannel<Any?>(binaryMessenger, "dev.flutter.pigeon.UserClientApi.handleRegisteredUserUrl", codec)
if (api != null) {
channel.setMessageHandler { message, reply ->
var wrapped = listOf<Any?>()
val args = message as List<Any?>
val urlArg = args[0] as String
val signInTypeArg = args[1].let { if (it is Int) it.toLong() else it as Long }
Expand All @@ -481,7 +485,6 @@ interface UserClientApi {
val channel = BasicMessageChannel<Any?>(binaryMessenger, "dev.flutter.pigeon.UserClientApi.getIdentityProviders", codec)
if (api != null) {
channel.setMessageHandler { _, reply ->
var wrapped = listOf<Any?>()
api.getIdentityProviders() { result: Result<List<OWIdentityProvider>> ->
val error = result.exceptionOrNull()
if (error != null) {
Expand All @@ -500,7 +503,6 @@ interface UserClientApi {
val channel = BasicMessageChannel<Any?>(binaryMessenger, "dev.flutter.pigeon.UserClientApi.deregisterUser", codec)
if (api != null) {
channel.setMessageHandler { message, reply ->
var wrapped = listOf<Any?>()
val args = message as List<Any?>
val profileIdArg = args[0] as String
api.deregisterUser(profileIdArg) { result: Result<Unit> ->
Expand All @@ -520,7 +522,6 @@ interface UserClientApi {
val channel = BasicMessageChannel<Any?>(binaryMessenger, "dev.flutter.pigeon.UserClientApi.getRegisteredAuthenticators", codec)
if (api != null) {
channel.setMessageHandler { message, reply ->
var wrapped = listOf<Any?>()
val args = message as List<Any?>
val profileIdArg = args[0] as String
api.getRegisteredAuthenticators(profileIdArg) { result: Result<List<OWAuthenticator>> ->
Expand All @@ -541,7 +542,6 @@ interface UserClientApi {
val channel = BasicMessageChannel<Any?>(binaryMessenger, "dev.flutter.pigeon.UserClientApi.getAllAuthenticators", codec)
if (api != null) {
channel.setMessageHandler { message, reply ->
var wrapped = listOf<Any?>()
val args = message as List<Any?>
val profileIdArg = args[0] as String
api.getAllAuthenticators(profileIdArg) { result: Result<List<OWAuthenticator>> ->
Expand All @@ -562,7 +562,6 @@ interface UserClientApi {
val channel = BasicMessageChannel<Any?>(binaryMessenger, "dev.flutter.pigeon.UserClientApi.getAuthenticatedUserProfile", codec)
if (api != null) {
channel.setMessageHandler { _, reply ->
var wrapped = listOf<Any?>()
api.getAuthenticatedUserProfile() { result: Result<OWUserProfile> ->
val error = result.exceptionOrNull()
if (error != null) {
Expand All @@ -581,10 +580,9 @@ interface UserClientApi {
val channel = BasicMessageChannel<Any?>(binaryMessenger, "dev.flutter.pigeon.UserClientApi.authenticateUser", codec)
if (api != null) {
channel.setMessageHandler { message, reply ->
var wrapped = listOf<Any?>()
val args = message as List<Any?>
val profileIdArg = args[0] as String
val registeredAuthenticatorIdArg = args[1] as? String
val registeredAuthenticatorIdArg = args[1] as String?
api.authenticateUser(profileIdArg, registeredAuthenticatorIdArg) { result: Result<OWRegistrationResponse> ->
val error = result.exceptionOrNull()
if (error != null) {
Expand All @@ -603,7 +601,6 @@ interface UserClientApi {
val channel = BasicMessageChannel<Any?>(binaryMessenger, "dev.flutter.pigeon.UserClientApi.getNotRegisteredAuthenticators", codec)
if (api != null) {
channel.setMessageHandler { message, reply ->
var wrapped = listOf<Any?>()
val args = message as List<Any?>
val profileIdArg = args[0] as String
api.getNotRegisteredAuthenticators(profileIdArg) { result: Result<List<OWAuthenticator>> ->
Expand All @@ -624,7 +621,6 @@ interface UserClientApi {
val channel = BasicMessageChannel<Any?>(binaryMessenger, "dev.flutter.pigeon.UserClientApi.changePin", codec)
if (api != null) {
channel.setMessageHandler { _, reply ->
var wrapped = listOf<Any?>()
api.changePin() { result: Result<Unit> ->
val error = result.exceptionOrNull()
if (error != null) {
Expand All @@ -642,7 +638,6 @@ interface UserClientApi {
val channel = BasicMessageChannel<Any?>(binaryMessenger, "dev.flutter.pigeon.UserClientApi.setPreferredAuthenticator", codec)
if (api != null) {
channel.setMessageHandler { message, reply ->
var wrapped = listOf<Any?>()
val args = message as List<Any?>
val authenticatorIdArg = args[0] as String
api.setPreferredAuthenticator(authenticatorIdArg) { result: Result<Unit> ->
Expand All @@ -662,7 +657,6 @@ interface UserClientApi {
val channel = BasicMessageChannel<Any?>(binaryMessenger, "dev.flutter.pigeon.UserClientApi.deregisterAuthenticator", codec)
if (api != null) {
channel.setMessageHandler { message, reply ->
var wrapped = listOf<Any?>()
val args = message as List<Any?>
val authenticatorIdArg = args[0] as String
api.deregisterAuthenticator(authenticatorIdArg) { result: Result<Unit> ->
Expand All @@ -682,7 +676,6 @@ interface UserClientApi {
val channel = BasicMessageChannel<Any?>(binaryMessenger, "dev.flutter.pigeon.UserClientApi.registerAuthenticator", codec)
if (api != null) {
channel.setMessageHandler { message, reply ->
var wrapped = listOf<Any?>()
val args = message as List<Any?>
val authenticatorIdArg = args[0] as String
api.registerAuthenticator(authenticatorIdArg) { result: Result<Unit> ->
Expand All @@ -702,7 +695,6 @@ interface UserClientApi {
val channel = BasicMessageChannel<Any?>(binaryMessenger, "dev.flutter.pigeon.UserClientApi.logout", codec)
if (api != null) {
channel.setMessageHandler { _, reply ->
var wrapped = listOf<Any?>()
api.logout() { result: Result<Unit> ->
val error = result.exceptionOrNull()
if (error != null) {
Expand All @@ -720,7 +712,6 @@ interface UserClientApi {
val channel = BasicMessageChannel<Any?>(binaryMessenger, "dev.flutter.pigeon.UserClientApi.enrollMobileAuthentication", codec)
if (api != null) {
channel.setMessageHandler { _, reply ->
var wrapped = listOf<Any?>()
api.enrollMobileAuthentication() { result: Result<Unit> ->
val error = result.exceptionOrNull()
if (error != null) {
Expand All @@ -738,7 +729,6 @@ interface UserClientApi {
val channel = BasicMessageChannel<Any?>(binaryMessenger, "dev.flutter.pigeon.UserClientApi.handleMobileAuthWithOtp", codec)
if (api != null) {
channel.setMessageHandler { message, reply ->
var wrapped = listOf<Any?>()
val args = message as List<Any?>
val dataArg = args[0] as String
api.handleMobileAuthWithOtp(dataArg) { result: Result<Unit> ->
Expand All @@ -758,7 +748,6 @@ interface UserClientApi {
val channel = BasicMessageChannel<Any?>(binaryMessenger, "dev.flutter.pigeon.UserClientApi.getAppToWebSingleSignOn", codec)
if (api != null) {
channel.setMessageHandler { message, reply ->
var wrapped = listOf<Any?>()
val args = message as List<Any?>
val urlArg = args[0] as String
api.getAppToWebSingleSignOn(urlArg) { result: Result<OWAppToWebSingleSignOn> ->
Expand All @@ -779,7 +768,6 @@ interface UserClientApi {
val channel = BasicMessageChannel<Any?>(binaryMessenger, "dev.flutter.pigeon.UserClientApi.getAccessToken", codec)
if (api != null) {
channel.setMessageHandler { _, reply ->
var wrapped = listOf<Any?>()
api.getAccessToken() { result: Result<String> ->
val error = result.exceptionOrNull()
if (error != null) {
Expand All @@ -798,7 +786,6 @@ interface UserClientApi {
val channel = BasicMessageChannel<Any?>(binaryMessenger, "dev.flutter.pigeon.UserClientApi.getRedirectUrl", codec)
if (api != null) {
channel.setMessageHandler { _, reply ->
var wrapped = listOf<Any?>()
api.getRedirectUrl() { result: Result<String> ->
val error = result.exceptionOrNull()
if (error != null) {
Expand All @@ -817,7 +804,6 @@ interface UserClientApi {
val channel = BasicMessageChannel<Any?>(binaryMessenger, "dev.flutter.pigeon.UserClientApi.getUserProfiles", codec)
if (api != null) {
channel.setMessageHandler { _, reply ->
var wrapped = listOf<Any?>()
api.getUserProfiles() { result: Result<List<OWUserProfile>> ->
val error = result.exceptionOrNull()
if (error != null) {
Expand All @@ -836,7 +822,6 @@ interface UserClientApi {
val channel = BasicMessageChannel<Any?>(binaryMessenger, "dev.flutter.pigeon.UserClientApi.validatePinWithPolicy", codec)
if (api != null) {
channel.setMessageHandler { message, reply ->
var wrapped = listOf<Any?>()
val args = message as List<Any?>
val pinArg = args[0] as String
api.validatePinWithPolicy(pinArg) { result: Result<Unit> ->
Expand All @@ -856,9 +841,8 @@ interface UserClientApi {
val channel = BasicMessageChannel<Any?>(binaryMessenger, "dev.flutter.pigeon.UserClientApi.authenticateDevice", codec)
if (api != null) {
channel.setMessageHandler { message, reply ->
var wrapped = listOf<Any?>()
val args = message as List<Any?>
val scopesArg = args[0] as? List<String>
val scopesArg = args[0] as List<String>?
api.authenticateDevice(scopesArg) { result: Result<Unit> ->
val error = result.exceptionOrNull()
if (error != null) {
Expand All @@ -876,10 +860,9 @@ interface UserClientApi {
val channel = BasicMessageChannel<Any?>(binaryMessenger, "dev.flutter.pigeon.UserClientApi.authenticateUserImplicitly", codec)
if (api != null) {
channel.setMessageHandler { message, reply ->
var wrapped = listOf<Any?>()
val args = message as List<Any?>
val profileIdArg = args[0] as String
val scopesArg = args[1] as? List<String>
val scopesArg = args[1] as List<String>?
api.authenticateUserImplicitly(profileIdArg, scopesArg) { result: Result<Unit> ->
val error = result.exceptionOrNull()
if (error != null) {
Expand All @@ -897,10 +880,9 @@ interface UserClientApi {
val channel = BasicMessageChannel<Any?>(binaryMessenger, "dev.flutter.pigeon.UserClientApi.submitCustomRegistrationAction", codec)
if (api != null) {
channel.setMessageHandler { message, reply ->
var wrapped = listOf<Any?>()
val args = message as List<Any?>
val identityProviderIdArg = args[0] as String
val dataArg = args[1] as? String
val dataArg = args[1] as String?
api.submitCustomRegistrationAction(identityProviderIdArg, dataArg) { result: Result<Unit> ->
val error = result.exceptionOrNull()
if (error != null) {
Expand All @@ -918,7 +900,6 @@ interface UserClientApi {
val channel = BasicMessageChannel<Any?>(binaryMessenger, "dev.flutter.pigeon.UserClientApi.cancelCustomRegistrationAction", codec)
if (api != null) {
channel.setMessageHandler { message, reply ->
var wrapped = listOf<Any?>()
val args = message as List<Any?>
val identityProviderIdArg = args[0] as String
val errorArg = args[1] as String
Expand All @@ -939,7 +920,6 @@ interface UserClientApi {
val channel = BasicMessageChannel<Any?>(binaryMessenger, "dev.flutter.pigeon.UserClientApi.fingerprintFallbackToPin", codec)
if (api != null) {
channel.setMessageHandler { _, reply ->
var wrapped = listOf<Any?>()
api.fingerprintFallbackToPin() { result: Result<Unit> ->
val error = result.exceptionOrNull()
if (error != null) {
Expand All @@ -957,7 +937,6 @@ interface UserClientApi {
val channel = BasicMessageChannel<Any?>(binaryMessenger, "dev.flutter.pigeon.UserClientApi.fingerprintDenyAuthenticationRequest", codec)
if (api != null) {
channel.setMessageHandler { _, reply ->
var wrapped = listOf<Any?>()
api.fingerprintDenyAuthenticationRequest() { result: Result<Unit> ->
val error = result.exceptionOrNull()
if (error != null) {
Expand All @@ -975,7 +954,6 @@ interface UserClientApi {
val channel = BasicMessageChannel<Any?>(binaryMessenger, "dev.flutter.pigeon.UserClientApi.fingerprintAcceptAuthenticationRequest", codec)
if (api != null) {
channel.setMessageHandler { _, reply ->
var wrapped = listOf<Any?>()
api.fingerprintAcceptAuthenticationRequest() { result: Result<Unit> ->
val error = result.exceptionOrNull()
if (error != null) {
Expand All @@ -993,7 +971,6 @@ interface UserClientApi {
val channel = BasicMessageChannel<Any?>(binaryMessenger, "dev.flutter.pigeon.UserClientApi.otpDenyAuthenticationRequest", codec)
if (api != null) {
channel.setMessageHandler { _, reply ->
var wrapped = listOf<Any?>()
api.otpDenyAuthenticationRequest() { result: Result<Unit> ->
val error = result.exceptionOrNull()
if (error != null) {
Expand All @@ -1011,7 +988,6 @@ interface UserClientApi {
val channel = BasicMessageChannel<Any?>(binaryMessenger, "dev.flutter.pigeon.UserClientApi.otpAcceptAuthenticationRequest", codec)
if (api != null) {
channel.setMessageHandler { _, reply ->
var wrapped = listOf<Any?>()
api.otpAcceptAuthenticationRequest() { result: Result<Unit> ->
val error = result.exceptionOrNull()
if (error != null) {
Expand All @@ -1029,7 +1005,6 @@ interface UserClientApi {
val channel = BasicMessageChannel<Any?>(binaryMessenger, "dev.flutter.pigeon.UserClientApi.pinDenyAuthenticationRequest", codec)
if (api != null) {
channel.setMessageHandler { _, reply ->
var wrapped = listOf<Any?>()
api.pinDenyAuthenticationRequest() { result: Result<Unit> ->
val error = result.exceptionOrNull()
if (error != null) {
Expand All @@ -1047,7 +1022,6 @@ interface UserClientApi {
val channel = BasicMessageChannel<Any?>(binaryMessenger, "dev.flutter.pigeon.UserClientApi.pinAcceptAuthenticationRequest", codec)
if (api != null) {
channel.setMessageHandler { message, reply ->
var wrapped = listOf<Any?>()
val args = message as List<Any?>
val pinArg = args[0] as String
api.pinAcceptAuthenticationRequest(pinArg) { result: Result<Unit> ->
Expand All @@ -1067,7 +1041,6 @@ interface UserClientApi {
val channel = BasicMessageChannel<Any?>(binaryMessenger, "dev.flutter.pigeon.UserClientApi.pinDenyRegistrationRequest", codec)
if (api != null) {
channel.setMessageHandler { _, reply ->
var wrapped = listOf<Any?>()
api.pinDenyRegistrationRequest() { result: Result<Unit> ->
val error = result.exceptionOrNull()
if (error != null) {
Expand All @@ -1085,7 +1058,6 @@ interface UserClientApi {
val channel = BasicMessageChannel<Any?>(binaryMessenger, "dev.flutter.pigeon.UserClientApi.pinAcceptRegistrationRequest", codec)
if (api != null) {
channel.setMessageHandler { message, reply ->
var wrapped = listOf<Any?>()
val args = message as List<Any?>
val pinArg = args[0] as String
api.pinAcceptRegistrationRequest(pinArg) { result: Result<Unit> ->
Expand All @@ -1105,7 +1077,6 @@ interface UserClientApi {
val channel = BasicMessageChannel<Any?>(binaryMessenger, "dev.flutter.pigeon.UserClientApi.cancelBrowserRegistration", codec)
if (api != null) {
channel.setMessageHandler { _, reply ->
var wrapped = listOf<Any?>()
api.cancelBrowserRegistration() { result: Result<Unit> ->
val error = result.exceptionOrNull()
if (error != null) {
Expand Down Expand Up @@ -1170,7 +1141,6 @@ interface ResourceMethodApi {
val channel = BasicMessageChannel<Any?>(binaryMessenger, "dev.flutter.pigeon.ResourceMethodApi.requestResource", codec)
if (api != null) {
channel.setMessageHandler { message, reply ->
var wrapped = listOf<Any?>()
val args = message as List<Any?>
val typeArg = ResourceRequestType.ofRaw(args[0] as Int)!!
val detailsArg = args[1] as OWRequestDetails
Expand Down
Loading