Skip to content

Instantly share code, notes, and snippets.

@lforite
Created October 22, 2021 07:42
Show Gist options
  • Save lforite/3d34d092b078ec239457d15a20efa85e to your computer and use it in GitHub Desktop.
Save lforite/3d34d092b078ec239457d15a20efa85e to your computer and use it in GitHub Desktop.
Scala web series Pt. 1 always true predicate
val alwaysTruePredicate = new AuthorizationPredicate {
override def evaluate(token: Token): Boolean = true
}
val isAuthorized = alwaysTruePredicate.evaluate(token) //will always be true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment