Skip to content

Commit

Permalink
Use fail! in callback_phase
Browse files Browse the repository at this point in the history
The omniauth library provides a fail! method to hook a failure in a
plugin, which the azure plugin isn't using.

AzureAD#17
  • Loading branch information
daveclay committed Mar 26, 2018
1 parent 99c9434 commit 387cd25
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/omniauth/strategies/azure_activedirectory.rb
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ def request_phase
# the authentication process. It is called after the user enters
# credentials at the authorization endpoint.
def callback_phase
error = request.params['error_reason'] || request.params['error']
fail(OAuthError, error) if error
error = request.params['error_description'] || request.params['error_reason'] || request.params['error']
return fail!(error) if error
@session_state = request.params['session_state']
@id_token = request.params['id_token']
@code = request.params['code']
Expand Down
2 changes: 1 addition & 1 deletion omniauth-azure-activedirectory.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Gem::Specification.new do |s|
s.email = '[email protected]'
s.summary = 'Azure Active Directory strategy for OmniAuth'
s.description = 'Allows developers to authenticate to AAD'
s.homepage = 'https://github.com/AzureAD/omniauth-azure-activedirectory'
s.homepage = 'https://github.com/carezone/omniauth-azure-activedirectory'
s.license = 'MIT'

s.files = `git ls-files`.split("\n")
Expand Down

0 comments on commit 387cd25

Please sign in to comment.