forked from project-rhex/patient-data-server
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adding ouath2 client support via devise-oauth2-providable fork that w…
…orks with mongoid. Adding mitre openid server param to the UI
- Loading branch information
Showing
8 changed files
with
66 additions
and
3 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
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 |
---|---|---|
|
@@ -7,6 +7,7 @@ | |
class SectionRegistry | ||
include Singleton | ||
|
||
attr_reader :extensions | ||
def initialize | ||
@extensions = [] | ||
end | ||
|
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,27 @@ | ||
require 'test_helper' | ||
|
||
# This is just some simple testing to see that devise is configured with the OAUTH2 provider | ||
# We are not testing the entirty of the provider, we are counting on the tests for that to cover that | ||
# it works. We are only testing here that it is configured | ||
class DeviseOauth2ProviderTest < ActionController::TestCase | ||
include Devise::TestHelpers | ||
setup do | ||
Devise::Oauth2Providable::Client.destroy_all | ||
@controller = Devise::Oauth2Providable::AuthorizationsController.new | ||
@record = FactoryGirl.create(:record, :with_lab_results) | ||
@user = FactoryGirl.create(:user) | ||
@client = FactoryGirl.create(:client) | ||
sign_in @user | ||
end | ||
|
||
test "Should Redirect to client URL without an auth token " do | ||
|
||
get :new, :client_id => @client.cidentifier, :redirect_uri => @client.redirect_uri, :response_type => 'code', :use_route => 'devise_oauth2_providable' | ||
assert_response :success | ||
end | ||
|
||
test "Should return error with bad redirect utl " do | ||
get :new, :client_id => @client.cidentifier, :redirect_uri => "#{@client.redirect_uri}/t", :response_type => 'code', :use_route => 'devise_oauth2_providable' | ||
assert_response 400, "Should respond with error message if redirect does not match uri" | ||
end | ||
end |