Skip to main content
Version: 11.14.0

Principal

Deprecated

Use PrincipalStore instead. PrincipalService will be removed in a future version.

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);
});