Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/userauth #578

Merged
merged 2 commits into from
May 30, 2018
Merged

Conversation

gjrtimmer
Copy link
Collaborator

Issue(s)

ADDED

  • User Authentication Implementation
  • Rewrite Upgrade tool
  • Rename file to conform to fileformat sqlite3_*_omit.go
  • Updated sqlite3-binding.* with new upgrade tool
  • Add: callbackRetNil required for error type return because of adding RegisterFuncs directly on the connection. (This requires review)
  • Add: TestCreateAuthDatabase

Upgrade Tool

The upgrade tool can now be build with build tag upgrade, CGO must be disabled.

CGO_ENABLED=0 go build -tags upgrade .

TODO

  • Implement Table Exists call to check if the sqlite_user table exists, and only run the creation when the table does not exists.
  • Documentation

Nice to Have

  • Override implementation of sqlite_crypt with stronger encryption for password.
  • Provide multiple password encoders so the user can simple use a ConnectHook to select which encoder must be used for the password encoder.

Tests

The test(s) can be run with the following command:

go test -v -tags sqlite_userauth -run sqlite3_opt_userauth_test.go
  • Create Auth Database
  • Failed Authentication
  • Add User
  • Delete User
  • Change Password
  • ...

@mattn I really need your help with the Table Exists I do not know how to do this correctly, we have to do an sql query directly on the sqlite3_ bindings without the golang sql driver. You probably know how to do this and will probably be peanuts for you.

See Sqlite3.go Lines: 1371 - 1377

[ci skip]

gjrtimmer added 2 commits May 30, 2018 19:49
* Reformat code
* Add download for sqlite-src-*
* Add extract for sqlite source
* Add auto merge of UserAuth module into Amalgamation
* User Authentication Implementation
* Rename file to conform to fileformat `sqlite3_*_omit.go`
* Updated sqlite3-binding.* with new upgrade tool
* Add: callbackRetNil required for error type return because of adding `RegisterFunc`s directly on the connection.
* Add: TestCreateAuthDatabase
@gjrtimmer gjrtimmer merged commit 6ae7f98 into mattn:feature/userauth May 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant