示例#1
0
 public HttpAuth(
     IPrincipalFactory principalFactory,
     IAuthentication authentication)
 {
     this.PrincipalFactory = principalFactory;
     this.Authentication = authentication;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="AuthenticationModule" /> class.
 /// </summary>
 /// <param name="authenticator">Used for the actual authentication.</param>
 /// <param name="principalFactory">Used to create the principal that should be used.</param>
 /// <exception cref="System.ArgumentNullException">autheonticator</exception>
 public AuthenticationModule(IAuthenticator authenticator, IPrincipalFactory principalFactory)
 {
     if (authenticator == null) throw new ArgumentNullException("authenticator");
     if (principalFactory == null) throw new ArgumentNullException("principalFactory");
     _authenticator = authenticator;
     _principalFactory = principalFactory;
 }
 public AuthenticationContextService(ISecurityContext securityContext, IPrincipalFactory principalFactory, ICurrentSDKUser currentSdkUser, ILogger logger)
 {
     _securityContext = securityContext;
     _principalFactory = principalFactory;
     _currentSdkUser = currentSdkUser;
     _logger = logger;
 }
 public AuthenticationService(ICurrentSDKUser currentSdkUser, IFormsAuthenticationService formsAuthentication, IUserAuthenticator agentAuthenticator, IClarifySessionCache sessionCache, IPrincipalFactory principalFactory)
 {
     _currentSdkUser = currentSdkUser;
     _formsAuthentication = formsAuthentication;
     _agentAuthenticator = agentAuthenticator;
     _sessionCache = sessionCache;
     _principalFactory = principalFactory;
 }
 public AuthenticationService(ICurrentSDKUser currentSdkUser, IFormsAuthenticationService formsAuthentication, IUserAuthenticator agentAuthenticator, IPrincipalFactory principalFactory, ILogger logger)
 {
     _currentSdkUser = currentSdkUser;
     _formsAuthentication = formsAuthentication;
     _agentAuthenticator = agentAuthenticator;
     _principalFactory = principalFactory;
     _logger = logger;
 }
示例#6
0
 public HttpAuth(
     IPrincipalFactory principalFactory,
     IAuthentication<string> passAuthentication,
     IAuthentication<byte[]> hashAuthentication)
 {
     this.PrincipalFactory = principalFactory;
     this.PassAuthentication = passAuthentication;
     this.HashAuthentication = hashAuthentication;
 }
        public void SetUp()
        {
            _context = MockRepository.GenerateStub<ISecurityContext>();
            _factory = MockRepository.GenerateStub<IPrincipalFactory>();
            _identity = MockRepository.GenerateStub<IIdentity>();

            _context.Stub(c => c.CurrentIdentity).Return(_identity);

            _behavior = new load_the_current_principal(_context, _factory);
        }
示例#8
0
		public RoleManager(IWebContext context, IPrincipalFactory principalFactory)
		{
			_context = context;
			_principalFactory = principalFactory;
		}
 public ContactAuthenticationContextService(ISecurityContext securityContext, IPrincipalFactory principalFactory)
 {
     _securityContext = securityContext;
     _principalFactory = principalFactory;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="AuthenticationHandler"/> class.
 /// </summary>
 /// <param name="authenticator">The authenticator.</param>
 /// <param name="principalFactory">Used to generate the principal which is set for the current thread</param>
 public AuthenticationHandler(IAuthenticator authenticator, IPrincipalFactory principalFactory)
 {
     _authenticator = authenticator;
     _principalFactory = principalFactory;
 }
 public load_the_current_principal(ISecurityContext context, IPrincipalFactory factory)
     : base(PartialBehavior.Ignored)
 {
     _context = context;
     _factory = factory;
 }
示例#12
0
 public AuthenticationService(ISecurityContext context, IPrincipalFactory factory, IUserService userService)
 {
     _context = context;
     _factory = factory;
     _userService = userService;
 }
示例#13
0
 public load_the_current_principal(ISecurityContext context, IPrincipalFactory factory)
     : base(PartialBehavior.Ignored)
 {
     _context = context;
     _factory = factory;
 }