示例#1
0
        public AccountService(
            IAccountStore store,
            AccountOptions options,
            ILogger <AccountService> logger,
            IIssuerService issuerService,
            IProfileService profileService,
            IMapper mapper,
            IHttpContextAccessor httpContextAccessor = null
            )
        {
            _options        = options;
            _logger         = logger;
            _certStore      = issuerService;
            _profileService = profileService ?? new DefaultProfileService(store, _options);
            _rand           = new Random();
            _store          = store;
            Mapper          = mapper;

            var http = httpContextAccessor?.HttpContext;

            string url = http is HttpContext
                ? $"{http.Request.Scheme}://{http.Request.Host.Value}{http.Request.PathBase}"
                : "";

            _serviceUrl = options.Profile.ImageServerUrl ?? url + options.Profile.ImagePath;
        }
示例#2
0
 public IssuersController(IIssuerService issuerService) : base()
 {
     _issuerService = issuerService;
 }
 public void Initialize()
 {
     _mockIssuerRepository = new Mock <IIssuerRepository>();
     _issuerService        = new IssuerService(_mockIssuerRepository.Object);
 }
示例#4
0
文件: Issuer.cs 项目: jsingh/DeepBlue
 public Issuer(IIssuerService issuerService)
     : this()
 {
     this.IssuerService = issuerService;
 }