Table of Contents

Class RoleAssignmentCache

Namespace
FoundationaLLM.AuthorizationEngine.Services
Assembly
FoundationaLLM.AuthorizationEngine.dll

In-memory cache for role assignments.

public class RoleAssignmentCache
Inheritance
RoleAssignmentCache
Inherited Members
Extension Methods

Constructors

RoleAssignmentCache(RoleAssignmentStore)

Creates a new instance of the RoleAssignmentCache class.

public RoleAssignmentCache(RoleAssignmentStore roleAssignmentStore)

Parameters

roleAssignmentStore RoleAssignmentStore

The role assignment store containing the role assignments used to initialize the cache.

Methods

AddOrUpdateRoleAssignment(RoleAssignment)

Adds or updates a role assignment in the cache.

public void AddOrUpdateRoleAssignment(RoleAssignment roleAssignment)

Parameters

roleAssignment RoleAssignment

The RoleAssignment to add or update in the cache.

GetRoleAssignments(string)

Gets all role assignments for a principal.

public List<RoleAssignment> GetRoleAssignments(string principalId)

Parameters

principalId string

The unique identifier of the principal for which role assignments are retrieved.

Returns

List<RoleAssignment>

RemoveRoleAssignment(string)

Removes a role assignment from the cache.

public void RemoveRoleAssignment(string roleAssignmentId)

Parameters

roleAssignmentId string

The unique identifier of the role assigment to be removed.