Skip to main content

Principal

The PrincipalService is responsible for handling principal-related operations in the application. It provides methods to get the principal.

Functions

getPrincipal()

This method returns an observable that emits the principal object.
Principal object represents the current user.

getPrincipal(): Observable<Principal>

Usage

import { PrincipalService } from '@sinequa/atomic-angular';

principalService = inject(PrincipalService);

principalService.getPrincipal().subscribe(principal => {
console.log(principal);
});