Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/version-2' into version-2
Browse files Browse the repository at this point in the history
  • Loading branch information
UnknownJoe796 committed Oct 15, 2023
2 parents 24abb37 + 3947ff2 commit d83bb13
Showing 1 changed file with 1 addition and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,5 @@ abstract class PinBasedProofEndpoints(
override suspend fun <SUBJECT : HasId<ID>, ID : Comparable<ID>> established(
handler: Authentication.SubjectHandler<SUBJECT, ID>,
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
}

0 comments on commit d83bb13

Please sign in to comment.