Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
kszkepzes-backend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
JetBrains YouTrack
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
KSZK
DevTeam
kszkepzes
old
kszkepzes-backend
Commits
b5bcef8f
Commit
b5bcef8f
authored
3 months ago
by
Pomucz Tamás András
Browse files
Options
Downloads
Patches
Plain Diff
Revert "Use schacc as email"
This reverts commit
5c0639ac
.
parent
5c0639ac
No related branches found
No related tags found
No related merge requests found
Pipeline
#51665
passed
3 months ago
Stage: Test and Flake8
Stage: Docker Build
Stage: deploy
Changes
2
Pipelines
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/kszkepzes/oidc_auth.py
+0
-7
0 additions, 7 deletions
src/kszkepzes/oidc_auth.py
src/kszkepzes/settings/base.py
+1
-1
1 addition, 1 deletion
src/kszkepzes/settings/base.py
with
1 addition
and
8 deletions
src/kszkepzes/oidc_auth.py
+
0
−
7
View file @
b5bcef8f
...
@@ -4,17 +4,10 @@ from common.email import registration
...
@@ -4,17 +4,10 @@ from common.email import registration
class
JSOIDCAuthBackend
(
OIDCAuthenticationBackend
):
class
JSOIDCAuthBackend
(
OIDCAuthenticationBackend
):
def
get_email
(
self
,
claims
):
sam_account_name
=
claims
.
get
(
'
directory.sch.bme.hu:sAMAccountName
'
)
if
sam_account_name
:
return
f
"
{
sam_account_name
}
@sch.bme.hu
"
return
""
def
create_user
(
self
,
claims
):
def
create_user
(
self
,
claims
):
user
=
super
(
JSOIDCAuthBackend
,
self
).
create_user
(
claims
)
user
=
super
(
JSOIDCAuthBackend
,
self
).
create_user
(
claims
)
user
.
first_name
=
claims
.
get
(
'
given_name
'
,
''
)
user
.
first_name
=
claims
.
get
(
'
given_name
'
,
''
)
user
.
last_name
=
claims
.
get
(
'
family_name
'
,
''
)
user
.
last_name
=
claims
.
get
(
'
family_name
'
,
''
)
user
.
email
=
self
.
get_email
(
claims
)
user
.
save
()
user
.
save
()
models
.
Profile
.
objects
.
create
(
user
=
user
)
models
.
Profile
.
objects
.
create
(
user
=
user
)
if
user
.
email
is
not
None
:
if
user
.
email
is
not
None
:
...
...
This diff is collapsed.
Click to expand it.
src/kszkepzes/settings/base.py
+
1
−
1
View file @
b5bcef8f
...
@@ -154,7 +154,7 @@ OIDC_OP_TOKEN_ENDPOINT = os.environ.get('OIDC_TOKEN_ENDPOINT')
...
@@ -154,7 +154,7 @@ OIDC_OP_TOKEN_ENDPOINT = os.environ.get('OIDC_TOKEN_ENDPOINT')
OIDC_OP_USER_ENDPOINT
=
os
.
environ
.
get
(
'
OIDC_USERINFO_ENDPOINT
'
)
OIDC_OP_USER_ENDPOINT
=
os
.
environ
.
get
(
'
OIDC_USERINFO_ENDPOINT
'
)
OIDC_OP_JWKS_ENDPOINT
=
os
.
environ
.
get
(
'
OIDC_JWKS_ENDPOINT
'
)
OIDC_OP_JWKS_ENDPOINT
=
os
.
environ
.
get
(
'
OIDC_JWKS_ENDPOINT
'
)
OIDC_RP_SIGN_ALGO
=
os
.
environ
.
get
(
'
OIDC_SIGN_ALGO
'
,
'
RS256
'
)
OIDC_RP_SIGN_ALGO
=
os
.
environ
.
get
(
'
OIDC_SIGN_ALGO
'
,
'
RS256
'
)
OIDC_RP_SCOPES
=
os
.
environ
.
get
(
'
OIDC_RP_SCOPES
'
,
'
openid email profile offline_access
directory.sch.bme.hu:sAMAccountName
'
)
OIDC_RP_SCOPES
=
os
.
environ
.
get
(
'
OIDC_RP_SCOPES
'
,
'
openid email profile offline_access
'
)
OIDC_VERIFY_KID
=
False
OIDC_VERIFY_KID
=
False
OIDC_EXEMPT_URLS
=
[
"
/healthz/
"
,
"
/admin/
"
,
"
/oidc/
"
]
OIDC_EXEMPT_URLS
=
[
"
/healthz/
"
,
"
/admin/
"
,
"
/oidc/
"
]
LOGIN_REDIRECT_URL
=
"
/
"
LOGIN_REDIRECT_URL
=
"
/
"
...
...
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