no_new_no_map_duplicate_helmholtz Strategy

Classes:

AuthentificationViewset()

An authentication viewset.

class django_helmholtz_aai.views.auth.no_new_no_map_duplicate_helmholtz.AuthentificationViewset

Bases: AuthentificationViewset

An authentication viewset.

The following strategy is applied for new users:

  • when the email exists already:
    • when the user with the mail already has a helmholtz user:
      • create new user

    • when the user with the mail does not have a helmholtz user:
      • prevent login

  • when the email does not exist:
    • prevent login

Classes:

AuthentificationView(**kwargs)

An authentication view.

class AuthentificationView(**kwargs)

Bases: MapUserMixin, NoUserExistsMixin, CheckEmailMixin, AuthentificationView

An authentication 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_helmholtz_user_exists

no_user_exists

vo_not_allowed

email_exists = 'email_exists'
email_not_verified = 'email_not_verified'
helmholtz_email_exists = 'helmholtz_email_exists'
no_helmholtz_user_exists = 'no_helmholtz_user_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).