Class UserServiceRepositoryBase<TUserEntity>
public abstract class UserServiceRepositoryBase<TUserEntity> : UserServiceBase, IUserService where TUserEntity : EntityBase, IUser
Type Parameters
TUserEntity
- Inheritance
-
UserServiceRepositoryBase<TUserEntity>
- Implements
- Inherited Members
Constructors
UserServiceRepositoryBase(AuthenticationStateProvider, IUserRepository<TUserEntity>, ILogger<UserServiceBase>, IIconStore)
protected UserServiceRepositoryBase(AuthenticationStateProvider authenticationStateProvider, IUserRepository<TUserEntity> userRepository, ILogger<UserServiceBase> logger = null, IIconStore iconStore = null)
Parameters
authenticationStateProviderAuthenticationStateProvideruserRepositoryIUserRepository<TUserEntity>loggerILogger<UserServiceBase>iconStoreIIconStore
Methods
CreateUserEntityAsync(ClaimsPrincipal, string)
protected abstract Task<TUserEntity> CreateUserEntityAsync(ClaimsPrincipal claimsPrincipal, string identity)
Parameters
claimsPrincipalClaimsPrincipalidentitystring
Returns
- Task<TUserEntity>
DeleteUserAsync(string)
Deletes the user record from the store, with no team-membership cleanup — call through DeleteUserAsync(string, bool, CancellationToken), which removes team memberships and audits.
public override Task DeleteUserAsync(string userKey)
Parameters
userKeystring
Returns
GetAllAsync()
protected override IAsyncEnumerable<IUser> GetAllAsync()
Returns
GetUserAsync(ClaimsPrincipal)
protected override Task<IUser> GetUserAsync(ClaimsPrincipal claimsPrincipal)
Parameters
claimsPrincipalClaimsPrincipal
Returns
GetUserByKeyAsync(string)
The user with the given key, or null. The default implementation scans GetAsync(); storage-backed services override it with a direct read.
public override Task<IUser> GetUserByKeyAsync(string userKey)
Parameters
userKeystring
Returns
SeedUserNameAsync(string, string)
Sets the user's display name only if it is currently null/empty. Used by the invitation-accept flow to promote the admin-entered invitation name into the new user's identity without clobbering an IdP-provided name.
public override Task SeedUserNameAsync(string userKey, string name)
Parameters
Returns
SetUserDirectoryIdAsync(string, string)
Links the user to their external-directory id (DirectoryId). Called by the oid backfill (internal self-call) and by directory verification on an email-fallback match (relink). Default is a no-op — stores that track the directory id override it.
public override Task SetUserDirectoryIdAsync(string userKey, string directoryId)
Parameters
Returns
SetUserIconReferenceAsync(string, string)
Backs SetOwnIconAsync(byte[], string) / ClearOwnIconAsync() — persists the icon reference (or null to clear) on the user document. Default no-op; stores that track Icon override it.
protected override Task SetUserIconReferenceAsync(string userKey, string reference)
Parameters
Returns
SetUserLastSeenAsync(string, DateTime)
Stamps when the user last made an authenticated request. The automatic throttled stamping is an internal self-call that bypasses the authorization decorator; calling this member from outside requires Manage. The default is a no-op — stores that track LastSeen override it.
public override Task SetUserLastSeenAsync(string userKey, DateTime lastSeen)
Parameters
Returns
SetUserNameAsync(string, string)
Always sets the user's display name. Used by the user self-edit flow where the caller has explicitly chosen a name for themselves.
public override Task SetUserNameAsync(string userKey, string name)