user.integration

Module Contents

Classes

UserApp

Provides user integration.

Functions

authentication_provider(...)

handle_authentication(→ webob.response.Response)

handle_provider_authorisation(→ webob.response.Response)

handle_provider_logout(→ webob.response.Response)

We contact the provider that the user wants to log out and redirecting

get_js_path(→ str)

get_preview_widget_asset(→ Iterator[str])

auto_login_tween_factory(→ Callable[[CoreRequest], ...)

Attributes

_AuthenticationProvider

user.integration._AuthenticationProvider: typing_extensions.TypeAlias[source]
class user.integration.UserApp[source]

Bases: more.webassets.WebassetsApp

Provides user integration.

Historically it was not necessary to use this app for user integration, and most features are still possible without it. However, third-party authentication providers only work if the UserApp is integrated.

The following configuration options are accepted:

Authentication_providers:

A dictionary of provider-specific configuration settings, see onegov.user.auth.provider for more information.

property providers: Sequence[_AuthenticationProvider][source]

Returns a tuple of availabe providers.

auto_login_provider: onegov.user.auth.provider.AuthenticationProvider | None[source]
provider(name: str) onegov.user.auth.provider.AuthenticationProvider | None[source]
on_login(request: onegov.core.request.CoreRequest, user: onegov.user.User) None[source]

Called by the auth module, whenever a successful login was completed.

redirect_after_login(identity: morepath.Identity, request: onegov.core.request.CoreRequest, default: str) str | None[source]

Returns the path to redirect after login, given the received identity, the request and the default path.

Returns a path, or None if the default path should be used.

configure_authentication_providers(**cfg: Any) None[source]
user.integration.authentication_provider(app: UserApp, name: str, to: str = '/') onegov.user.auth.provider.AuthenticationProvider | None[source]
user.integration.handle_authentication(self: onegov.user.auth.provider.SeparateAuthenticationProvider, request: onegov.core.request.CoreRequest) webob.response.Response[source]
user.integration.handle_provider_authorisation(self: onegov.user.auth.provider.OauthProvider, request: onegov.core.request.CoreRequest) webob.response.Response[source]
user.integration.handle_provider_logout(self: onegov.user.auth.provider.AuthenticationProvider, request: onegov.core.request.CoreRequest) webob.response.Response[source]

We contact the provider that the user wants to log out and redirecting him to our main logout view.

user.integration.get_js_path() str[source]
user.integration.get_preview_widget_asset() Iterator[str][source]
user.integration.auto_login_tween_factory(app: UserApp, handler: Callable[[CoreRequest], Response]) Callable[[CoreRequest], Response][source]