-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
704 additions
and
258 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,11 @@ | ||
"""Main module for Ralph's LRS API authentication.""" | ||
|
||
from ralph.api.auth.basic import get_authenticated_user as get_basic_user | ||
from ralph.api.auth.oidc import get_authenticated_user as get_oidc_user | ||
from ralph.api.auth.basic import get_basic_auth_user | ||
from ralph.api.auth.oidc import get_oidc_user | ||
from ralph.conf import settings | ||
|
||
# At startup, select the authentication mode that will be used | ||
get_authenticated_user = ( | ||
get_oidc_user | ||
if settings.RUNSERVER_AUTH_BACKEND == settings.AuthBackends.OIDC | ||
else get_basic_user | ||
) | ||
if settings.RUNSERVER_AUTH_BACKEND == settings.AuthBackends.OIDC: | ||
get_authenticated_user = get_oidc_user | ||
else: | ||
get_authenticated_user = get_basic_auth_user |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.