Example #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);
        }
Example #2
0
        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);
        }