snapframework / snap

Top-level package for the official Snap Framework libraries, includes the snaplets API as well as infrastructure for sessions, auth, and templates.
http://snapframework.com/
BSD 3-Clause "New" or "Revised" License
455 stars 68 forks source link

Auth username format is inconsistent #67

Closed tomcumming closed 11 years ago

tomcumming commented 11 years ago

In regards to the Auth Snaplet

The createUser function takes a username as Text, but the loginByUsername function takes a username as a ByteString.

I can understand why the Snaplet would use ByteString to store usernames in an encoding-independent way. However, it might be nice for all functions to take a username input as a ByteString.

Alternatively, forcing Text for usernames throughout might be a good idea.