Interface IUserContextAuthorizationCacheManagement
Provides the functionalities of cache management of user context authorizations.
public interface IUserContextAuthorizationCacheManagement
Methods
AddOrReplaceAuthorizedValues<T>(string?, string, string, params T[])
Adds or replaces values in the cache for the specified tenant identifier, user identifier and key context.
void AddOrReplaceAuthorizedValues<T>(string? tenantId, string userId, string key, params T[] values)
Parameters
tenantId
stringThe tenant identifier.
userId
stringThe userId identifier.
key
stringThe key.
values
T[]Values to add or replace.
Type Parameters
T
Type of values.
GetValues<T>(string?, string, string)
Gets the values in the cache for the specified tenant identifier, user identifier and key context.
IEnumerable<T> GetValues<T>(string? tenantId, string userId, string key)
Parameters
Returns
- IEnumerable<T>
The values.
Type Parameters
T
Type of the values.
RemoveAuthorizedValue<T>(string, string, string, T)
Removes a value in the cache for the specified tenant identifier, user identifier and key context.
bool RemoveAuthorizedValue<T>(string tenantId, string userId, string key, T value) where T : notnull
Parameters
tenantId
stringThe tenant identifier.
userId
stringThe userId identifier.
key
stringThe key.
value
TThe value to remove.
Returns
- bool
A value indicating wether the value has been removed.
Type Parameters
T
Type of the value.
RemoveAuthorizedValue<T>(string, string, T)
Removes a value in the cache for user identifier and key context.
void RemoveAuthorizedValue<T>(string userId, string key, T value) where T : notnull
Parameters
Type Parameters
T
Type of the value.
ResetAuthorizedValues(string, string)
Resets the cache for the specified user identifier and key context.
void ResetAuthorizedValues(string userId, string key)
Parameters
ResetAuthorizedValues(string, string, string)
Resets the cache for the specified tenant identifier, user identifier and key context.
bool ResetAuthorizedValues(string tenantId, string userId, string key)
Parameters
Returns
- bool
A value indicating wether the value has been reset.