Created
August 15, 2012 06:06
-
-
Save jesseeichar/3356853 to your computer and use it in GitHub Desktop.
Authentication in Scala-IO
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
val username = "myusername" | |
val password = "mypassword".toCharArray() | |
class MyAuthenticator extends Authenticator { | |
def getPasswordAuthentication = | |
new PasswordAuthentication(kuser, password); | |
} | |
Authenticator.setDefault(new MyAuthenticator()); | |
println(Resource.fromURL(args(0)).string) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment