Commit graph

8 commits

Author SHA1 Message Date
Grzegorz Bizon
3e6950481a Use method that creates runners registration token
`runners_registration_token` now creates a new token if it is blank.
2015-12-23 11:45:17 +01:00
Grzegorz Bizon
37731ba1a1 Add method that persist ensured token in TokenAuthenticatable 2015-12-23 10:47:18 +01:00
Grzegorz Bizon
76f7e80455 Fix method that ensures authentication token
Until now, `ensure_#{token_filed_name}` method didn't persist new token in database.

This closes #4235.
2015-12-23 09:37:01 +01:00
Gabriel Mazetto
b5291f9599 Fixed Rubocop offenses 2015-12-15 00:53:52 -02:00
Grzegorz Bizon
917effb737 Make sure that token ensure_* method always returns a token 2015-12-11 14:39:51 +01:00
Grzegorz Bizon
d90d3db32b Use save! when generating new token in TokenAuthenticatable 2015-12-11 10:39:39 +01:00
Grzegorz Bizon
9948e5bcdd Refactor TokenAuthenticatable to improve reusability
This adds a ability to use multiple different authentication token
fields in other models. From now on it is necessary to add
authentication token field manually in each class that implements this
mixin.
2015-12-11 10:39:39 +01:00
Marin Jankovski
4024aa8e81 Try to keep token authenticable compatibility 2014-07-09 14:42:25 +02:00