Created
February 26, 2021 20:27
-
-
Save deanwampler/a71bcade71eb576ed245b42befdebe53 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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