Fix pronto remarks
This commit is contained in:
parent
773a5a67d9
commit
fd4022a55c
4 changed files with 23 additions and 20 deletions
|
|
@ -1,7 +1,7 @@
|
|||
@import 'perfect-scrollbar';
|
||||
|
||||
@import 'color-variables';
|
||||
@import "bootstrap-complete.scss";
|
||||
@import 'bootstrap-complete';
|
||||
@import 'mixins';
|
||||
|
||||
|
||||
|
|
@ -99,11 +99,11 @@
|
|||
@import 'statistics';
|
||||
|
||||
/* gallery */
|
||||
@import "blueimp-gallery";
|
||||
@import "gallery";
|
||||
@import 'blueimp-gallery';
|
||||
@import 'gallery';
|
||||
|
||||
// settings
|
||||
@import 'user_applications';
|
||||
|
||||
// API
|
||||
@import "openid_connect_error_page";
|
||||
// OpenID Connect (API)
|
||||
@import 'openid_connect_error_page';
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
.api-error {
|
||||
margin-top: 20px;
|
||||
box-shadow: $card-shadow;
|
||||
background-color: $light-grey;
|
||||
box-shadow: $card-shadow;
|
||||
margin-top: 20px;
|
||||
|
||||
h4 { text-align: center; }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ module Api
|
|||
class AuthorizationsController < ApplicationController
|
||||
rescue_from Rack::OAuth2::Server::Authorize::BadRequest do |e|
|
||||
logger.info e.backtrace[0, 10].join("\n")
|
||||
error, description = e.message.split(" :: ")
|
||||
error, _description = e.message.split(" :: ")
|
||||
handle_params_error(error, "The request was malformed: please double check the client id and redirect uri.")
|
||||
end
|
||||
|
||||
|
|
@ -210,6 +210,16 @@ module Api
|
|||
def handle_prompt_none
|
||||
if params[:prompt] == "none"
|
||||
if user_signed_in?
|
||||
handle_prompt_with_signed_in_user
|
||||
else
|
||||
handle_params_error("login_required", "User must already be logged in when `prompt` is `none`")
|
||||
end
|
||||
else
|
||||
handle_params_error("invalid_request", "The 'none' value cannot be used with any other prompt value")
|
||||
end
|
||||
end
|
||||
|
||||
def handle_prompt_with_signed_in_user
|
||||
client_id = params[:client_id]
|
||||
if client_id
|
||||
auth = Api::OpenidConnect::Authorization.find_by_client_id_and_user(client_id, current_user)
|
||||
|
|
@ -221,12 +231,6 @@ module Api
|
|||
else
|
||||
handle_params_error("bad_request", "Client ID is missing from request")
|
||||
end
|
||||
else
|
||||
handle_params_error("login_required", "User must already be logged in when `prompt` is `none`")
|
||||
end
|
||||
else
|
||||
handle_params_error("invalid_request", "The 'none' value cannot be used with any other prompt value")
|
||||
end
|
||||
end
|
||||
|
||||
def render_error(error_description)
|
||||
|
|
|
|||
|
|
@ -37,4 +37,3 @@ end
|
|||
Then(/^I should see a message containing "(.*?)"$/) do |message|
|
||||
expect(find("#openid_connect_error_description").text).to eq(message)
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue