Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
9926a21b
Commit
9926a21b
authored
Jul 14, 2016
by
Jacob Vosmaer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Put key in constant
parent
7bc16acd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
app/controllers/omniauth_kerberos_spnego_controller.rb
app/controllers/omniauth_kerberos_spnego_controller.rb
+3
-1
lib/omniauth/strategies/kerberos_spnego.rb
lib/omniauth/strategies/kerberos_spnego.rb
+3
-1
No files found.
app/controllers/omniauth_kerberos_spnego_controller.rb
View file @
9926a21b
require
'omniauth/strategies/kerberos_spnego'
class
OmniauthKerberosSpnegoController
<
ApplicationController
include
KerberosSpnegoHelper
...
...
@@ -5,7 +7,7 @@ class OmniauthKerberosSpnegoController < ApplicationController
def
negotiate
if
spnego_provided?
&&
(
krb_principal
=
spnego_credentials!
(
spnego_token
))
session
[
:kerberos_spnego_principal_name
]
=
krb_principal
session
[
OmniAuth
::
Strategies
::
KerberosSpnego
::
SESSION_KEY
]
=
krb_principal
send_final_spnego_response
redirect_to
user_kerberos_spnego_omniauth_callback_path
return
...
...
lib/omniauth/strategies/kerberos_spnego.rb
View file @
9926a21b
...
...
@@ -6,6 +6,8 @@ module OmniAuth
include
OmniAuth
::
Strategy
include
Gitlab
::
Routing
.
url_helpers
SESSION_KEY
=
:kerberos_spnego_principal_name
option
:name
,
'kerberos_spnego'
uid
{
username
}
...
...
@@ -25,7 +27,7 @@ module OmniAuth
def
principal_name
return
@principal_name
if
defined?
(
@principal_name
)
@principal_name
=
session
.
delete
(
:kerberos_spnego_principal_name
)
@principal_name
=
session
.
delete
(
SESSION_KEY
)
end
def
request_phase
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment