Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
sso
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
8
Issues
8
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
ai
sso
Commits
c9f96da1
Commit
c9f96da1
authored
Aug 19, 2013
by
ale
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make the mod_sso .htaccess test use its own SSOService
parent
8b6827ec
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
src/mod_sso/test/htdocs/protected-htaccess/.htaccess
src/mod_sso/test/htdocs/protected-htaccess/.htaccess
+1
-1
src/mod_sso/test/httpd_integration_test.py
src/mod_sso/test/httpd_integration_test.py
+5
-5
No files found.
src/mod_sso/test/htdocs/protected-htaccess/.htaccess
View file @
c9f96da1
AuthType
SSO
SSOService service.example.com/
SSOService service.example.com/
protected-htaccess/
Require
user
testuser
src/mod_sso/test/httpd_integration_test.py
View file @
c9f96da1
...
...
@@ -96,8 +96,8 @@ class HttpdIntegrationTest(unittest.TestCase):
def
tearDown
(
self
):
_stop_httpd
(
self
.
httpd
)
def
_ticket
(
self
,
user
=
"testuser"
,
group
=
"group1"
):
t
=
sso
.
Ticket
(
user
,
"service.example.com/"
,
"example.com"
,
set
([
group
]))
def
_ticket
(
self
,
user
=
"testuser"
,
group
=
"group1"
,
service
=
"service.example.com/"
):
t
=
sso
.
Ticket
(
user
,
service
,
"example.com"
,
set
([
group
]))
signedt
=
self
.
signer
.
sign
(
t
)
print
'ticket:'
,
signedt
return
signedt
...
...
@@ -172,15 +172,15 @@ class HttpdIntegrationTest(unittest.TestCase):
(
"protected-htaccess -> redirect"
,
{
"url"
:
"/protected-htaccess/index.html"
,
"status"
:
302
,
"location"
:
"https://login.example.com/?s=service.example.com%2F&d=https%3A%2F%2Fservice.example.com%2Fprotected-htaccess%2Findex.html"
}),
"location"
:
"https://login.example.com/?s=service.example.com%2F
protected-htaccess%2F
&d=https%3A%2F%2Fservice.example.com%2Fprotected-htaccess%2Findex.html"
}),
(
"protected-htaccess with cookie -> ok"
,
{
"url"
:
"/protected-htaccess/index.html"
,
"cookie"
:
mkcookie
(
self
.
_ticket
()),
"cookie"
:
mkcookie
(
self
.
_ticket
(
service
=
"service.example.com/protected-htaccess/"
)),
"status"
:
200
,
"body"
:
"ok"
}),
(
"protected-htaccess with cookie wrong user -> fail"
,
{
"url"
:
"/protected-htaccess/index.html"
,
"cookie"
:
mkcookie
(
self
.
_ticket
(
user
=
"wronguser"
)),
"cookie"
:
mkcookie
(
self
.
_ticket
(
user
=
"wronguser"
,
service
=
"service.example.com/protected-htaccess/"
)),
"status"
:
401
}),
]
for
name
,
check
in
checks
:
...
...
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