Table of Contents

Interface IActivityGroupGrantStore

Namespace
Excalibur.A3.Authorization
Assembly
Excalibur.A3.Abstractions.dll

Activity-group grant operations that span the grant store.

public interface IActivityGroupGrantStore

Remarks

Follows the Microsoft ASP.NET Core Identity IUserRoleStore<TUser> pattern: a bridging ISP sub-interface for operations that span grant and activity-group stores.

Access via GetService(Type) or GetService(Type).

Replaces IActivityGroupGrantService from Excalibur.A3.

Methods

DeleteActivityGroupGrantsByUserIdAsync(string, string, CancellationToken)

Deletes all activity-group grants for a user.

Task<int> DeleteActivityGroupGrantsByUserIdAsync(string userId, string grantType, CancellationToken cancellationToken)

Parameters

userId string

The user/subject identifier.

grantType string

The grant type.

cancellationToken CancellationToken

Cancellation token.

Returns

Task<int>

Number of rows affected.

DeleteAllActivityGroupGrantsAsync(string, CancellationToken)

Deletes all activity-group grants.

Task<int> DeleteAllActivityGroupGrantsAsync(string grantType, CancellationToken cancellationToken)

Parameters

grantType string

The grant type.

cancellationToken CancellationToken

Cancellation token.

Returns

Task<int>

Number of rows affected.

GetDistinctActivityGroupGrantUserIdsAsync(string, CancellationToken)

Returns distinct user IDs with activity-group grants.

Task<IReadOnlyList<string>> GetDistinctActivityGroupGrantUserIdsAsync(string grantType, CancellationToken cancellationToken)

Parameters

grantType string

The grant type.

cancellationToken CancellationToken

Cancellation token.

Returns

Task<IReadOnlyList<string>>

Distinct user identifiers.

InsertActivityGroupGrantAsync(string, string, string, string, string, DateTimeOffset?, string, CancellationToken)

Inserts an activity-group grant.

Task<int> InsertActivityGroupGrantAsync(string userId, string fullName, string tenantId, string grantType, string qualifier, DateTimeOffset? expiresOn, string grantedBy, CancellationToken cancellationToken)

Parameters

userId string

The user/subject identifier.

fullName string

Optional display name.

tenantId string

The tenant identifier. Required; must be non-empty.

grantType string

The grant type.

qualifier string

The qualifier/scope.

expiresOn DateTimeOffset?

Optional expiration timestamp (UTC).

grantedBy string

The actor who grants.

cancellationToken CancellationToken

Cancellation token.

Returns

Task<int>

Number of rows affected.