Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove redundant <returns></returns> #1650

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/AspNetIdentity/IdentityServerBuilderExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ public static class IdentityServerBuilderExtensions
/// </summary>
/// <typeparam name="TUser">The type of the user.</typeparam>
/// <param name="builder">The builder.</param>
/// <returns></returns>
public static IIdentityServerBuilder AddAspNetIdentity<TUser>(this IIdentityServerBuilder builder)
where TUser : class
{
Expand Down
9 changes: 0 additions & 9 deletions src/AspNetIdentity/ProfileService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ public ProfileService(UserManager<TUser> userManager,
/// This method is called whenever claims about the user are requested (e.g. during token creation or via the userinfo endpoint)
/// </summary>
/// <param name="context">The context.</param>
/// <returns></returns>
public virtual async Task GetProfileDataAsync(ProfileDataRequestContext context)
{
var sub = context.Subject?.GetSubjectId();
Expand All @@ -81,7 +80,6 @@ public virtual async Task GetProfileDataAsync(ProfileDataRequestContext context)
/// </summary>
/// <param name="context"></param>
/// <param name="subjectId"></param>
/// <returns></returns>
protected virtual async Task GetProfileDataAsync(ProfileDataRequestContext context, string subjectId)
{
var user = await FindUserAsync(subjectId);
Expand All @@ -96,7 +94,6 @@ protected virtual async Task GetProfileDataAsync(ProfileDataRequestContext conte
/// </summary>
/// <param name="context"></param>
/// <param name="user"></param>
/// <returns></returns>
protected virtual async Task GetProfileDataAsync(ProfileDataRequestContext context, TUser user)
{
var principal = await GetUserClaimsAsync(user);
Expand All @@ -107,7 +104,6 @@ protected virtual async Task GetProfileDataAsync(ProfileDataRequestContext conte
/// Gets the claims for a user.
/// </summary>
/// <param name="user"></param>
/// <returns></returns>
protected virtual async Task<ClaimsPrincipal> GetUserClaimsAsync(TUser user)
{
var principal = await ClaimsFactory.CreateAsync(user);
Expand All @@ -121,7 +117,6 @@ protected virtual async Task<ClaimsPrincipal> GetUserClaimsAsync(TUser user)
/// (e.g. during token issuance or validation).
/// </summary>
/// <param name="context">The context.</param>
/// <returns></returns>
public virtual async Task IsActiveAsync(IsActiveContext context)
{
var sub = context.Subject?.GetSubjectId();
Expand All @@ -135,7 +130,6 @@ public virtual async Task IsActiveAsync(IsActiveContext context)
/// </summary>
/// <param name="context"></param>
/// <param name="subjectId"></param>
/// <returns></returns>
protected virtual async Task IsActiveAsync(IsActiveContext context, string subjectId)
{
var user = await FindUserAsync(subjectId);
Expand All @@ -154,7 +148,6 @@ protected virtual async Task IsActiveAsync(IsActiveContext context, string subje
/// </summary>
/// <param name="context"></param>
/// <param name="user"></param>
/// <returns></returns>
protected virtual async Task IsActiveAsync(IsActiveContext context, TUser user)
{
context.IsActive = await IsUserActiveAsync(user);
Expand All @@ -164,7 +157,6 @@ protected virtual async Task IsActiveAsync(IsActiveContext context, TUser user)
/// Returns if the user is active.
/// </summary>
/// <param name="user"></param>
/// <returns></returns>
public virtual Task<bool> IsUserActiveAsync(TUser user)
{
return Task.FromResult(true);
Expand All @@ -174,7 +166,6 @@ public virtual Task<bool> IsUserActiveAsync(TUser user)
/// Loads the user by the subject id.
/// </summary>
/// <param name="subjectId"></param>
/// <returns></returns>
protected virtual async Task<TUser> FindUserAsync(string subjectId)
{
var user = await UserManager.FindByIdAsync(subjectId);
Expand Down
1 change: 0 additions & 1 deletion src/AspNetIdentity/ResourceOwnerPasswordValidator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ public ResourceOwnerPasswordValidator(
/// Validates the resource owner password credential
/// </summary>
/// <param name="context">The context.</param>
/// <returns></returns>
public virtual async Task ValidateAsync(ResourceOwnerPasswordValidationContext context)
{
var user = await _userManager.FindByNameAsync(context.UserName);
Expand Down
1 change: 0 additions & 1 deletion src/AspNetIdentity/SecurityStampValidatorCallback.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ public class SecurityStampValidatorCallback
/// This is needed to preserve claims such as idp, auth_time, amr.
/// </summary>
/// <param name="context">The context.</param>
/// <returns></returns>
public static Task UpdatePrincipal(SecurityStampRefreshingPrincipalContext context)
{
var newClaimTypes = context.NewPrincipal.Claims.Select(x => x.Type).ToArray();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@ protected virtual async Task<IStepResult> AddClientSecret(
/// <param name="context">The dynamic client registration context, which
/// includes the client model, the DCR request, and other contextual
/// information.</param>
/// <returns></returns>
protected virtual Task<IStepResult> AddClientId(
DynamicClientRegistrationContext context)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ public static class IdentityServerEntityFrameworkBuilderExtensions
/// </summary>
/// <param name="services"></param>
/// <param name="storeOptionsAction">The store options action.</param>
/// <returns></returns>
public static IServiceCollection AddConfigurationDbContext(this IServiceCollection services,
Action<ConfigurationStoreOptions>? storeOptionsAction = null)
{
Expand All @@ -36,7 +35,6 @@ public static IServiceCollection AddConfigurationDbContext(this IServiceCollecti
/// <typeparam name="TContext">The IConfigurationDbContext to use.</typeparam>
/// <param name="services"></param>
/// <param name="storeOptionsAction">The store options action.</param>
/// <returns></returns>
public static IServiceCollection AddConfigurationDbContext<TContext>(this IServiceCollection services,
Action<ConfigurationStoreOptions>? storeOptionsAction = null)
where TContext : DbContext, IConfigurationDbContext
Expand Down Expand Up @@ -97,7 +95,6 @@ public static IServiceCollection AddConfigurationDbContext<TContext>(this IServi
/// </summary>
/// <param name="services"></param>
/// <param name="storeOptionsAction">The store options action.</param>
/// <returns></returns>
public static IServiceCollection AddOperationalDbContext(this IServiceCollection services,
Action<OperationalStoreOptions>? storeOptionsAction = null)
{
Expand All @@ -110,7 +107,6 @@ public static IServiceCollection AddOperationalDbContext(this IServiceCollection
/// <typeparam name="TContext">The IPersistedGrantDbContext to use.</typeparam>
/// <param name="services"></param>
/// <param name="storeOptionsAction">The store options action.</param>
/// <returns></returns>
public static IServiceCollection AddOperationalDbContext<TContext>(this IServiceCollection services,
Action<OperationalStoreOptions>? storeOptionsAction = null)
where TContext : DbContext, IPersistedGrantDbContext
Expand Down Expand Up @@ -174,7 +170,6 @@ public static IServiceCollection AddOperationalDbContext<TContext>(this IService
/// </summary>
/// <typeparam name="T"></typeparam>
/// <param name="services"></param>
/// <returns></returns>
public static IServiceCollection AddOperationalStoreNotification<T>(this IServiceCollection services)
where T : class, IOperationalStoreNotification
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ public interface IPersistedGrantDbContext : IDisposable
/// <summary>
/// Saves the changes.
/// </summary>
/// <returns></returns>
Task<int> SaveChangesAsync(CancellationToken cancellationToken);

// this is here only because of this: https://github.com/DuendeSoftware/IdentityServer/issues/472
Expand All @@ -70,6 +69,5 @@ public interface IPersistedGrantDbContext : IDisposable
/// <summary>
/// Saves the changes.
/// </summary>
/// <returns></returns>
Task<int> SaveChangesAsync() => SaveChangesAsync(CancellationToken.None);
}
2 changes: 0 additions & 2 deletions src/EntityFramework.Storage/Mappers/ApiResourceMappers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ public static class ApiResourceMappers
/// Maps an entity to a model.
/// </summary>
/// <param name="entity">The entity.</param>
/// <returns></returns>
public static Models.ApiResource ToModel(this Entities.ApiResource entity)
{
return entity == null ? null :
Expand Down Expand Up @@ -47,7 +46,6 @@ public static Models.ApiResource ToModel(this Entities.ApiResource entity)
/// Maps a model to an entity.
/// </summary>
/// <param name="model">The model.</param>
/// <returns></returns>
public static Entities.ApiResource ToEntity(this Models.ApiResource model)
{
return model == null ? null :
Expand Down
2 changes: 0 additions & 2 deletions src/EntityFramework.Storage/Mappers/ClientMappers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ public static class ClientMappers
/// Maps an entity to a model.
/// </summary>
/// <param name="entity">The entity.</param>
/// <returns></returns>
public static Models.Client ToModel(this Entities.Client entity)
{
return new Models.Client
Expand Down Expand Up @@ -99,7 +98,6 @@ public static Models.Client ToModel(this Entities.Client entity)
/// Maps a model to an entity.
/// </summary>
/// <param name="model">The model.</param>
/// <returns></returns>
public static Entities.Client ToEntity(this Models.Client model)
{
return new Entities.Client
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ public static class IdentityProviderMappers
/// Maps an entity to a model.
/// </summary>
/// <param name="entity">The entity.</param>
/// <returns></returns>
public static Models.IdentityProvider ToModel(this Entities.IdentityProvider entity)
{
return entity == null ? null :
Expand All @@ -31,7 +30,6 @@ public static Models.IdentityProvider ToModel(this Entities.IdentityProvider ent
/// Maps a model to an entity.
/// </summary>
/// <param name="model">The model.</param>
/// <returns></returns>
public static Entities.IdentityProvider ToEntity(this Models.IdentityProvider model)
{
return model == null ? null :
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ public static class IdentityResourceMappers
/// Maps an entity to a model.
/// </summary>
/// <param name="entity">The entity.</param>
/// <returns></returns>
public static Models.IdentityResource ToModel(this Entities.IdentityResource entity)
{
return entity == null ? null :
Expand All @@ -39,7 +38,6 @@ public static Models.IdentityResource ToModel(this Entities.IdentityResource ent
/// Maps a model to an entity.
/// </summary>
/// <param name="model">The model.</param>
/// <returns></returns>
public static Entities.IdentityResource ToEntity(this Models.IdentityResource model)
{
return model == null ? null :
Expand Down
2 changes: 0 additions & 2 deletions src/EntityFramework.Storage/Mappers/PersistedGrantMappers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ public static class PersistedGrantMappers
/// Maps an entity to a model.
/// </summary>
/// <param name="entity">The entity.</param>
/// <returns></returns>
public static PersistedGrant ToModel(this Entities.PersistedGrant entity)
{
return entity == null ? null :
Expand All @@ -38,7 +37,6 @@ public static PersistedGrant ToModel(this Entities.PersistedGrant entity)
/// Maps a model to an entity.
/// </summary>
/// <param name="model">The model.</param>
/// <returns></returns>
public static Entities.PersistedGrant ToEntity(this Models.PersistedGrant model)
{
return model == null ? null :
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ public static class PushedAuthorizationRequestMappers
/// Maps an entity to a model.
/// </summary>
/// <param name="entity">The entity.</param>
/// <returns></returns>
public static Models.PushedAuthorizationRequest ToModel(this PushedAuthorizationRequest entity)
{
return entity == null ? null :
Expand All @@ -31,7 +30,6 @@ public static Models.PushedAuthorizationRequest ToModel(this PushedAuthorization
/// Maps a model to an entity.
/// </summary>
/// <param name="model">The model.</param>
/// <returns></returns>
public static Entities.PushedAuthorizationRequest ToEntity(this Models.PushedAuthorizationRequest model)
{
return model == null ? null :
Expand Down
2 changes: 0 additions & 2 deletions src/EntityFramework.Storage/Mappers/ScopeMappers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ public static class ScopeMappers
/// Maps an entity to a model.
/// </summary>
/// <param name="entity">The entity.</param>
/// <returns></returns>
public static Models.ApiScope ToModel(this ApiScope entity)
{
return entity == null ? null :
Expand All @@ -40,7 +39,6 @@ public static Models.ApiScope ToModel(this ApiScope entity)
/// Maps a model to an entity.
/// </summary>
/// <param name="model">The model.</param>
/// <returns></returns>
public static Entities.ApiScope ToEntity(this Models.ApiScope model)
{
return model == null ? null :
Expand Down
7 changes: 0 additions & 7 deletions src/EntityFramework.Storage/Stores/DeviceFlowStore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ public DeviceFlowStore(
/// <param name="deviceCode">The device code.</param>
/// <param name="userCode">The user code.</param>
/// <param name="data">The data.</param>
/// <returns></returns>
public virtual async Task StoreDeviceAuthorizationAsync(string deviceCode, string userCode, DeviceCode data)
{
using var activity = Tracing.StoreActivitySource.StartActivity("DeviceFlowStore.StoreDeviceAuthorization");
Expand All @@ -82,7 +81,6 @@ public virtual async Task StoreDeviceAuthorizationAsync(string deviceCode, strin
/// Finds device authorization by user code.
/// </summary>
/// <param name="userCode">The user code.</param>
/// <returns></returns>
public virtual async Task<DeviceCode> FindByUserCodeAsync(string userCode)
{
using var activity = Tracing.StoreActivitySource.StartActivity("DeviceFlowStore.FindByUserCode");
Expand All @@ -101,7 +99,6 @@ public virtual async Task<DeviceCode> FindByUserCodeAsync(string userCode)
/// Finds device authorization by device code.
/// </summary>
/// <param name="deviceCode">The device code.</param>
/// <returns></returns>
public virtual async Task<DeviceCode> FindByDeviceCodeAsync(string deviceCode)
{
using var activity = Tracing.StoreActivitySource.StartActivity("DeviceFlowStore.FindByDeviceCode");
Expand All @@ -121,7 +118,6 @@ public virtual async Task<DeviceCode> FindByDeviceCodeAsync(string deviceCode)
/// </summary>
/// <param name="userCode">The user code.</param>
/// <param name="data">The data.</param>
/// <returns></returns>
public virtual async Task UpdateByUserCodeAsync(string userCode, DeviceCode data)
{
using var activity = Tracing.StoreActivitySource.StartActivity("DeviceFlowStore.UpdateByUserCode");
Expand Down Expand Up @@ -156,7 +152,6 @@ public virtual async Task UpdateByUserCodeAsync(string userCode, DeviceCode data
/// Removes the device authorization, searching by device code.
/// </summary>
/// <param name="deviceCode">The device code.</param>
/// <returns></returns>
public virtual async Task RemoveByDeviceCodeAsync(string deviceCode)
{
using var activity = Tracing.StoreActivitySource.StartActivity("DeviceFlowStore.RemoveByDeviceCode");
Expand Down Expand Up @@ -192,7 +187,6 @@ public virtual async Task RemoveByDeviceCodeAsync(string deviceCode)
/// <param name="model"></param>
/// <param name="deviceCode"></param>
/// <param name="userCode"></param>
/// <returns></returns>
protected DeviceFlowCodes ToEntity(DeviceCode model, string deviceCode, string userCode)
{
if (model == null || deviceCode == null || userCode == null) return null;
Expand All @@ -215,7 +209,6 @@ protected DeviceFlowCodes ToEntity(DeviceCode model, string deviceCode, string u
/// Converts a serialized DeviceCode to a model.
/// </summary>
/// <param name="entity"></param>
/// <returns></returns>
protected DeviceCode ToModel(string entity)
{
if (entity == null) return null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ public async Task<IdentityProvider> GetBySchemeAsync(string scheme)
/// Maps from the identity provider entity to identity provider model.
/// </summary>
/// <param name="idp"></param>
/// <returns></returns>
protected virtual IdentityProvider MapIdp(Entities.IdentityProvider idp)
{
if (idp.Type == "oidc")
Expand Down
5 changes: 0 additions & 5 deletions src/EntityFramework.Storage/Stores/ResourceStore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ public ResourceStore(IConfigurationDbContext context, ILogger<ResourceStore> log
/// Finds the API resources by name.
/// </summary>
/// <param name="apiResourceNames">The names.</param>
/// <returns></returns>
public virtual async Task<IEnumerable<ApiResource>> FindApiResourcesByNameAsync(IEnumerable<string> apiResourceNames)
{
using var activity = Tracing.StoreActivitySource.StartActivity("ResourceStore.FindApiResourcesByName");
Expand Down Expand Up @@ -96,7 +95,6 @@ where apiResourceNames.Contains(apiResource.Name)
/// Gets API resources by scope name.
/// </summary>
/// <param name="scopeNames"></param>
/// <returns></returns>
public virtual async Task<IEnumerable<ApiResource>> FindApiResourcesByScopeNameAsync(IEnumerable<string> scopeNames)
{
using var activity = Tracing.StoreActivitySource.StartActivity("ResourceStore.FindApiResourcesByScopeName");
Expand Down Expand Up @@ -129,7 +127,6 @@ where api.Scopes.Any(x => names.Contains(x.Scope))
/// Gets identity resources by scope name.
/// </summary>
/// <param name="scopeNames"></param>
/// <returns></returns>
public virtual async Task<IEnumerable<IdentityResource>> FindIdentityResourcesByScopeNameAsync(IEnumerable<string> scopeNames)
{
using var activity = Tracing.StoreActivitySource.StartActivity("ResourceStore.FindIdentityResourcesByScopeName");
Expand Down Expand Up @@ -159,7 +156,6 @@ where scopes.Contains(identityResource.Name)
/// Gets scopes by scope name.
/// </summary>
/// <param name="scopeNames"></param>
/// <returns></returns>
public virtual async Task<IEnumerable<ApiScope>> FindApiScopesByNameAsync(IEnumerable<string> scopeNames)
{
using var activity = Tracing.StoreActivitySource.StartActivity("ResourceStore.FindApiScopesByName");
Expand Down Expand Up @@ -188,7 +184,6 @@ where scopes.Contains(scope.Name)
/// <summary>
/// Gets all resources.
/// </summary>
/// <returns></returns>
public virtual async Task<Resources> GetAllResourcesAsync()
{
using var activity = Tracing.StoreActivitySource.StartActivity("ResourceStore.GetAllResources");
Expand Down
3 changes: 0 additions & 3 deletions src/EntityFramework.Storage/Stores/SigningKeyStore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ public SigningKeyStore(IPersistedGrantDbContext context, ILogger<SigningKeyStore
/// <summary>
/// Loads all keys from store.
/// </summary>
/// <returns></returns>
public async Task<IEnumerable<SerializedKey>> LoadKeysAsync()
{
using var activity = Tracing.StoreActivitySource.StartActivity("SigningKeyStore.LoadKeys");
Expand All @@ -80,7 +79,6 @@ public async Task<IEnumerable<SerializedKey>> LoadKeysAsync()
/// Persists new key in store.
/// </summary>
/// <param name="key"></param>
/// <returns></returns>
public Task StoreKeyAsync(SerializedKey key)
{
using var activity = Tracing.StoreActivitySource.StartActivity("SigningKeyStore.StoreKey");
Expand All @@ -104,7 +102,6 @@ public Task StoreKeyAsync(SerializedKey key)
/// Deletes key from storage.
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
public async Task DeleteKeyAsync(string id)
{
using var activity = Tracing.StoreActivitySource.StartActivity("SigningKeyStore.DeleteKey");
Expand Down
Loading