11"""Authentication service for OSS mode.
22
33Follows the same interface as ScalekitService to ensure compatibility.
4- Handles user signup, login, logout, and session management using Django's
5- built-in authentication system.
4+ Handles user signup, login, logout, and session management using
5+ Django's built-in authentication system.
66"""
77
88import logging
@@ -41,7 +41,8 @@ class AuthenticationService:
4141 """Authentication service for OSS mode.
4242
4343 Implements the same interface as ScalekitService for compatibility.
44- Provides signup, login, logout, and session management using Django sessions.
44+ Provides signup, login, logout, and session management using Django
45+ sessions.
4546 """
4647
4748 def __init__ (self ) -> None :
@@ -338,13 +339,19 @@ def get_roles(self) -> list:
338339 def add_organization_user_role (
339340 self , organization_id : str , user : Any , user_role_name : str
340341 ) -> Optional [list ]:
341- """Add role to user. OSS stub."""
342+ """Add role to user.
343+
344+ OSS stub.
345+ """
342346 return None # Not supported in OSS
343347
344348 def assign_role_to_org_user (
345349 self , organization_id : str , user : Any , user_role_name : str = "admin"
346350 ) -> list :
347- """Assign role to organization user. OSS stub."""
351+ """Assign role to organization user.
352+
353+ OSS stub.
354+ """
348355 return [] # Not supported in OSS
349356
350357 def get_organization_role_of_user (
@@ -360,13 +367,19 @@ def get_organization_role_of_user(
360367 def invite_user (
361368 self , admin : Any , org_id : str , email : str , role : str = "admin"
362369 ) -> bool :
363- """Invite a user to organization. OSS stub."""
370+ """Invite a user to organization.
371+
372+ OSS stub.
373+ """
364374 return False # Not supported in OSS
365375
366376 def remove_users_from_organization (
367377 self , admin : Any , organization_id : str , user_emails : list
368378 ) -> list :
369- """Remove users from organization. OSS stub."""
379+ """Remove users from organization.
380+
381+ OSS stub.
382+ """
370383 return [] # Not supported in OSS
371384
372385 def get_organizations_users (self , org_id : str ) -> list :
@@ -380,11 +393,17 @@ def get_organizations_users(self, org_id: str) -> list:
380393 ]
381394
382395 def get_invitations (self , organization_id : str ) -> list :
383- """Get pending invitations. OSS returns empty."""
396+ """Get pending invitations.
397+
398+ OSS returns empty.
399+ """
384400 return []
385401
386402 def delete_invitation (self , organization_id : str , invitation_id : str ) -> bool :
387- """Delete invitation. OSS stub."""
403+ """Delete invitation.
404+
405+ OSS stub.
406+ """
388407 return False
389408
390409 # =========================================================================
@@ -418,11 +437,17 @@ def get_organizations_by_user_id(self, user_id: str) -> list:
418437 ]
419438
420439 def create_roles (self , role : Any ) -> Any :
421- """Create role. OSS stub."""
440+ """Create role.
441+
442+ OSS stub.
443+ """
422444 return None
423445
424446 def delete_role (self , role_id : str ) -> bool :
425- """Delete role. OSS stub."""
447+ """Delete role.
448+
449+ OSS stub.
450+ """
426451 return False
427452
428453 def forgot_password (self , request : HttpRequest ) -> Response :
@@ -550,7 +575,10 @@ def validate_reset_token(self, request: HttpRequest) -> Response:
550575 )
551576
552577 def reset_user_password (self , user : Any ) -> Response :
553- """Reset user password. OSS stub (legacy interface)."""
578+ """Reset user password.
579+
580+ OSS stub (legacy interface).
581+ """
554582 return Response (
555583 status = status .HTTP_400_BAD_REQUEST ,
556584 data = {"error" : "Password reset not supported in OSS mode." },
0 commit comments