Commit Graph

238 Commits

Author SHA1 Message Date
Nate McMaster e053878464
Upgrade packages and projects to target netcoreapp3.0 (aspnet/Security#1916)
Changes:

* Upgrade dependencies and build tools
* Change TFM on Microsoft.AspNetCore.* packages to netcoreapp3.0
* Remove .NET Framework tests
* Disable Owin interop tests. They need to be completely refactored
2018-11-19 09:47:07 -08:00
Kévin Chalet 7e14b052ea Add AccessDeniedPath support to the OIDC/OAuth2/Twitter providers (#1887)
* Add AccessDeniedPath support to the OIDC/OAuth2/Twitter providers

* Update the code documentation and remove an unnecessary call to SignOutAsync()

* Introduce a new AccessDenied event and move most of the access denied handling logic to RemoteAuthenticationHandler

* Add ReturnUrlParameter support to RemoteAuthenticationHandler

* Remove AccessDeniedException and introduce RemoteAuthenticationHandler.HandleAccessDeniedErrorAsync()

* Use OriginalPath instead of Request.Path

* Update obsolete code comments

* Add unit tests for the new AccessDenied event

* Allow customizing the access denied path/return URL/return URL parameter from the AccessDenied event
2018-11-15 15:12:42 -08:00
Jason 32177cad1e Added missing Div tag in JwtBearer sample. (#1888) 2018-10-22 21:50:52 -07:00
Chris Ross (ASP.NET) 3832019027 Update Facebook to v3.1 endpoints #92 2018-09-25 13:56:58 -07:00
Rick Anderson fb80636cb5 Cookie Policy sample essential cookie (#1762) 2018-05-18 17:56:14 -07:00
Ryan Brandenburg a10c3cb23b Upgrade to netcoreapp22 2018-05-08 11:11:18 -07:00
Patrick Westerhoff 06c93669d6 Allow overwriting parameters on challenge requests
Add a way to overwrite query arguments that are passed as part of the
challenge request to the external authentication provider in OAuth-based
authentication providers, including OpenID Connect.

This uses the new `AuthenticationProperties.Parameters` collection to
pass parameters to the authentication handler which will then look for
special items within that property bag, overwriting previously
configured values within the authentication options.

This can be used for example to overwrite the OAuth scopes that are
requested from an authentication provider, or to explicitly trigger a
reauthentication by requiring a login prompt with OpenID Connect. By
being able to specify this on individual challenge requests (using
`HttpContext.ChallengeAsync`), this is independent from the global
scheme configuration.

Custom ~ChallengeProperties types, e.g. `OAuthChallengeProperties` for
OAuth-based authentication providers, provide assistance in setting the
challenge request parameters but are not required to make the handlers
use the overwritten values.

- Adjust authentication handlers to respect the custom parameters, and
  add ~ChallengeProperties types.
- Introduce `OAuthHandler.FormatScope(IEnumerable<string>)` to format a
  custom set of scopes. Subclasses requiring a different scope format
  should override this method instead of the parameterless overload.
  Overriding just `FormatScope()` will prevent handlers from supporting
  overwriting the OAuth `scope` in a challenge request.
- Refactor GoogleHandler to support parameterization through both the
  `Parameters` and the `Items` collection (former is preferred) to keep
  compatibility with the old behavior.
- Add an OpenIdConnect sample to overwrite the prompt argument in a
  challenge request.
- Add extensive tests.
2018-03-23 02:09:05 +01:00
Chris Ross (ASP.NET) 90064ce9df Add ClaimActions for bulk add and remove. #1609 2018-03-21 16:35:37 -07:00
Chris Ross (ASP.NET) 9839799645 Add CookiePolicy logging #1588 2018-03-02 09:53:03 -08:00
Chris Ross (ASP.NET) d95109c96d #43 Add Microsoft.AspNetCore.Authentication.WsFederation, samples, and tests.
#1443 Block unsolicited wsfed logins by default.
#1520 Update WsFed to use the 2.0 event structure
#1425 Implement WsFed remote signout cleanup
Rework WsFed RemoteSignOutPath logic to work with ADFS #1581
Update versions, dependencies.
2018-02-26 15:31:39 -08:00
Chris Ross (ASP.NET) 272aa16322 Update JwtBearer sample error handling #1613 2018-01-26 11:46:35 -08:00
Chris Ross (ASP.NET) f8b4f4c620 Add consent to CookiePolicy #1561 2017-12-27 13:38:18 -08:00
Pranav K f8711a2da3 Update samples and tests to target netcoreapp2.1 2017-11-13 17:24:59 -08:00
Nate McMaster bd8ecd0268 Pin tool and package versions to make builds more repeatable
Part of aspnet/Universe#575
2017-11-01 16:37:42 -07:00
Chris R 144ee21696 #1188 Add AuthenticationProperties to HandleRequestResult and RemoteFailureContext 2017-09-27 14:18:42 -07:00
Nate McMaster a53bf093a7 Use PackageLineup to manage PackageReference versions 2017-08-29 15:26:04 -07:00
Nate McMaster 724be48ee9 Use Directory.Build.props/targets 2017-08-29 15:24:01 -07:00
Chris R c125022050 #772 Fill in OIDC test gaps 2017-08-09 15:29:34 -07:00
Chris R 5d802a7988 Add sample for refresh tokens 2017-08-03 15:01:11 -07:00
Kiran Challa 04a40b5454 Removed DotNetCliToolReference from the samples to fix build break 2017-07-14 06:30:30 -07:00
Chris R 36d3d97b99 #1319 Add DisplayName overloads 2017-07-13 15:20:24 -07:00
Chris R 5485846b5c Update IdentityModel versions to latest, fix samples. 2017-07-12 09:56:25 -07:00
Ryan Brandenburg d433f034fa Remove NETStandard.Library.NETFramework 2017-07-07 10:30:07 -07:00
Hao Kung ff9f145a8e Refactor Events + Add IAuthenticationBuilder 2017-06-29 16:27:03 -07:00
Chris R 200ce72312 Rename PostLogoutRedirectUri to avoid spec confusion 2017-06-13 15:20:54 -07:00
John Luo c523839078 Update default settings for SameSite
- Need Lax policy for social authentication
- Need None policy for OIDC
2017-05-26 12:19:18 -07:00
Chris R 30392a1811 Retarget to netstandard2.0 and net461 2017-05-24 19:04:48 -07:00
Chris R 2a4a7dd26a Make samples work. Fix AddOAuthAuthentication extension. (#1226) 2017-05-22 10:01:44 -07:00
Hao Kung 1f5a27e20a Switch to Options Initializer 2017-05-17 14:05:27 -07:00
BrennanConroy b7a5a6044d Fix samples logging (#1205) 2017-05-09 08:57:39 -07:00
Pranav K 85dcdcc92c Merge pull request #1203 from aspnet/rel/2.0.0-preview1
Migrate to netcoreapp2.0 (#1202)
2017-05-04 19:27:14 -07:00
Chris R d84abf1fe6 Migrate to netcoreapp2.0 (#1202)
* Migrate to netcoreapp2.0, remove Microsoft.Owin.Security.Interop & tests.

* Remove net45 baselines
2017-05-04 19:26:44 -07:00
Nate McMaster e17b275d92 Revert "Temporarily disable DotNetCliToolReference in samples until aspnet/Universe#506 is resolved"
This reverts commit 4b9f57b3b3.
2017-04-28 11:51:56 -07:00
Nate McMaster 4b9f57b3b3 Temporarily disable DotNetCliToolReference in samples until aspnet/Universe#506 is resolved 2017-04-25 11:29:03 -07:00
Hao Kung 4f20655850 Set DisplayName for auth 2017-04-20 14:19:32 -07:00
Hao Kung 99aa3bd35d Auth 2.0 2017-04-19 13:00:03 -07:00
Pranav K ffa45dbd01 Change compilation targets.
* Remove net451 as a compilation target
* Upgrade to netcoreapp2.0
2017-03-22 06:04:21 -07:00
Simon Wendel 923804ab67 Fix typo in Azure AD sample README.md (#1155)
Assuming DEVELOPMENMT should be DEVELOPMENT.
2017-03-20 15:12:02 -07:00
Nate McMaster 10ef26d63c Consolidate dependency versions into one file and remove workarounds 2017-03-15 18:12:53 -07:00
Nate McMaster 7f0b14a8ef
React to aspnet/DotNetTools#272 2017-03-14 12:51:09 -07:00
Jean Collas 9de5519c8b Update of wrong variable name
To avoid confusion when reading the code
2017-03-13 08:01:41 -07:00
Zhang Sen 0fd6f1554a Fix wrong comment (GitHub -> Google) 2017-03-13 07:35:27 -07:00
Chris R ad425163b2 #969 Make social auth claims mapping more configurable
#1024 Remove OIDC protocol claims
2017-03-01 10:55:30 -08:00
Nate McMaster 9847f40654
Downgrade to stable packages 2017-02-14 16:15:42 -08:00
Nate McMaster 61e7ceba45 React to aspnet/Configuration#594 2017-02-08 17:44:52 -08:00
Nate McMaster 7634c5420a Upgrade to RC.3
Removes __TemporarySources__ to use contentFiles packages
Remove default globs
Update test platform
2017-01-19 22:31:43 -08:00
Chris R fddfad14c9 #1082 Update IdentityModel dependencies to 5.1.2 2017-01-19 13:50:46 -08:00
Chris R 3828232d51 Fix AAD sample 2017-01-19 13:45:44 -08:00
Chris R f2fd58d8c4 Fix the social sample port. 2017-01-19 13:37:04 -08:00
Stephen Halter fa64b0c0fb React to UseHttps change 2017-01-09 19:58:22 -08:00