diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 00000000..487f9768 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,151 @@ +############################### +# Core EditorConfig Options # +############################### + +root = true + +# All files + +[*] +end_of_line = crlf +indent_size = 4 +indent_style = space +insert_final_newline = true +trim_trailing_whitespace = true + +[*.{csproj,json,props,ruleset,targets}] +indent_size = 2 + +# Code files + +[*.{cs,csx,vb,vbx}] +charset = utf-8-bom + +############################### +# .NET Coding Conventions # +############################### + +[*.{cs,vb}] + +# Organize usings +dotnet_sort_system_directives_first = true + +# this. preferences +dotnet_style_qualification_for_field = false:silent +dotnet_style_qualification_for_property = false:silent +dotnet_style_qualification_for_method = false:silent +dotnet_style_qualification_for_event = false:silent + +# Language keywords vs BCL types preferences +dotnet_style_predefined_type_for_locals_parameters_members = true:silent +dotnet_style_predefined_type_for_member_access = true:silent + +# Parentheses preferences +dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:silent +dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:silent +dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:silent +dotnet_style_parentheses_in_other_operators = never_if_unnecessary:silent + +# Modifier preferences +dotnet_style_require_accessibility_modifiers = for_non_interface_members:silent +dotnet_style_readonly_field = true:suggestion + +# Expression-level preferences +dotnet_style_object_initializer = true:suggestion +dotnet_style_collection_initializer = true:suggestion +dotnet_style_explicit_tuple_names = true:suggestion +dotnet_style_null_propagation = true:suggestion +dotnet_style_coalesce_expression = true:suggestion +dotnet_style_prefer_is_null_check_over_reference_equality_method = true:silent +dotnet_prefer_inferred_tuple_names = true:suggestion +dotnet_prefer_inferred_anonymous_type_member_names = true:suggestion +dotnet_style_prefer_auto_properties = true:silent +dotnet_style_prefer_conditional_expression_over_assignment = true:silent +dotnet_style_prefer_conditional_expression_over_return = true:silent + +############################### +# Naming Conventions # +############################### + +# Style Definitions +dotnet_naming_style.pascal_case_style.capitalization = pascal_case + +# Use PascalCase for constant fields +dotnet_naming_rule.constant_fields_should_be_pascal_case.severity = suggestion +dotnet_naming_rule.constant_fields_should_be_pascal_case.symbols = constant_fields +dotnet_naming_rule.constant_fields_should_be_pascal_case.style = pascal_case_style +dotnet_naming_symbols.constant_fields.applicable_kinds = field +dotnet_naming_symbols.constant_fields.applicable_accessibilities = * +dotnet_naming_symbols.constant_fields.required_modifiers = const + +############################### +# C# Coding Conventions # +############################### + +[*.cs] + +# var preferences +csharp_style_var_for_built_in_types = false:suggestion +csharp_style_var_when_type_is_apparent = true:silent +csharp_style_var_elsewhere = true:silent + +# Expression-bodied members +csharp_style_expression_bodied_methods = false:silent +csharp_style_expression_bodied_constructors = false:silent +csharp_style_expression_bodied_operators = false:silent +csharp_style_expression_bodied_properties = true:silent +csharp_style_expression_bodied_indexers = true:silent +csharp_style_expression_bodied_accessors = true:silent + +# Pattern matching preferences +csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion +csharp_style_pattern_matching_over_as_with_null_check = true:suggestion + +# Null-checking preferences +csharp_style_throw_expression = true:suggestion +csharp_style_conditional_delegate_call = true:suggestion + +# Modifier preferences +csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async:suggestion + +# Expression-level preferences +csharp_prefer_braces = true:silent +csharp_style_deconstructed_variable_declaration = true:suggestion +csharp_prefer_simple_default_expression = true:suggestion +csharp_style_pattern_local_over_anonymous_function = true:suggestion +csharp_style_inlined_variable_declaration = true:suggestion + +############################### +# C# Formatting Rules # +############################### + +# New line preferences +csharp_new_line_before_open_brace = all +csharp_new_line_before_else = true +csharp_new_line_before_catch = true +csharp_new_line_before_finally = true +csharp_new_line_before_members_in_object_initializers = true +csharp_new_line_before_members_in_anonymous_types = true +csharp_new_line_between_query_expression_clauses = true + +# Indentation preferences +csharp_indent_case_contents = true +csharp_indent_switch_labels = true +csharp_indent_labels = flush_left + +# Space preferences +csharp_space_after_cast = false +csharp_space_after_keywords_in_control_flow_statements = true +csharp_space_between_method_call_parameter_list_parentheses = false +csharp_space_between_method_declaration_parameter_list_parentheses = false +csharp_space_between_parentheses = false +csharp_space_before_colon_in_inheritance_clause = true +csharp_space_after_colon_in_inheritance_clause = true +csharp_space_around_binary_operators = before_and_after +csharp_space_between_method_declaration_empty_parameter_list_parentheses = false +csharp_space_between_method_call_name_and_opening_parenthesis = false +csharp_space_between_method_call_empty_parameter_list_parentheses = false + +# Wrapping preferences +csharp_preserve_single_line_statements = true +csharp_preserve_single_line_blocks = true diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 00000000..e69de29b diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md new file mode 100644 index 00000000..f292fa0c --- /dev/null +++ b/.github/CONTRIBUTING.md @@ -0,0 +1,27 @@ +# Contributing + +## Feature requests and bugs + +Please submit any feature requests or bugs as an [issue](https://github.com/aspnet-contrib/AspNet.Security.OpenId.Providers) in GitHub. + +## New OpenID Providers + +New OpenID providers are added by the community, not the maintainers. + +If you wish to add a new provider that is not already part of this repository, fork the repository and try and implement it yourself. + +Then you can submit it back as a Pull Request for inclusion here. + +## Pull requests + +If you wish to contribute code, please consider the guidelines below: + + 1. Create an issue detailing the motivation for the change. + 1. Fork the repository to your GitHub account. + 1. Create a branch to work on your changes. + 1. Please follow the existing code style and [EditorConfig](http://editorconfig.org/) formatting settings. + 1. If fixing a bug or adding new functionality, add or update any tests you deem appropriate. + 1. Ensure ```build.cmd```/```build.sh``` runs with no errors or warnings and all the tests pass. + 1. Open a pull request against the ```dev``` branch, referencing your issue, if appropriate. + +Once your pull request is opened, the project maintainers will review it as soon as they are able. diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md new file mode 100644 index 00000000..b52b31c3 --- /dev/null +++ b/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,19 @@ +### Provider name + +_State which provider(s) you are experiencing an issue with._ + +### Expected behavior + +_Explain what you expected to happen._ + +### Actual behavior + +_Explain what actually happened. If an exception occurred, please include a stack trace if available._ + +### Steps to reproduce + +_A concise and repeatable example of how to illustrate the issue._ + +### Additional information + +_Any additional information that may be useful, such as the version of the package you are using or the version of .NET Core._ diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 00000000..7b6e25a0 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,25 @@ +--- +name: Bug report +about: Create a bug report to help us improve AspNet.Security.OpenId.Providers + +--- + +**Describe the bug** +_A clear and concise description of what the bug is. State which provider(s) the bug relates to._ + +**Steps To reproduce** +_A concise and repeatable example of how to illustrate the issue._ + +**Expected behaviour** +_A clear and concise description of what you expected to happen._ + +**Actual behaviour** +_A clear and concise description of what actually happened. If an exception occurred, please include a stack trace if available._ + +**System information:** + - OS: [e.g. Windows 10] + - Library Version [e.g. 2.0.1] + - .NET version (e.g. output from `dotnet --info`) + +**Additional context** +_Add any other context about the problem here._ diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 00000000..7f5d41e8 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,17 @@ +--- +name: Feature request +about: Suggest an idea for a new feature for AspNet.Security.OpenID.Providers + +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. For example: _I'm always frustrated when [...]_ + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 00000000..9b210398 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,5 @@ +_Summarize the changes this Pull Request makes._ + +_If adding a new provider, please ensure you have included appropiate test(s)._ + +_Please include a reference to a GitHub issue if appropriate._ diff --git a/AspNet.Security.OpenId.Providers.sln b/AspNet.Security.OpenId.Providers.sln index 9d2043ed..d77ad6d3 100644 --- a/AspNet.Security.OpenId.Providers.sln +++ b/AspNet.Security.OpenId.Providers.sln @@ -26,6 +26,40 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{9830BBC8-5 EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AspNet.Security.OpenId.Providers.Tests", "test\AspNet.Security.OpenId.Providers.Tests\AspNet.Security.OpenId.Providers.Tests.csproj", "{F25AB0AB-F046-4D4B-97DD-634C2725D050}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{6C70B0E8-0729-41F6-8A4F-E6E30F960717}" + ProjectSection(SolutionItems) = preProject + .editorconfig = .editorconfig + .gitattributes = .gitattributes + .gitignore = .gitignore + .travis.yml = .travis.yml + build.cmd = build.cmd + build.ps1 = build.ps1 + build.sh = build.sh + CODE_OF_CONDUCT.md = CODE_OF_CONDUCT.md + global.json = global.json + korebuild-lock.txt = korebuild-lock.txt + korebuild.json = korebuild.json + NuGet.config = NuGet.config + README.md = README.md + run.cmd = run.cmd + run.ps1 = run.ps1 + run.sh = run.sh + EndProjectSection +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".github", ".github", "{738BD06E-33F6-4A29-B416-90F574A06D7D}" + ProjectSection(SolutionItems) = preProject + .github\CODEOWNERS = .github\CODEOWNERS + .github\CONTRIBUTING.md = .github\CONTRIBUTING.md + .github\ISSUE_TEMPLATE.md = .github\ISSUE_TEMPLATE.md + .github\PULL_REQUEST_TEMPLATE.md = .github\PULL_REQUEST_TEMPLATE.md + EndProjectSection +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ISSUE_TEMPLATE", "ISSUE_TEMPLATE", "{E248C01E-FC23-4967-B598-4804634A6952}" + ProjectSection(SolutionItems) = preProject + .github\ISSUE_TEMPLATE\bug_report.md = .github\ISSUE_TEMPLATE\bug_report.md + .github\ISSUE_TEMPLATE\feature_request.md = .github\ISSUE_TEMPLATE\feature_request.md + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -57,6 +91,8 @@ Global {6FD2F651-A074-4C07-93A3-0527EB19F3BF} = {8D5ED59A-C3FC-4E35-9E73-A8FF5492DFCD} {49400532-7B7B-4C8F-877F-FDB21D3717CC} = {EFBB5EFD-334C-487E-8C31-9F21FB106FFF} {F25AB0AB-F046-4D4B-97DD-634C2725D050} = {9830BBC8-5A1C-4FC7-AFC8-C3F5247B2151} + {738BD06E-33F6-4A29-B416-90F574A06D7D} = {6C70B0E8-0729-41F6-8A4F-E6E30F960717} + {E248C01E-FC23-4967-B598-4804634A6952} = {738BD06E-33F6-4A29-B416-90F574A06D7D} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {5B7EB520-AC1E-4B28-96B6-EC550256D338} diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 00000000..e1d3f982 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,74 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to making participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, disability, ethnicity, gender identity and expression, level of experience, +nationality, personal appearance, race, religion, or sexual identity and +orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment +include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or +advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic + address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or +reject comments, commits, code, wiki edits, issues, and other contributions +that are not aligned to this Code of Conduct, or to ban temporarily or +permanently any contributor for other behaviors that they deem inappropriate, +threatening, offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. Examples of +representing a project or community include using an official project e-mail +address, posting via an official social media account, or acting as an appointed +representative at an online or offline event. Representation of a project may be +further defined and clarified by project maintainers. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported by contacting the project team [through a GitHub issue](https://github.com/aspnet-contrib/AspNet.Security.OpenId.Providers/issues). All +complaints will be reviewed and investigated and will result in a response that +is deemed necessary and appropriate to the circumstances. The project team is +obligated to maintain confidentiality with regard to the reporter of an incident. +Further details of specific enforcement policies may be posted separately. + +Project maintainers who do not follow or enforce the Code of Conduct in good +faith may face temporary or permanent repercussions as determined by other +members of the project's leadership. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, +available at [http://contributor-covenant.org/version/1/4][version] + +[homepage]: http://contributor-covenant.org +[version]: http://contributor-covenant.org/version/1/4/ diff --git a/README.md b/README.md index 3f622458..84bbd9be 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,13 @@ -AspNet.Security.OpenId.Providers -================================== +# AspNet.Security.OpenId.Providers -**AspNet.Security.OpenId.Providers** is a **collection of security middleware** that you can use in your **ASP.NET Core 1.0** application to support OpenID 2.0 authentication providers like **[Steam](http://steampowered.com/)**, **[Wargaming](http://wargaming.net/)** or **[Orange](http://www.orange.fr/)**. It is directly inspired by **[Jerrie Pelser](https://github.com/jerriep)**'s initiative, **[Owin.Security.Providers](https://github.com/RockstarLabs/OwinOAuthProviders)**. +**AspNet.Security.OpenId.Providers** is a **collection of security middleware** that you can use in your **ASP.NET Core** application to support OpenID 2.0 authentication providers like **[Steam](http://steampowered.com/)**, **[Wargaming](http://wargaming.net/)** or **[Orange](http://www.orange.fr/)**. It is directly inspired by **[Jerrie Pelser](https://github.com/jerriep)**'s initiative, **[Owin.Security.Providers](https://github.com/RockstarLabs/OwinOAuthProviders)**. **The latest official release can be found on [NuGet](https://www.nuget.org/profiles/aspnet-contrib) and the nightly builds on [MyGet](https://www.myget.org/gallery/aspnet-contrib)**. -[![Build status](https://ci.appveyor.com/api/projects/status/tc9n807mwi4sr5jd/branch/dev?svg=true)](https://ci.appveyor.com/project/aspnet-contrib/aspnet-security-openid-providers/branch/dev) -[![Build status](https://travis-ci.org/aspnet-contrib/AspNet.Security.OpenId.Providers.svg?branch=dev)](https://travis-ci.org/aspnet-contrib/AspNet.Security.OpenId.Providers) +| | Linux/macOS | Windows | +|:-:|:-:|:-:| +| **Build Status** | [![Build status](https://img.shields.io/travis/aspnet-contrib/AspNet.Security.OpenId.Providers/dev.svg)](https://travis-ci.org/aspnet-contrib/AspNet.Security.OpenId.Providers) | [![Build status](https://img.shields.io/appveyor/ci/aspnet-contrib/aspnet-security-openid-providers/dev.svg)](https://ci.appveyor.com/project/aspnet-contrib/aspnet-security-openid-providers) | +| **Build History** | [![Build history](https://buildstats.info/travisci/chart/aspnet-contrib/AspNet.Security.OpenId.Providers?branch=dev&includeBuildsFromPullRequest=false)](https://travis-ci.org/aspnet-contrib/AspNet.Security.OpenId.Providers) | [![Build history](https://buildstats.info/appveyor/chart/aspnet-contrib/aspnet-security-openid-providers?branch=dev&includeBuildsFromPullRequest=false)](https://ci.appveyor.com/project/aspnet-contrib/aspnet-security-openid-providers) | ## Getting started @@ -15,17 +16,33 @@ AspNet.Security.OpenId.Providers ```csharp public void ConfigureServices(IServiceCollection services) { - services.AddAuthentication() - .UseSteam() - .UseOpenId("StackExchange", "StackExchange", options => - { - options.Authority = new Uri("https://openid.stackexchange.com/"); - options.CallbackPath = "/signin-stackexchange"; - }); + services.AddAuthentication(options => { /* Authentication options */ }) + .UseSteam() + .UseOpenId("StackExchange", "StackExchange", options => + { + options.Authority = new Uri("https://openid.stackexchange.com/"); + options.CallbackPath = "/signin-stackexchange"; + }); +} + +public void Configure(IApplicationBuilder app) +{ + app.UseAuthentication(); } ``` -See [https://github.com/aspnet-contrib/AspNet.Security.OpenId.Providers/tree/dev/samples/Mvc.Client](https://github.com/aspnet-contrib/AspNet.Security.OpenId.Providers/tree/dev/samples/Mvc.Client) for a complete sample **using ASP.NET Core MVC and supporting multiple external providers**. +See the [/samples](https://github.com/aspnet-contrib/AspNet.Security.OpenId.Providers/tree/dev/samples) directory for a complete sample **using ASP.NET Core MVC and supporting multiple external providers**. + +## Contributing + +**AspNet.Security.OpenId.Providers** is actively maintained by: + + * **[Kévin Chalet](https://github.com/PinpointTownes)** ([@PinpointTownes](https://twitter.com/PinpointTownes)). + * **[Jerrie Pelser](https://github.com/jerriep)** ([@jerriepelser](https://twitter.com/jerriepelser)) + * **[Martin Costello](https://github.com/martincostello)** ([@martin_costello](https://twitter.com/martin_costello)). + * **[Patrick Westerhoff](https://github.com/poke)** ([@poke](https://twitter.com/poke)). + +We would love it if you could help contributing to this repository. ## Support @@ -34,10 +51,21 @@ See [https://github.com/aspnet-contrib/AspNet.Security.OpenId.Providers/tree/dev - **Gitter: [https://gitter.im/aspnet-contrib/AspNet.Security.OpenId.Providers](https://gitter.im/aspnet-contrib/AspNet.Security.OpenId.Providers)** - **StackOverflow: [https://stackoverflow.com/questions/tagged/aspnet-contrib](https://stackoverflow.com/questions/tagged/aspnet-contrib)** -## Contributors +## License -**AspNet.Security.OpenId.Providers** is actively maintained by **[Kévin Chalet](https://github.com/PinpointTownes)** ([@PinpointTownes](https://twitter.com/PinpointTownes)) and **[Jerrie Pelser](https://github.com/jerriep)** ([@jerriepelser](https://twitter.com/jerriepelser)). Contributions are welcome and can be submitted using pull requests. +This project is licensed under the **Apache License**. This means that you can use, modify and distribute it freely. See [https://www.apache.org/licenses/LICENSE-2.0.html](https://www.apache.org/licenses/LICENSE-2.0.html) for more details. -## License +## Providers + +Links to the latest stable and nightly NuGet packages for each provider, as well as a link to their integration documentation are listed in the table below. + +If a provider you're looking for does not exist, consider making a PR to add one. + +| Provider | Stable | Nightly | Documentation | +|:-:|:-:|:-:|:-:| +| OpenId | [![NuGet](https://buildstats.info/nuget/AspNet.Security.OpenId?includePreReleases=false)](http://www.nuget.org/packages/AspNet.Security.OpenId/ "Download AspNet.Security.OpenId from NuGet.org") | [![MyGet](https://buildstats.info/myget/aspnet-contrib/AspNet.Security.OpenId?includePreReleases=false)](https://www.myget.org/feed/aspnet-contrib/package/nuget/AspNet.Security.OpenId "Download AspNet.Security.OpenId from MyGet.org") | N/A | +| Steam | [![NuGet](https://buildstats.info/nuget/AspNet.Security.OpenId.Steam?includePreReleases=false)](http://www.nuget.org/packages/AspNet.Security.OpenId.Steam/ "Download AspNet.Security.OpenId.Steam from NuGet.org") | [![MyGet](https://buildstats.info/myget/aspnet-contrib/AspNet.Security.OpenId.Steam?includePreReleases=false)](https://www.myget.org/feed/aspnet-contrib/package/nuget/AspNet.Security.OpenId.Steam "Download AspNet.Security.OpenId.Steam from MyGet.org") | [Documentation](https://steamcommunity.com/dev "Steam developer documentation") | -This project is licensed under the **Apache License**. This means that you can use, modify and distribute it freely. See [http://www.apache.org/licenses/LICENSE-2.0.html](http://www.apache.org/licenses/LICENSE-2.0.html) for more details. \ No newline at end of file + diff --git a/samples/Mvc.Client/Startup.cs b/samples/Mvc.Client/Startup.cs index 7fa8e1d6..0dab92d5 100644 --- a/samples/Mvc.Client/Startup.cs +++ b/samples/Mvc.Client/Startup.cs @@ -8,7 +8,6 @@ using AspNet.Security.OpenId; using Microsoft.AspNetCore.Authentication.Cookies; using Microsoft.AspNetCore.Builder; -using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.DependencyInjection; diff --git a/src/AspNet.Security.OpenId.Steam/SteamAuthenticationHandler.cs b/src/AspNet.Security.OpenId.Steam/SteamAuthenticationHandler.cs index ebe37ac1..06bf6f69 100644 --- a/src/AspNet.Security.OpenId.Steam/SteamAuthenticationHandler.cs +++ b/src/AspNet.Security.OpenId.Steam/SteamAuthenticationHandler.cs @@ -128,6 +128,6 @@ protected override async Task CreateTicketAsync( return context.Ticket; } - private new OpenIdAuthenticationEvents Events => (OpenIdAuthenticationEvents) base.Events; + private new OpenIdAuthenticationEvents Events => (OpenIdAuthenticationEvents)base.Events; } } diff --git a/src/AspNet.Security.OpenId/OpenIdAuthenticationHandler.cs b/src/AspNet.Security.OpenId/OpenIdAuthenticationHandler.cs index 1d6e0c86..548a5f19 100644 --- a/src/AspNet.Security.OpenId/OpenIdAuthenticationHandler.cs +++ b/src/AspNet.Security.OpenId/OpenIdAuthenticationHandler.cs @@ -323,7 +323,7 @@ protected override async Task HandleChallengeAsync(AuthenticationProperties prop value: string.Join(",", Options.Attributes.Select(attribute => attribute.Key))); } - var address = QueryHelpers.AddQueryString(configuration.AuthenticationEndpoint, + var address = QueryHelpers.AddQueryString(configuration.AuthenticationEndpoint, message.GetParameters() .ToDictionary(parameter => parameter.Key, parameter => parameter.Value)); @@ -434,6 +434,6 @@ private async Task VerifyAssertionAsync([NotNull] OpenIdAuthenticationMess return true; } - private new OpenIdAuthenticationEvents Events => (OpenIdAuthenticationEvents) base.Events; + private new OpenIdAuthenticationEvents Events => (OpenIdAuthenticationEvents)base.Events; } }