Class: Oauth2Provider::AccessesController

Inherits:
ApplicationController show all
Defined in:
app/controllers/oauth2_provider/accesses_controller.rb

Instance Method Summary collapse

Methods inherited from ApplicationController

#_oauth_provider_admin?

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

#blockObject



12
13
14
15
# File 'app/controllers/oauth2_provider/accesses_controller.rb', line 12

def block
  @access.block!
  redirect_to oauth2_provider_engine.oauth2_provider_accesses_url
end

#indexObject



5
6
7
# File 'app/controllers/oauth2_provider/accesses_controller.rb', line 5

def index
  @accesses = Oauth2Provider::OauthAccess.to_adapter.find_all(resource_owner_uri: user_url(current_user))
end

#showObject



9
10
# File 'app/controllers/oauth2_provider/accesses_controller.rb', line 9

def show
end

#unblockObject



17
18
19
20
# File 'app/controllers/oauth2_provider/accesses_controller.rb', line 17

def unblock
  @access.unblock!
  redirect_to oauth2_provider_engine.oauth2_provider_accesses_url
end