Expose options/other services on managers
This commit is contained in:
parent
57a25d080d
commit
b64a32f089
|
|
@ -69,13 +69,13 @@ namespace Microsoft.AspNetCore.Identity
|
||||||
/// <value>
|
/// <value>
|
||||||
/// The <see cref="ILogger"/> used to log messages from the manager.
|
/// The <see cref="ILogger"/> used to log messages from the manager.
|
||||||
/// </value>
|
/// </value>
|
||||||
protected internal virtual ILogger Logger { get; set; }
|
public virtual ILogger Logger { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets a list of validators for roles to call before persistence.
|
/// Gets a list of validators for roles to call before persistence.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>A list of validators for roles to call before persistence.</value>
|
/// <value>A list of validators for roles to call before persistence.</value>
|
||||||
internal IList<IRoleValidator<TRole>> RoleValidators { get; } = new List<IRoleValidator<TRole>>();
|
public IList<IRoleValidator<TRole>> RoleValidators { get; } = new List<IRoleValidator<TRole>>();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the <see cref="IdentityErrorDescriber"/> used to provider error messages.
|
/// Gets the <see cref="IdentityErrorDescriber"/> used to provider error messages.
|
||||||
|
|
@ -83,7 +83,7 @@ namespace Microsoft.AspNetCore.Identity
|
||||||
/// <value>
|
/// <value>
|
||||||
/// The <see cref="IdentityErrorDescriber"/> used to provider error messages.
|
/// The <see cref="IdentityErrorDescriber"/> used to provider error messages.
|
||||||
/// </value>
|
/// </value>
|
||||||
internal IdentityErrorDescriber ErrorDescriber { get; set; }
|
public IdentityErrorDescriber ErrorDescriber { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the normalizer to use when normalizing role names to keys.
|
/// Gets the normalizer to use when normalizing role names to keys.
|
||||||
|
|
@ -91,7 +91,7 @@ namespace Microsoft.AspNetCore.Identity
|
||||||
/// <value>
|
/// <value>
|
||||||
/// The normalizer to use when normalizing role names to keys.
|
/// The normalizer to use when normalizing role names to keys.
|
||||||
/// </value>
|
/// </value>
|
||||||
internal ILookupNormalizer KeyNormalizer { get; set; }
|
public ILookupNormalizer KeyNormalizer { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets an IQueryable collection of Roles if the persistence store is an <see cref="IQueryableRoleStore{TRole}"/>,
|
/// Gets an IQueryable collection of Roles if the persistence store is an <see cref="IQueryableRoleStore{TRole}"/>,
|
||||||
|
|
|
||||||
|
|
@ -5,8 +5,6 @@ using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Security.Claims;
|
using System.Security.Claims;
|
||||||
using System.Security.Cryptography;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.AspNetCore.Authentication;
|
using Microsoft.AspNetCore.Authentication;
|
||||||
using Microsoft.AspNetCore.Builder;
|
using Microsoft.AspNetCore.Builder;
|
||||||
|
|
@ -71,27 +69,27 @@ namespace Microsoft.AspNetCore.Identity
|
||||||
/// <value>
|
/// <value>
|
||||||
/// The <see cref="ILogger"/> used to log messages from the manager.
|
/// The <see cref="ILogger"/> used to log messages from the manager.
|
||||||
/// </value>
|
/// </value>
|
||||||
protected internal virtual ILogger Logger { get; set; }
|
public virtual ILogger Logger { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The <see cref="UserManager{TUser}"/> used.
|
/// The <see cref="UserManager{TUser}"/> used.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
protected internal UserManager<TUser> UserManager { get; set; }
|
public UserManager<TUser> UserManager { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The <see cref="IUserClaimsPrincipalFactory{TUser}"/> used.
|
/// The <see cref="IUserClaimsPrincipalFactory{TUser}"/> used.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
protected internal IUserClaimsPrincipalFactory<TUser> ClaimsFactory { get; set; }
|
public IUserClaimsPrincipalFactory<TUser> ClaimsFactory { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The <see cref="IdentityOptions"/> used.
|
/// The <see cref="IdentityOptions"/> used.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
protected internal IdentityOptions Options { get; set; }
|
public IdentityOptions Options { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The <see cref="HttpContext"/> used.
|
/// The <see cref="HttpContext"/> used.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
protected internal HttpContext Context {
|
public HttpContext Context {
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
var context = _context ?? _contextAccessor?.HttpContext;
|
var context = _context ?? _contextAccessor?.HttpContext;
|
||||||
|
|
|
||||||
|
|
@ -122,37 +122,37 @@ namespace Microsoft.AspNetCore.Identity
|
||||||
/// <value>
|
/// <value>
|
||||||
/// The <see cref="ILogger"/> used to log messages from the manager.
|
/// The <see cref="ILogger"/> used to log messages from the manager.
|
||||||
/// </value>
|
/// </value>
|
||||||
protected internal virtual ILogger Logger { get; set; }
|
public virtual ILogger Logger { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The <see cref="IPasswordHasher{TUser}"/> used to hash passwords.
|
/// The <see cref="IPasswordHasher{TUser}"/> used to hash passwords.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
protected internal IPasswordHasher<TUser> PasswordHasher { get; set; }
|
public IPasswordHasher<TUser> PasswordHasher { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The <see cref="IUserValidator{TUser}"/> used to validate users.
|
/// The <see cref="IUserValidator{TUser}"/> used to validate users.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
protected internal IList<IUserValidator<TUser>> UserValidators { get; } = new List<IUserValidator<TUser>>();
|
public IList<IUserValidator<TUser>> UserValidators { get; } = new List<IUserValidator<TUser>>();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The <see cref="IPasswordValidator{TUser}"/> used to validate passwords.
|
/// The <see cref="IPasswordValidator{TUser}"/> used to validate passwords.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
protected internal IList<IPasswordValidator<TUser>> PasswordValidators { get; } = new List<IPasswordValidator<TUser>>();
|
public IList<IPasswordValidator<TUser>> PasswordValidators { get; } = new List<IPasswordValidator<TUser>>();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The <see cref="ILookupNormalizer"/> used to normalize things like user and role names.
|
/// The <see cref="ILookupNormalizer"/> used to normalize things like user and role names.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
protected internal ILookupNormalizer KeyNormalizer { get; set; }
|
public ILookupNormalizer KeyNormalizer { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The <see cref="IdentityErrorDescriber"/> used to generate error messages.
|
/// The <see cref="IdentityErrorDescriber"/> used to generate error messages.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
protected internal IdentityErrorDescriber ErrorDescriber { get; set; }
|
public IdentityErrorDescriber ErrorDescriber { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The <see cref="IdentityOptions"/> used to configure Identity.
|
/// The <see cref="IdentityOptions"/> used to configure Identity.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
protected internal IdentityOptions Options { get; set; }
|
public IdentityOptions Options { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets a flag indicating whether the backing user store supports authentication tokens.
|
/// Gets a flag indicating whether the backing user store supports authentication tokens.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue