Skip to content

Instantly share code, notes, and snippets.

@tobnee
Created September 23, 2013 15:58
Show Gist options
  • Save tobnee/6672727 to your computer and use it in GitHub Desktop.
Save tobnee/6672727 to your computer and use it in GitHub Desktop.
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