module Rack::OAuth2::Rails::Helpers
Helper methods available to controller instance and views.
Public Instance Methods
oauth()
click to toggle source
Returns the OAuth helper.
@return [Server::Helper]
# File lib/rack/oauth2/rails.rb, line 53 def oauth @oauth ||= Rack::OAuth2::Server::Helper.new(request, response) end
oauth_required()
click to toggle source
Filter that denies access if the request is not authenticated. If you do not specify a scope, the class method oauth_required
will use this filter; you can set the filter in a parent class and skip it in child classes that need special handling.
# File lib/rack/oauth2/rails.rb, line 61 def oauth_required head oauth.no_access! unless oauth.authenticated? end