songkick / oauth2-provider

Simple OAuth 2.0 provider toolkit
MIT License
529 stars 148 forks source link

make client_id read-only #10

Closed jjb closed 12 years ago

jjb commented 12 years ago

whadya think?

p.s. this is based on the spec_tweaks branch that i just pushed to you

jcoglan commented 12 years ago

We can't pull this, we need client_id to be writable. It's not mass-assignable, though.

jjb commented 12 years ago

attr_readonly prevents an attribute from being changed after the model has been saved to the DB.

Do you ever need to change it after it has been saved to the DB?

jcoglan commented 12 years ago

We do need control over it for our own clients -- we use a fixed ID for our own apps across development, staging and production and so we don't want to keep the randomly generated ID after creating records in each DB.