DefaultUserProvider class
namespace: Serenity.Services assembly: Serenity.Net.Core
Default implementation of IUserProvider that delegates to an IUserAccessor, IUserClaimCreator, and IUserRetrieveService.
public class DefaultUserProvider : IUserProvider
| parameter | description |
|---|---|
| userAccessor | The accessor that provides the current user principal. |
| userClaimCreator | The service used to create principals for impersonation. |
| userRetriever | The service used to retrieve user definitions. |
| cache | The two-level cache used for fallback invalidation when the retrieve service does not implement IRemoveCachedUser. Optional. |
Public Members
| name | description |
|---|---|
| DefaultUserProvider(…) | Default implementation of IUserProvider that delegates to an IUserAccessor, IUserClaimCreator, and IUserRetrieveService. |
| User { get; } | |
| ById(…) | |
| ByUsername(…) | |
| CreatePrincipal(…) | |
| Impersonate(…) | |
| RemoveAll() | |
| RemoveCachedUser(…) | |
| UndoImpersonate() |
Exceptions
| exception | condition |
|---|---|
| ArgumentNullException | userAccessor, userClaimCreator or userRetriever is null. |
Remarks
Creates a new instance of the DefaultUserProvider class.
See Also
- interface IUserProvider
- Source: DefaultUserProvider.cs