Class: StandardId::Provider::ConsentController
- Inherits:
-
ApplicationController
- Object
- ActionController::API
- ApplicationController
- StandardId::Provider::ConsentController
- Includes:
- ActionController::Cookies
- Defined in:
- app/controllers/standard_id/provider/consent_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
17 18 19 20 21 22 23 24 25 26 |
# File 'app/controllers/standard_id/provider/consent_controller.rb', line 17 def create ConsentGrant.grant!( account: current_account, client_application: @client, scopes: [:scope] ) = redirect_to , allow_other_host: true, status: :found end |
#destroy ⇒ Object
28 29 30 31 32 33 34 35 36 37 |
# File 'app/controllers/standard_id/provider/consent_controller.rb', line 28 def destroy redirect_uri = [:redirect_uri] if redirect_uri.present? deny_url = build_error_redirect(redirect_uri, "access_denied", "The user denied the consent request") redirect_to deny_url, allow_other_host: true, status: :found else render json: { error: "access_denied", error_description: "The user denied the consent request" }, status: :forbidden end end |
#show ⇒ Object
9 10 11 12 13 14 15 |
# File 'app/controllers/standard_id/provider/consent_controller.rb', line 9 def show render json: { client: { name: @client.name, description: @client.description }, scopes: requested_scopes, authorization_params: } end |