Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
osticket
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
docker
osticket
Commits
02d6abe7
Commit
02d6abe7
authored
10 years ago
by
Jared Hancock
Browse files
Options
Downloads
Patches
Plain Diff
Implement external authentication for scp
parent
ee91d179
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
include/staff/login.header.php
+1
-0
1 addition, 0 deletions
include/staff/login.header.php
include/staff/login.tpl.php
+19
-5
19 additions, 5 deletions
include/staff/login.tpl.php
scp/css/login.css
+63
-3
63 additions, 3 deletions
scp/css/login.css
scp/login.php
+10
-1
10 additions, 1 deletion
scp/login.php
with
93 additions
and
9 deletions
include/staff/login.header.php
+
1
−
0
View file @
02d6abe7
...
...
@@ -8,6 +8,7 @@ defined('OSTSCPINC') or die('Invalid path');
<meta
http-equiv=
"refresh"
content=
"7200"
/>
<title>
osTicket:: SCP Login
</title>
<link
rel=
"stylesheet"
href=
"css/login.css"
type=
"text/css"
/>
<link
type=
"text/css"
rel=
"stylesheet"
href=
"
<?php
echo
ROOT_PATH
;
?>
css/font-awesome.min.css"
>
<meta
name=
"robots"
content=
"noindex"
/>
<meta
http-equiv=
"cache-control"
content=
"no-cache"
/>
<meta
http-equiv=
"pragma"
content=
"no-cache"
/>
...
...
This diff is collapsed.
Click to expand it.
include/staff/login.tpl.php
+
19
−
5
View file @
02d6abe7
...
...
@@ -5,19 +5,33 @@ $info = ($_POST && $errors)?Format::htmlchars($_POST):array();
<div
id=
"loginBox"
>
<h1
id=
"logo"
><a
href=
"index.php"
>
osTicket Staff Control Panel
</a></h1>
<h3>
<?php
echo
Format
::
htmlchars
(
$msg
);
?>
</h3>
<div><small>
<?php
echo
(
$content
)
?
Format
::
display
(
$content
->
getBody
())
:
''
;
?>
</small></div>
<div
class=
"banner"
><small>
<?php
echo
(
$content
)
?
Format
::
display
(
$content
->
getBody
())
:
''
;
?>
</small></div>
<form
action=
"login.php"
method=
"post"
>
<?php
csrf_token
();
?>
<input
type=
"hidden"
name=
"do"
value=
"scplogin"
>
<fieldset>
<input
type=
"text"
name=
"userid"
id=
"name"
value=
"
<?php
echo
$info
[
'userid'
];
?>
"
placeholder=
"username"
autocorrect=
"off"
autocapitalize=
"off"
>
<input
type=
"password"
name=
"passwd"
id=
"pass"
placeholder=
"password"
autocorrect=
"off"
autocapitalize=
"off"
>
<?php
if
(
$show_reset
&&
$cfg
->
allowPasswordReset
())
{
?>
<h3
style=
"display:inline"
><a
href=
"pwreset.php"
>
Forgot my password
</a></h3>
<?php
}
?>
<input
class=
"submit"
type=
"submit"
name=
"submit"
value=
"Log In"
>
</fieldset>
<?php
if
(
$show_reset
&&
$cfg
->
allowPasswordReset
())
{
?>
<h3
style=
"display:inline"
><a
href=
"pwreset.php"
>
Forgot my password
</a></h3>
<?php
}
?>
<input
class=
"submit"
type=
"submit"
name=
"submit"
value=
"Log In"
>
</form>
<?php
$ext_bks
=
array
();
foreach
(
StaffAuthenticationBackend
::
allRegistered
()
as
$bk
)
if
(
$bk
instanceof
ExternalAuthentication
)
$ext_bks
[]
=
$bk
;
if
(
count
(
$ext_bks
))
{
?>
<div
class=
"or"
>
<hr/>
</div>
<?php
foreach
(
$ext_bks
as
$bk
)
{
?>
<div
class=
"external-auth"
>
<?php
$bk
->
renderExternalLink
();
?>
</div>
<?php
}
}
?>
</div>
<div
id=
"copyRights"
>
Copyright
©
<a
href=
'http://www.osticket.com'
target=
"_blank"
>
osTicket.com
</a></div>
</body>
...
...
This diff is collapsed.
Click to expand it.
scp/css/login.css
+
63
−
3
View file @
02d6abe7
...
...
@@ -23,7 +23,9 @@ html {
body
{
-webkit-font-smoothing
:
antialiased
;
background
:
url(../images/login-background.jpg)
top
left
repeat-x
#fff
;
background
:
url(../images/login-background.jpg)
;
background-repeat
:
repeat-x
;
background-attachment
:
fixed
;
font-size
:
16px
;
font-smoothing
:
antialiased
;
height
:
100%
;
...
...
@@ -105,15 +107,30 @@ fieldset input {
width
:
96%
;
}
hr
{
margin
:
20px
;
border
:
none
;
height
:
0
;
border-bottom
:
1px
solid
#eee
;
}
div
.banner
{
color
:
#666
;
line-height
:
1.2em
;
}
div
.banner
:not
(
:empty
)
{
margin-bottom
:
1em
;
}
input
.submit
{
border-radius
:
4px
;
display
:
inline-block
;
float
:
right
;
margin
:
0.25em
;
height
:
24px
;
line-height
:
24px
;
font-weight
:
bold
;
border
:
1px
solid
#666666
;
padding
:
0
1
0px
;
padding
:
0
3
0px
;
background
:
url('../images/grey_btn_bg.png?1312910883')
top
left
repeat-x
;
color
:
#333
;
}
...
...
@@ -132,3 +149,46 @@ input.submit:hover, input.submit:active {
#copyRights
a
{
color
:
#888
;
}
.external-auth
{
display
:
inline-block
;
}
.external-auth
+
.external-auth
{
margin-top
:
4px
;
}
a
.external-sign-in
{
text-decoration
:
none
;
}
.external-auth-box
{
vertical-align
:
middle
;
border-radius
:
4px
;
border
:
1px
solid
#777
;
}
.external-auth-icon
{
display
:
inline-block
;
color
:
#333
;
width
:
30px
;
padding
:
5px
10px
;
border-right
:
1px
solid
#ddd
;
}
.external-auth-name
{
color
:
#333
;
width
:
100px
;
padding
:
5px
10px
;
line-height
:
30px
;
font-size
:
11pt
;
}
img
.sign-in-image
{
border
:
none
;
max-height
:
40px
;
max-width
:
200px
;
width
:
auto
;
height
:
auto
;
}
input
[
type
=
text
],
input
[
type
=
password
]
{
border-radius
:
4px
;
padding
:
5px
;
}
This diff is collapsed.
Click to expand it.
scp/login.php
+
10
−
1
View file @
02d6abe7
...
...
@@ -40,8 +40,17 @@ if($_POST) {
$msg
=
$errors
[
'err'
]
?
$errors
[
'err'
]
:
'Invalid login'
;
$show_reset
=
true
;
}
elseif
(
$_GET
[
'do'
])
{
switch
(
$_GET
[
'do'
])
{
case
'ext'
:
// Lookup external backend
if
(
$bk
=
StaffAuthenticationBackend
::
getBackend
(
$_GET
[
'bk'
]))
$bk
->
triggerAuth
();
}
Http
::
redirect
(
'login.php'
);
}
// Consider single sign-on authentication backends
else
if
(
!
$thisstaff
||
!
(
$thisstaff
->
getId
()
||
$thisstaff
->
isValid
()))
{
elseif
(
!
$thisstaff
||
!
(
$thisstaff
->
getId
()
||
$thisstaff
->
isValid
()))
{
if
((
$user
=
StaffAuthenticationBackend
::
processSignOn
(
$errors
,
false
))
&&
(
$user
instanceof
StaffSession
))
@
header
(
"Location:
$dest
"
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment