Exemple #1
0
        protected override void ConfigureApplicationContainer(TinyIoCContainer container)
        {
            base.ConfigureApplicationContainer(container);

            var githubProvider =
                new GitHubProvider(new ProviderParams() { Key = GithubConsumerKey, Secret = GithubConsumerSecret });

            var authenticationService = new AuthenticationService();

            authenticationService.AddProvider(githubProvider);

            container.Register<IAuthenticationService>(authenticationService);
        }
        protected override void ConfigureApplicationContainer(TinyIoCContainer container)
        {
            base.ConfigureApplicationContainer(container);

            var githubProvider =
                new GitHubProvider(new ProviderParams() { Key = GithubConsumerKey, Secret = GithubConsumerSecret });

            ((WorldDomination.Web.Authentication.ExtraProviders.GitHub.GitHubAuthenticationServiceSettings)
             githubProvider.DefaultAuthenticationServiceSettings).Scope = "user:email,public_repo";

            var authenticationService = new AuthenticationService();

            authenticationService.AddProvider(githubProvider);

            container.Register<IAuthenticationService>(authenticationService);
        }