Skip to content

Commit

Permalink
Move API OpenID-Connect support to Apache configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
jvlcek committed May 6, 2020
1 parent 927b99f commit a6feb2c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 181 deletions.
18 changes: 3 additions & 15 deletions app/models/authenticator/httpd.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
module Authenticator
class Httpd < Base
include Oauth2

def self.proper_name
'External httpd'
end
Expand All @@ -27,19 +25,9 @@ def user_authorizable_without_authentication?
true
end

def _authenticate(username, password, request)
return false if request.blank?
return true if request.headers['X-REMOTE-USER'].present? # Provided by Apache auth modules

if oidc_configured?
if username.present?
oauth2_basic_authenticate(username, password, request)
else
oauth2_token_authenticate(request)
end
end

request.headers['X-REMOTE-USER'].present?
def _authenticate(_username, _password, request)
request.present? &&
request.headers['X-REMOTE-USER'].present?
end

def failure_reason(_username, request)
Expand Down
166 changes: 0 additions & 166 deletions app/models/authenticator/httpd/oauth2.rb

This file was deleted.

0 comments on commit a6feb2c

Please sign in to comment.