public void SetUp()
        {
            var guard = new GuardService();

            Client     = new GithubClient();
            Converter  = new ContentConverterService(new ConverterTemplates(), guard);
            ApiService = new RestApiService(Client, Converter);
            AuthenticationController = new AuthenticationController(new AuthenticationService(ApiService, Converter));
            RepositoryController     = new RepositoryController(AuthenticationController, new RepositoryService(ApiService, Converter, guard));
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Instantiates the controller to use the specified instances to perform authentication
        /// and response parsing.
        /// </summary>
        /// <param name="authenticationController">Handler that will be called to perform authentication.</param>
        /// <param name="responseParser">Handler that will be called to parse successful authentication responses</param>
        public SAMLAuthenticationController(IAuthenticationController authenticationController, IAuthenticationResponseParser responseParser)
        {
            if (authenticationController == null)
            {
                throw new ArgumentNullException("authenticationController");
            }
            if (responseParser == null)
            {
                throw new ArgumentNullException("responseParser");
            }

            AuthenticationController = authenticationController;
            ResponseParser           = responseParser;
        }
        /// <summary>
        /// Instantiates the controller to use the specified instances to perform authentication
        /// and response parsing.
        /// </summary>
        /// <param name="authenticationController">
        /// Handler that will be called to perform authentication.
        /// </param>
        /// <param name="responseParser">
        /// Handler that will be called to parse successful authentication responses
        /// </param>
        /// <param name="proxySettings">
        /// Null or proxy settings that should be used when communicating with the authentication endpoint.
        /// </param>
        public SAMLAuthenticationController(IAuthenticationController authenticationController,
                                            IAuthenticationResponseParser responseParser,
                                            WebProxy proxySettings)
        {
            if (authenticationController == null)
            {
                throw new ArgumentNullException("authenticationController");
            }
            if (responseParser == null)
            {
                throw new ArgumentNullException("responseParser");
            }

            AuthenticationController = authenticationController;
            ResponseParser           = responseParser;
            ProxySettings            = proxySettings;
        }
        /// <summary>
        /// Instantiates the controller to use the specified instances to perform authentication
        /// and response parsing.
        /// </summary>
        /// <param name="authenticationController">
        /// Handler that will be called to perform authentication.
        /// </param>
        /// <param name="responseParser">
        /// Handler that will be called to parse successful authentication responses
        /// </param>
        /// <param name="proxySettings">
        /// Null or proxy settings that should be used when communicating with the authentication endpoint.
        /// </param>
        public SAMLAuthenticationController(IAuthenticationController authenticationController,
                                            IAuthenticationResponseParser responseParser,
#if NETSTANDARD
                                            IWebProxy proxySettings)
 public RepositoryController(IAuthenticationController auth, IRepositoryService repositoryService)
 {
     AuthController    = auth ?? throw new ArgumentNullException(nameof(auth));
     RepositoryService = repositoryService ?? throw new ArgumentNullException(nameof(repositoryService));
 }
 public AuthController(IAuthenticationController authenticationController, IUserController userController)
 {
     AuthenticationController = authenticationController;
     UserController           = userController;
 }
Ejemplo n.º 7
0
 public SerieController(IAuthenticationController authentication, ITheTvDbAuthentication theTvDbAuthentication)
 {
     _theTvDbAuthentication    = theTvDbAuthentication;
     _authenticationController = authentication;
     _client = _authenticationController.Client;
 }
        /// <summary>
        /// Instantiates the controller to use the specified instances to perform authentication
        /// and response parsing.
        /// </summary>
        /// <param name="authenticationController">Handler that will be called to perform authentication.</param>
        /// <param name="responseParser">Handler that will be called to parse successful authentication responses</param>
        public SAMLAuthenticationController(IAuthenticationController authenticationController, IAuthenticationResponseParser responseParser)
        {
            if (authenticationController == null)
                throw new ArgumentNullException("authenticationController");
            if (responseParser == null)
                throw new ArgumentNullException("responseParser");

            AuthenticationController = authenticationController;
            ResponseParser = responseParser;
        }
Ejemplo n.º 9
0
 public EntriesProxy(IAuthenticationController authCtrl, IEntries realEntries)
 {
     _authCtrl    = authCtrl;
     _realEntries = realEntries;
 }
Ejemplo n.º 10
0
        /// <summary>
        /// Instantiates the controller to use the specified instances to perform authentication
        /// and response parsing.
        /// </summary>
        /// <param name="authenticationController">
        /// Handler that will be called to perform authentication.
        /// </param>
        /// <param name="responseParser">
        /// Handler that will be called to parse successful authentication responses
        /// </param>
        /// <param name="proxySettings">
        /// Null or proxy settings that should be used when communicating with the authentication endpoint.
        /// </param>
        public SAMLAuthenticationController(IAuthenticationController authenticationController, 
                                            IAuthenticationResponseParser responseParser,
                                            WebProxy proxySettings)
        {
            if (authenticationController == null)
                throw new ArgumentNullException("authenticationController");
            if (responseParser == null)
                throw new ArgumentNullException("responseParser");

            AuthenticationController = authenticationController;
            ResponseParser = responseParser;
            ProxySettings = proxySettings;
        }