def METHOD_NAME(self, request, **kwargs):
    self.check_permissions(request, 'get_token', None)
    auth_plugins = get_auth_plugins()
    login_type = request.DATA.get("type", "").lower()
    if login_type == "normal":
        # Default login process
        data = get_token(request.DATA)
    elif login_type in auth_plugins:
        data = auth_plugins[login_type]['login_func'](request)
    else:
        raise exc.BadRequest(_("invalid login type"))
    # Processing invitation token
    invitation_token = request.DATA.get("invitation_token", None)
    if invitation_token:
        accept_invitation_by_existing_user(invitation_token, data['id'])
    return response.Ok(data)