magpie.api.login.login ====================== .. py:module:: magpie.api.login.login Attributes ---------- .. autoapisummary:: magpie.api.login.login.LOGGER magpie.api.login.login.MAGPIE_DEFAULT_PROVIDER magpie.api.login.login.MAGPIE_INTERNAL_PROVIDERS magpie.api.login.login.MAGPIE_EXTERNAL_PROVIDERS magpie.api.login.login.MAGPIE_PROVIDER_KEYS Functions --------- .. autoapisummary:: magpie.api.login.login.process_sign_in_external magpie.api.login.login.verify_provider magpie.api.login.login.signin_in_param_view magpie.api.login.login.sign_in_view magpie.api.login.login.login_success_ziggurat_view magpie.api.login.login.login_failure_view magpie.api.login.login.new_user_external magpie.api.login.login.login_success_external magpie.api.login.login.authomatic_login_view magpie.api.login.login.sign_out_view magpie.api.login.login.get_session_view magpie.api.login.login.get_providers_view Module Contents --------------- .. py:data:: LOGGER .. py:data:: MAGPIE_DEFAULT_PROVIDER .. py:data:: MAGPIE_INTERNAL_PROVIDERS .. py:data:: MAGPIE_EXTERNAL_PROVIDERS .. py:data:: MAGPIE_PROVIDER_KEYS .. py:function:: process_sign_in_external(request, username, provider) .. py:function:: verify_provider(provider_name: magpie.typedefs.Str) -> None Verifies that the specified name is a valid external provider against the login configuration providers. :raises HTTPNotFound: if provider name is not one of known providers. .. py:function:: signin_in_param_view(request) Signs in a user session using query parameters. .. py:function:: sign_in_view(request) Signs in a user session. .. py:function:: login_success_ziggurat_view(request) Response from redirect upon successful login with valid user credentials. Header ``Set-Cookie`` from this response will allow creation of the response cookies. .. seealso:: - :func:`sign_in` .. py:function:: login_failure_view(request, reason=None) Response from redirect upon login failure, either because of invalid or incorrect user credentials. .. seealso:: - :func:`sign_in` .. py:function:: new_user_external(external_user_name: magpie.typedefs.Str, external_id: magpie.typedefs.Str, email: magpie.typedefs.Str, provider_name: magpie.typedefs.Str, db_session: magpie.typedefs.Session) -> magpie.models.User Create new user with an External Identity. .. py:function:: login_success_external(request: pyramid.request.Request, external_user_name: magpie.typedefs.Str, external_id: magpie.typedefs.Str, email: magpie.typedefs.Str, provider_name: magpie.typedefs.Str) -> pyramid.httpexceptions.HTTPException Generates the login response in case of successful external provider identification. .. py:function:: authomatic_login_view(request) Signs in a user session using an external provider. .. py:function:: sign_out_view(request) Signs out the current user session. .. py:function:: get_session_view(request) Get information about current session. .. py:function:: get_providers_view(request) Get list of login providers.