diff --git a/server-core/src/main/kotlin/com/lightningkite/lightningserver/auth/proof/PinBasedProofEndpoints.kt b/server-core/src/main/kotlin/com/lightningkite/lightningserver/auth/proof/PinBasedProofEndpoints.kt index c88b5e6c..03fa76fd 100644 --- a/server-core/src/main/kotlin/com/lightningkite/lightningserver/auth/proof/PinBasedProofEndpoints.kt +++ b/server-core/src/main/kotlin/com/lightningkite/lightningserver/auth/proof/PinBasedProofEndpoints.kt @@ -101,13 +101,5 @@ abstract class PinBasedProofEndpoints( override suspend fun , ID : Comparable> established( handler: Authentication.SubjectHandler, item: SUBJECT - ): Boolean { - val index = handler.subjectSerializer.descriptor.getElementIndex(info.property!!) - if(index == CompositeDecoder.UNKNOWN_NAME) return false - if(handler.subjectSerializer.descriptor.getElementDescriptor(index).isNullable) { - return Serialization.json.encodeToJsonElement(handler.subjectSerializer, item).jsonObject.get(info.property!!)?.let { it !is JsonNull } ?: false - } else { - return true - } - } + ): Boolean = handler.get(item, info.property!!) != null } \ No newline at end of file