public ApiClientFactory( string developerToken, IAuthenticationTokenFactory authTokenFactory, long?customerId = null, long?customerAccountId = null, ApiEnvironment apiEnvironment = ApiEnvironment.Production, ApiType apiType = ApiType.V13) { if (string.IsNullOrWhiteSpace(developerToken)) { throw new ArgumentNullException(nameof(developerToken)); } if (authTokenFactory == null) { throw new ArgumentNullException(nameof(authTokenFactory)); } this.apiType = apiType; this.apiEnvironment = apiEnvironment; this.authTokenFactory = authTokenFactory; this.authDataTemplate = new AuthData() { DeveloperToken = developerToken, CustomerId = customerId?.ToString(), CustomerAccountId = customerAccountId?.ToString(), HeaderNamespace = Config.HeaderNamespace[apiEnvironment] }; }
public AccessTokenGenerator( IAuthenticationTicketFactory <TUser> authenticationTicketFactory, ISecureDataFormat <AuthenticationTicket> secureDataFormat, IAuthenticationTokenFactory authenticationTokenFactory) { this.authenticationTicketFactory = authenticationTicketFactory; this.secureDataFormat = secureDataFormat; this.authenticationTokenFactory = authenticationTokenFactory; }
public AuthenticationService(IMemberRepository memberRepository, IEmailService emailService, AuthenticationServiceSettings settings, IAuthorizationService authorizationService, IChapterRepository chapterRepository, IAuthenticationTokenFactory authenticationTokenFactory) { _authenticationTokenFactory = authenticationTokenFactory; _authorizationService = authorizationService; _chapterRepository = chapterRepository; _emailService = emailService; _memberRepository = memberRepository; _settings = settings; }
internal AuthMessageInspector(AuthData authDataTemplate, IAuthenticationTokenFactory authTokenFactory) => (this.authDataTemplate, this.authTokenFactory) = (authDataTemplate, authTokenFactory);
internal AuthEndpointBehavior(AuthData authDataTemplate, IAuthenticationTokenFactory authTokenFactory) => (this.authDataTemplate, this.authTokenFactory) = (authDataTemplate, authTokenFactory);