Skip to content

Instantly share code, notes, and snippets.

@deanwampler
Created February 26, 2021 20:27
Show Gist options
  • Save deanwampler/a71bcade71eb576ed245b42befdebe53 to your computer and use it in GitHub Desktop.
Save deanwampler/a71bcade71eb576ed245b42befdebe53 to your computer and use it in GitHub Desktop.
class Authenticate(authService: AuthService):
private var authenticated = false
def isAuthenticated: Boolean = authenticated
final def apply(username: String, password: String): Boolean =
authenticated = ...
authenticated
object Service:
def doStuff[T](f: => T): Try[T] = ...
private val auth = new Authenticate(...)
export auth.{isAuthenticated, apply as authenticate}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment