Created
July 13, 2017 06:32
-
-
Save anonymous/24dec1251821ff089ad4a6c7e542a3a5 to your computer and use it in GitHub Desktop.
the description for this gist
This file contains 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
@free trait LoginDatabase { | |
def insertCredentialsUser(e: UserEmail, p: PasswordHash): FS[Attempt[UserId]] | |
def insertGitHubUser(d: GitHubData): FS[Attempt[UserId]] | |
def queryByLoginEmail(e: UserEmail): FS[Option[(UserId, PasswordHash)]] | |
def queryByGitHubId(id: GitHubId): FS[Option[UserId]] | |
} | |
@free trait GitHubClient { | |
def login(code: String): FS[GitHubDataResponse] | |
} | |
@free trait Log { | |
def info(msg: String): FS[Unit] | |
def warn(msg: String): FS[Unit] | |
def warnWithCause(msg: String, cause: Throwable): FS[Unit] | |
} | |
@free trait JwtService { | |
def issue(id: UserId): FS[JWT] | |
def validate(jwt: JWT): FS[Option[Claims]] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment