Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
J
jumpserver
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ops
jumpserver
Commits
aebf32d7
Commit
aebf32d7
authored
Nov 14, 2019
by
BaiJiangJie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Update] 删除 py-radius 依赖
parent
870e04fe
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
32 deletions
+0
-32
radius.py
apps/authentication/backends/radius.py
+0
-31
requirements.txt
requirements/requirements.txt
+0
-1
No files found.
apps/authentication/backends/radius.py
View file @
aebf32d7
...
...
@@ -51,34 +51,3 @@ class RadiusBackend(CreateUserMixin, RADIUSBackend):
class
RadiusRealmBackend
(
CreateUserMixin
,
RADIUSRealmBackend
):
pass
class
TestRadiusPyRadius
(
object
):
def
__init__
(
self
,
username
,
password
):
self
.
username
=
username
self
.
password
=
password
self
.
secret
=
settings
.
CONFIG
.
RADIUS_SECRET
self
.
host
=
settings
.
CONFIG
.
RADIUS_SERVER
self
.
port
=
settings
.
CONFIG
.
RADIUS_PORT
def
attr_to_json
(
self
):
attr_json
=
{
'username'
:
self
.
username
,
'password'
:
self
.
password
,
'secret'
:
self
.
secret
,
'host'
:
self
.
host
,
'port'
:
self
.
port
}
return
attr_json
def
authenticate
(
self
):
import
radius
print
(
'Authenticate Radius start: '
)
params
=
self
.
attr_to_json
()
print
(
"Params: {}"
.
format
(
params
))
r
=
radius
.
authenticate
(
self
.
username
,
self
.
password
,
self
.
secret
,
host
=
self
.
host
,
port
=
int
(
self
.
port
)
)
print
(
"Result: {}"
.
format
(
r
))
requirements/requirements.txt
View file @
aebf32d7
...
...
@@ -89,4 +89,3 @@ flower==0.9.3
channels-redis==2.4.0
channels==2.3.0
daphne==2.3.0
py-radius==2.0.2.post1
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