Class: Oauth2Provider::ApplicationController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- Oauth2Provider::ApplicationController
- Includes:
- ControllerMixin
- Defined in:
- app/controllers/oauth2_provider/application_controller.rb
Direct Known Subclasses
AccessesController, AuthorizeController, ClientsController, ScopesController, TokenController
Instance Method Summary collapse
Methods included from ControllerMixin
#_oauth_provider_authenticate, #_oauth_provider_json_body, #_oauth_provider_normalize_token, #api_request, #json?, #oauth_authorized, #session_auth
Instance Method Details
#_oauth_provider_admin? ⇒ Boolean
9 10 11 12 13 14 15 |
# File 'app/controllers/oauth2_provider/application_controller.rb', line 9 def _oauth_provider_admin? unless current_user.admin? flash.alert = "Unauthorized access." redirect_to root_path return false end end |