Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
simplesamlphp
Manage
Activity
Members
Labels
Plan
Jira
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Perun
Perun ProxyIdP
v1
simplesamlphp
Commits
16d0bb79
Commit
16d0bb79
authored
9 years ago
by
Thijs Kinkhorst
Browse files
Options
Downloads
Patches
Plain Diff
Add parameter 'realm' that will be suffixed to the username entered.
parent
367c1aac
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
modules/radius/docs/radius.txt
+9
-0
9 additions, 0 deletions
modules/radius/docs/radius.txt
modules/radius/lib/Auth/Source/Radius.php
+12
-2
12 additions, 2 deletions
modules/radius/lib/Auth/Source/Radius.php
with
21 additions
and
2 deletions
modules/radius/docs/radius.txt
+
9
−
0
View file @
16d0bb79
...
...
@@ -52,6 +52,15 @@ authentication source which uses the `radius:Radius` module to
*/
'nas_identifier' => 'client.example.org',
/*
* An optional realm that will be suffixed to the username entered
* by the user. When set to "example.edu", and the user enters
* "bob" as their username, the radius server will be queried for
* the username "bob@example.edu".
* Optional, defaults to NULL.
*/
'realm' => 'example.edu',
/*
* The attribute name we should store the username in. Ths username
* will not be saved in any attribute if this is NULL.
...
...
This diff is collapsed.
Click to expand it.
modules/radius/lib/Auth/Source/Radius.php
+
12
−
2
View file @
16d0bb79
...
...
@@ -39,6 +39,11 @@ class sspmod_radius_Auth_Source_Radius extends sspmod_core_Auth_UserPassBase
*/
private
$retries
;
/**
* The realm to be added to the entered username.
*/
private
$realm
;
/**
* The attribute name where the username should be stored.
*/
...
...
@@ -90,6 +95,7 @@ class sspmod_radius_Auth_Source_Radius extends sspmod_core_Auth_UserPassBase
}
$this
->
timeout
=
$config
->
getInteger
(
'timeout'
,
5
);
$this
->
retries
=
$config
->
getInteger
(
'retries'
,
3
);
$this
->
realm
=
$config
->
getString
(
'realm'
,
null
);
$this
->
usernameAttribute
=
$config
->
getString
(
'username_attribute'
,
null
);
$this
->
nasIdentifier
=
$config
->
getString
(
'nas_identifier'
,
isset
(
$_SERVER
[
'HTTP_HOST'
])
?
$_SERVER
[
'HTTP_HOST'
]
:
'localhost'
);
...
...
@@ -139,10 +145,14 @@ class sspmod_radius_Auth_Source_Radius extends sspmod_core_Auth_UserPassBase
radius_strerror
(
$radius
));
}
radius_put_attr
(
$radius
,
RADIUS_USER_NAME
,
$username
);
if
(
$this
->
realm
===
null
)
{
radius_put_attr
(
$radius
,
RADIUS_USER_NAME
,
$username
);
}
else
{
radius_put_attr
(
$radius
,
RADIUS_USER_NAME
,
$username
.
'@'
.
$this
->
realm
);
}
radius_put_attr
(
$radius
,
RADIUS_USER_PASSWORD
,
$password
);
if
(
$this
->
nasIdentifier
!=
null
)
{
if
(
$this
->
nasIdentifier
!=
=
null
)
{
radius_put_attr
(
$radius
,
RADIUS_NAS_IDENTIFIER
,
$this
->
nasIdentifier
);
}
...
...
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