Skip to content

Commit

Permalink
Address PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
vahancouver committed Dec 4, 2023
1 parent a14829e commit 87e5555
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,10 @@ interface DeviceAuthenticator {
* @return Boolean value indicating whether the custom claims are valid or not
*/
fun validateCustomClaims(customClaims: Map<String, Any>): Boolean {
return customClaims.keys.intersect(registeredKeys).isEmpty()
}

companion object {
val registeredKeys = listOf(
JWTClaimNames.SUBJECT,
JWTClaimNames.EXPIRATION_TIME,
Expand All @@ -209,7 +213,6 @@ interface DeviceAuthenticator {
PLATFORM,
ANDROID_VERSION
)
return customClaims.keys.intersect(registeredKeys).isEmpty()
}

}
Expand Down

0 comments on commit 87e5555

Please sign in to comment.