lintel 0.2.0
Loading...
Searching...
No Matches
Public Member Functions | List of all members
lintel::IAuthService Class Referenceabstract

#include <IAuthService.h>

Inheritance diagram for lintel::IAuthService:
lintel::AuthService

Public Member Functions

virtual ~IAuthService ()=default
 
virtual std::optional< UserToken > onLoginOf (const UserLogin &userLogin)=0
 
virtual std::optional< UserToken > onAccessOf (const UserTokenLogin &userTokenLogin)=0
 
virtual void onLogoutOf (const UserTokenLogin &userToken)=0
 
virtual std::vector< UserToken > allTokensOf (const std::string &userName)=0
 
virtual void revokeTokenOf (const std::string &id)=0
 

Detailed Description

Interface for authentication operations: login, token validation, and logout.

Constructor & Destructor Documentation

◆ ~IAuthService()

virtual lintel::IAuthService::~IAuthService ( )
virtualdefault

Member Function Documentation

◆ allTokensOf()

virtual std::vector< UserToken > lintel::IAuthService::allTokensOf ( const std::string &  userName)
pure virtual

Get all active sessions of a user.

Parameters
userNamethe username
Returns
list of active tokens of the user

Implemented in lintel::AuthService.

◆ onAccessOf()

virtual std::optional< UserToken > lintel::IAuthService::onAccessOf ( const UserTokenLogin &  userTokenLogin)
pure virtual

Validate an access token.

Parameters
userTokenLogintoken to validate
Returns
user token if valid

Implemented in lintel::AuthService.

◆ onLoginOf()

virtual std::optional< UserToken > lintel::IAuthService::onLoginOf ( const UserLogin &  userLogin)
pure virtual

Authenticate a user with credentials.

Parameters
userLoginlogin credentials
Returns
user token if authentication succeeds

Implemented in lintel::AuthService.

◆ onLogoutOf()

virtual void lintel::IAuthService::onLogoutOf ( const UserTokenLogin &  userToken)
pure virtual

Invalidate a token (logout).

Parameters
userTokentoken to invalidate

Implemented in lintel::AuthService.

◆ revokeTokenOf()

virtual void lintel::IAuthService::revokeTokenOf ( const std::string &  id)
pure virtual

Revoke a session by its token id.

Parameters
idthe token id to revoke

Implemented in lintel::AuthService.


The documentation for this class was generated from the following file: