wuttafarm.web.views.auth

Auth views

class wuttafarm.web.views.auth.AuthView(request, context=None)[source]

Auth views

authenticate_user(session, username, password)[source]

We override the default logic in the following way:

First the normal auth handler is invoked, for the actual authentication.

If a user was authenticated via farmOS OAuth2, then a “special OAuth2 value” will have been cached on the user object itself (from within the auth handler logic). We look for that value here, so we can stash it in the user’s web session for sake of future requests.

farmos_oauth_callback()[source]

View for OAuth2 workflow, provided as redirect URL when authorizing.

farmos_oauth_login()[source]

View to initiate OAuth2 workflow.