Sha256: 9ac5e26cf1e8d79216f786fbc8f755243bc18bfa71b18f0763c30971c68c6363
Contents?: true
Size: 559 Bytes
Versions: 1
Compression:
Stored size: 559 Bytes
Contents
class Devise::Oauth2Providable::TokensController < ApplicationController before_filter :authenticate_user! def create @refresh_token = oauth2_current_refresh_token || oauth2_current_client.refresh_tokens.create!(:user => current_user) @access_token = @refresh_token.access_tokens.create!(:client => oauth2_current_client, :user => current_user) render :json => @access_token.token_response end private def oauth2_current_client env['oauth2.client'] end def oauth2_current_refresh_token env['oauth2.refresh_token'] end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
devise_oauth2_providable-1.0.0.beta1 | app/controllers/devise/oauth2_providable/tokens_controller.rb |