API¶
Handlers¶
Handlers for shibboleth endpoints.
Handle sign-in/up functionality.
Checks if user is already registered. If not registered, the function registers a new user and authenticates the new user. If there already exists a user object in the database, the user is only authenticated and logged in.
Parameters: - remote – The remote application.
- resp – The response.
Returns: Redirect response.
Views¶
Blueprint for handling Shibboleth callbacks.
Authorize handler callback.
This function is called when the user is redirected from the IdP to the web application. It handles the authorization.
Parameters: remote_app (str) – The remote application key name. Returns: Return redirect response or abort in case of failure. Return type: flask.Response
-
shibboleth_authenticator.views.
init_saml_auth
(req, saml_path)[source]¶ Init SAML authentication for remote application.
Parameters: Returns:
-
shibboleth_authenticator.views.
login
(remote_app)[source]¶ Redirect user to remote application for authentication.
This function redirects the user to the IdP for authorization. After having authorized the IdP redirects the user back to this web application as configured in your
saml_path
.Parameters: remote_app (str) – The remote application key name. Returns: - Return redirect response to IdP or abort in case
- of failure.
Return type: flask.Response
-
shibboleth_authenticator.views.
metadata
(remote_app)[source]¶ Create remote application specific metadata xml for ServiceProvider.
The metadata-XML response is created using the settings provided in the remote app’s specific
saml_path
.Parameters: remote_app (str) – The remote application key name. Returns: The SP’s metadata xml. Return type: flask.Response
-
shibboleth_authenticator.views.
prepare_flask_request
(request)[source]¶ Prepare flask request.
Parameters: request (flask.Request) – The Flask request. Returns: Returns dictionary used in init_saml_auth()
.Return type: dict