Created
September 23, 2013 15:58
-
-
Save tobnee/6672727 to your computer and use it in GitHub Desktop.
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
trait Github { | |
def login(cred:Credentials) = { | |
val response: Future[Response] = WS | |
.url(models.github.baseUrl+"/user") | |
.withAuth(cred.username, cred.password, AuthScheme.BASIC) | |
.head() | |
response.onSuccess{ case response => | |
Cache.set(cred.password+""+"passwd", response) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment