Provides mechanism to authenticate user with pregenerated token. Read "devise token authenticatable".
I also provide ability to check token expiration date in case you use one.
Ensure this gem is reachable by rubycase server, which depends on how you run it.
If you run rubycase-server as sinatra, be it alone or mounted to another app - add this line to Gemfile:
gem 'rubycas-strategy-token', :git => git://github.com/Slotos/rubycas-strategy-token.git
And then execute:
bundle
If you run is as centralized system service - install gem by running:
gem install rubycas-strategy-token
Of course I lied, there's no way to install it that way unless I release it as a gem =P
For now you'll have to use my fork of rubycas-server if you want to use this matcher. All you need to do is add this definition to your config.yml (database line is Sequel compatible):
strategies:
-
strategy: Token
database:
adapter: mysql2
database: db
username: user
password: secret
user_table: users
username_column: email
token_column: access_token
expire_column: access_token_expires # optional- Fork it
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create new Pull Request