Skip to content

Commit 1460564

Browse files
refactor: change authsamlhelper class to module
Change authsamlhelper class to module, mark as helper for and prefix correctly
1 parent 0d6f7c2 commit 1460564

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

app/api/authentication_api.rb

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
require 'json/jwt'
33
require 'onelogin/ruby-saml'
44
require 'entities/user_entity'
5-
require 'helpers/auth/auth_saml_helper.rb'
65
#
76
# Provides the authentication API for Doubtfire.
87
# Users can sign in via email and password and receive an auth token
@@ -86,10 +85,10 @@ class AuthenticationApi < Grape::API
8685
end
8786
post '/auth/jwt' do
8887
# this endpoint is being deprecated and will be removed
89-
AuthSAMLHelper.auth_saml2 params[:SAMLResponse]
88+
AuthSamlHelper.auth_saml2 params[:SAMLResponse]
9089
end
9190
post '/auth/saml2' do
92-
AuthSAMLHelper.auth_saml2 params[:SAMLResponse]
91+
AuthSamlHelper.auth_saml2 params[:SAMLResponse]
9392
end
9493
end
9594

app/helpers/auth/auth_saml_helper.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
require 'json/jwt'
22
require 'onelogin/ruby-saml'
33

4-
class AuthSamlHelper
4+
module Auth::AuthSamlHelper
55
def auth_saml2 (respSAML)
66
response = OneLogin::RubySaml::Response.new(respSAML, allowed_clock_drift: 1.second,
77
settings: AuthenticationHelpers.saml_settings)

0 commit comments

Comments
 (0)