Beispiel #1
0
 public Task <IUserIdentity> DeleteUserIdentityAsync(int userIdentityIdentifier)
 {
     return(ExecuteAsync(async() =>
     {
         using UserIdentityModelHandler userIdentityModelHandler = new UserIdentityModelHandler(DbContext, SecurityModelConverter.Create());
         return await userIdentityModelHandler.DeleteAsync(userIdentityIdentifier);
     },
                         MethodBase.GetCurrentMethod()));
 }
Beispiel #2
0
 public Task <IEnumerable <IClientSecretIdentity> > GetClientSecretIdentitiesAsync()
 {
     return(ExecuteAsync(async() =>
     {
         using ClientSecretIdentityModelHandler clientSecretIdentityModelHandler = new ClientSecretIdentityModelHandler(DbContext, SecurityModelConverter.Create());
         return await clientSecretIdentityModelHandler.ReadAsync();
     },
                         MethodBase.GetCurrentMethod()));
 }
Beispiel #3
0
        public Task <IUserIdentity> UpdateUserIdentityAsync(IUserIdentity userIdentity)
        {
            NullGuard.NotNull(userIdentity, nameof(userIdentity));

            return(ExecuteAsync(async() =>
            {
                using UserIdentityModelHandler userIdentityModelHandler = new UserIdentityModelHandler(DbContext, SecurityModelConverter.Create());
                return await userIdentityModelHandler.UpdateAsync(userIdentity);
            },
                                MethodBase.GetCurrentMethod()));
        }
Beispiel #4
0
        public Task <IUserIdentity> GetUserIdentityAsync(string externalUserIdentifier)
        {
            NullGuard.NotNullOrWhiteSpace(externalUserIdentifier, nameof(externalUserIdentifier));

            return(ExecuteAsync(async() =>
            {
                using UserIdentityModelHandler userIdentityModelHandler = new UserIdentityModelHandler(DbContext, SecurityModelConverter.Create());
                return await userIdentityModelHandler.ReadAsync(externalUserIdentifier);
            },
                                MethodBase.GetCurrentMethod()));
        }
Beispiel #5
0
 public Task <IClientSecretIdentity> DeleteClientSecretIdentityAsync(int clientSecretIdentityIdentifier)
 {
     return(ExecuteAsync(async() =>
     {
         using ClientSecretIdentityModelHandler clientSecretIdentityModelHandler = new ClientSecretIdentityModelHandler(DbContext, SecurityModelConverter.Create());
         return await clientSecretIdentityModelHandler.DeleteAsync(clientSecretIdentityIdentifier);
     },
                         MethodBase.GetCurrentMethod()));
 }
Beispiel #6
0
        public Task <IClientSecretIdentity> UpdateClientSecretIdentityAsync(IClientSecretIdentity clientSecretIdentity)
        {
            NullGuard.NotNull(clientSecretIdentity, nameof(clientSecretIdentity));

            return(ExecuteAsync(async() =>
            {
                using ClientSecretIdentityModelHandler clientSecretIdentityModelHandler = new ClientSecretIdentityModelHandler(DbContext, SecurityModelConverter.Create());
                return await clientSecretIdentityModelHandler.UpdateAsync(clientSecretIdentity);
            },
                                MethodBase.GetCurrentMethod()));
        }
Beispiel #7
0
        public Task <IClientSecretIdentity> GetClientSecretIdentityAsync(string clientId)
        {
            NullGuard.NotNullOrWhiteSpace(clientId, nameof(clientId));

            return(ExecuteAsync(async() =>
            {
                using ClientSecretIdentityModelHandler clientSecretIdentityModelHandler = new ClientSecretIdentityModelHandler(DbContext, SecurityModelConverter.Create());
                return await clientSecretIdentityModelHandler.ReadAsync(clientId);
            },
                                MethodBase.GetCurrentMethod()));
        }