validate

fun validate(validate: suspend ApplicationCall.(JWTCredential) -> Principal?)

Apply validate function to every call with JWTCredential

Return

a principal (usually an instance of JWTPrincipal) or null