-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Block public clients automatic authorization skip
Non-confidential applications should not be able to skip the authorization stop, even if they have an existing matching_token. From the [issue](#1589): > According to RFC 8252 section 8.6, the authentication server should re-prompt for user consent, since the client's identity cannot be assured simply from the client_id parameter Fixes #1589
- Loading branch information
Showing
4 changed files
with
73 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# frozen_string_literal: true | ||
|
||
# Adds the `render_with` matcher. | ||
# Ex: | ||
# expect(controller).to render_with(template: :show, locals: { alpha: "beta" }) | ||
# | ||
module RenderWithMatcher | ||
def self.included(base) | ||
# Setup spying for our "render_with" matcher | ||
base.before do | ||
allow(controller).to receive(:render).and_wrap_original do |original, *args, **kwargs, &block| | ||
original.call(*args, **kwargs, &block) | ||
end | ||
end | ||
end | ||
|
||
RSpec::Matchers.define :render_with do |expected| | ||
match do |actual| | ||
have_received(:render).with(expected).matches?(actual) | ||
end | ||
end | ||
end | ||
|
||
RSpec.configure do |config| | ||
config.include RenderWithMatcher, type: :controller | ||
end |