Exemplo n.º 1
0
 public OidcAuthPrincipalCreator(IAgentProfilePrincipalService agentProfilePrincipalService,
                                 IAgentPasswordPrincipalService agentPasswordPrincipalService,
                                 IOpenAmIntegration openAmIntegration,
                                 IOpenAmPrincipalService openAmPrincipalService)
 {
     this.agentProfilePrincipalService  = agentProfilePrincipalService;
     this.agentPasswordPrincipalService = agentPasswordPrincipalService;
     this.openAmIntegration             = openAmIntegration;
     this.openAmPrincipalService        = openAmPrincipalService;
 }
        public ApiKeyPrincipalCreator(IAgentProfilePrincipalService agentConnectPrincipalService) :
            base(agentConnectPrincipalService)
        {
            var jsonFile = Path.Combine(JsonFileHelper.ExecutingDir(), ConfigurationManager.AppSettings["apiKeysFileName"]);

            if (File.Exists(jsonFile))
            {
                var jsonData = File.ReadAllText(jsonFile);
                this.apiKeyAgents = JsonProcessor.DeserializeObject <Dictionary <string, FakeAuthInfoVm> >(jsonData)
                                    .ToDictionary(x => x.Key, x => x.Value.ToAuthClaimsVm());
            }
        }
Exemplo n.º 3
0
 public FakePrincipalCreator(IAgentProfilePrincipalService agentConnectPrincipalService)
 {
     this.agentConnectPrincipalService = agentConnectPrincipalService;
 }