Raxol.Auth (Raxol v0.4.0)
View SourceAuthentication module for handling user authentication and authorization.
This module provides functionality for:
- User authentication
- Token generation and validation
- Role-based access control
- Session management
Summary
Functions
Cleans up a user session.
Creates a new session for an authenticated user. (Session logic currently commented out, returns :ok)
Retrieves user information by ID (Calls Accounts).
Retrieves a user by their session ID. NOTE: This function is a stub. Returns the user or nil if not found or session is invalid.
Checks if a user has permission for a specific action (Placeholder).
Checks if a user has the required role.
Validates a session token and returns the associated user ID. WARNING: This is a placeholder and insecure. Needs proper implementation.
Functions
@spec cleanup_user_session(String.t()) :: :ok
Cleans up a user session.
Creates a new session for an authenticated user. (Session logic currently commented out, returns :ok)
Retrieves user information by ID (Calls Accounts).
Retrieves a user by their session ID. NOTE: This function is a stub. Returns the user or nil if not found or session is invalid.
Checks if a user has permission for a specific action (Placeholder).
Checks if a user has the required role.
Validates a session token and returns the associated user ID. WARNING: This is a placeholder and insecure. Needs proper implementation.