Skip to content

Instantly share code, notes, and snippets.

@cwagdev
Created June 16, 2015 05:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cwagdev/89b1715b20b29f8959ae to your computer and use it in GitHub Desktop.
Save cwagdev/89b1715b20b29f8959ae to your computer and use it in GitHub Desktop.
func loginUserWithUsername(username: String, password: String) throws -> String {
guard username.characters.count != 0 else {
throw LoginError.EmptyUsername
}
guard password.characters.count != 0 else {
throw LoginError.EmptyPassword
}
///Handle all the other,
return "token:" + username
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment