create_new_no_map_no_duplicated_helmholtz Strategy

Classes:

AuthentificationViewset()

An authentication viewset.

class django_helmholtz_aai.views.auth.create_new_no_map_no_duplicated_helmholtz.AuthentificationViewset

Bases: AuthentificationViewset

An authentication viewset.

The following strategy is applied for new users:

  • when the email exists already: - prevent login

  • when the email does not exist: - create new user

Classes:

AuthentificationView(**kwargs)

An authentification view.

class AuthentificationView(**kwargs)

Bases: CheckEmailMixin, AuthentificationView

An authentification view.

Classes:

PermissionDeniedReasons(value)

An enumeration.

Methods:

handle_new_user(userinfo)

Handle the registration of a new user.

has_permission()

Check if the user has permission to login.

class PermissionDeniedReasons(value)

Bases: TextChoices

An enumeration.

Attributes:

email_exists

email_not_verified

helmholtz_email_exists

no_user_exists

vo_not_allowed

email_exists = 'email_exists'
email_not_verified = 'email_not_verified'
helmholtz_email_exists = 'helmholtz_email_exists'
no_user_exists = 'no_user_exists'
vo_not_allowed = 'vo_not_allowed'
handle_new_user(userinfo: Dict[str, Any]) Tuple[HelmholtzUser | None, Any]

Handle the registration of a new user.

has_permission() bool

Check if the user has permission to login.

This method checks, if the user belongs to the specified HELMHOLTZ_ALLOWED_VOS and verifies that the email does not exist (if this is desired, see HELMHOLTZ_EMAIL_DUPLICATES_ALLOWED setting).