rack-oauth2-server icon indicating copy to clipboard operation
rack-oauth2-server copied to clipboard

Add support for custom primary keys

Open johnallen3d opened this issue 10 years ago • 0 comments

This is probably seems like it's coming out of left field... We have integrated rack-oauth2-server into our API and the rest of our API uses UUID for id fields and we wanted to ensure consistency. Forking and modifying the codebase was the best option we could find (would have required too much monkey patching).

The idea here is you can swap out BSON::ObjectId for a UUID like so:

  # in configuration block
  oauth.pk_generator = Rack::OAuth2::UUIDGenerator

Let us know if this is something you are interested in and if there are changes/improvements we can make.

johnallen3d avatar Mar 08 '14 23:03 johnallen3d