gws.plugin.auth_method.web.action

The auth action, the client API of the web authentication method.

Source code: gws.plugin.auth_method.web.action

Module Contents

class gws.plugin.auth_method.web.action.Config

Bases: gws.base.action.Config

Login, logout and session checks for web-based authentication.

class gws.plugin.auth_method.web.action.Object

Bases: gws.base.action.Object

Action for web logins, logouts and session checks.

Provides the client API of the web authentication method and passes the requests to that method.

method: gws.plugin.auth_method.web.core.Object

The web authentication method.

check(req: gws.WebRequester, p: gws.Request) → gws.plugin.auth_method.web.core.UserResponse

Return the current user.

configure()
configure_method()

Find the web authentication method.

Returns:

The first configured method of type web, or None.

login(req: gws.WebRequester, p: gws.plugin.auth_method.web.core.LoginRequest) → gws.plugin.auth_method.web.core.LoginResponse

Log in with a username and a password.

logout(req: gws.WebRequester, p: gws.Request) → gws.plugin.auth_method.web.core.LogoutResponse

Log out the current user.

mfa_restart(req: gws.WebRequester, p: gws.Request) → gws.plugin.auth_method.web.core.LoginResponse

Restart the multi-factor transaction, for example to send a new code.

mfa_verify(req: gws.WebRequester, p: gws.plugin.auth_method.web.core.MfaVerifyRequest) → gws.plugin.auth_method.web.core.LoginResponse

Verify a multi-factor code and complete the login.

class gws.plugin.auth_method.web.action.Props

Bases: gws.base.action.Props