diff --git a/src/Microsoft.AspNet.Authentication.Facebook/FacebookOptions.cs b/src/Microsoft.AspNet.Authentication.Facebook/FacebookOptions.cs index 0bf6a37166..b6ceb5f0f0 100644 --- a/src/Microsoft.AspNet.Authentication.Facebook/FacebookOptions.cs +++ b/src/Microsoft.AspNet.Authentication.Facebook/FacebookOptions.cs @@ -24,7 +24,6 @@ namespace Microsoft.AspNet.Authentication.Facebook AuthorizationEndpoint = FacebookDefaults.AuthorizationEndpoint; TokenEndpoint = FacebookDefaults.TokenEndpoint; UserInformationEndpoint = FacebookDefaults.UserInformationEndpoint; - SaveTokensAsClaims = false; Fields = new List(); } diff --git a/src/Microsoft.AspNet.Authentication.Google/GoogleOptions.cs b/src/Microsoft.AspNet.Authentication.Google/GoogleOptions.cs index ca736f34e5..2c00278c78 100644 --- a/src/Microsoft.AspNet.Authentication.Google/GoogleOptions.cs +++ b/src/Microsoft.AspNet.Authentication.Google/GoogleOptions.cs @@ -22,7 +22,6 @@ namespace Microsoft.AspNet.Authentication.Google AuthorizationEndpoint = GoogleDefaults.AuthorizationEndpoint; TokenEndpoint = GoogleDefaults.TokenEndpoint; UserInformationEndpoint = GoogleDefaults.UserInformationEndpoint; - SaveTokensAsClaims = false; } /// diff --git a/src/Microsoft.AspNet.Authentication.MicrosoftAccount/MicrosoftAccountOptions.cs b/src/Microsoft.AspNet.Authentication.MicrosoftAccount/MicrosoftAccountOptions.cs index 8c89ef20d5..3339cf4ccd 100644 --- a/src/Microsoft.AspNet.Authentication.MicrosoftAccount/MicrosoftAccountOptions.cs +++ b/src/Microsoft.AspNet.Authentication.MicrosoftAccount/MicrosoftAccountOptions.cs @@ -22,7 +22,6 @@ namespace Microsoft.AspNet.Authentication.MicrosoftAccount AuthorizationEndpoint = MicrosoftAccountDefaults.AuthorizationEndpoint; TokenEndpoint = MicrosoftAccountDefaults.TokenEndpoint; UserInformationEndpoint = MicrosoftAccountDefaults.UserInformationEndpoint; - SaveTokensAsClaims = false; } } } diff --git a/src/Microsoft.AspNet.Authentication.OAuth/OAuthOptions.cs b/src/Microsoft.AspNet.Authentication.OAuth/OAuthOptions.cs index fa1471bb21..ba689e66b1 100644 --- a/src/Microsoft.AspNet.Authentication.OAuth/OAuthOptions.cs +++ b/src/Microsoft.AspNet.Authentication.OAuth/OAuthOptions.cs @@ -64,13 +64,5 @@ namespace Microsoft.AspNet.Authentication.OAuth /// Gets or sets the type used to secure data handled by the middleware. /// public ISecureDataFormat StateDataFormat { get; set; } - - /// - /// Defines whether access and refresh tokens should be stored in the - /// after a successful authentication. - /// You can set this property to false to reduce the size of the final - /// authentication cookie. Note that social providers set this property to false by default. - /// - public bool SaveTokensAsClaims { get; set; } = true; } } diff --git a/src/Microsoft.AspNet.Authentication.OpenIdConnect/OpenIdConnectOptions.cs b/src/Microsoft.AspNet.Authentication.OpenIdConnect/OpenIdConnectOptions.cs index a139f96515..dc2cce9964 100644 --- a/src/Microsoft.AspNet.Authentication.OpenIdConnect/OpenIdConnectOptions.cs +++ b/src/Microsoft.AspNet.Authentication.OpenIdConnect/OpenIdConnectOptions.cs @@ -189,12 +189,5 @@ namespace Microsoft.AspNet.Authentication.OpenIdConnect /// This is disabled by default. /// public bool UseTokenLifetime { get; set; } - - /// - /// Defines whether access and refresh tokens should be stored in the - /// after a successful authentication. - /// You can set this property to false to reduce the size of the final authentication cookie. - /// - public bool SaveTokensAsClaims { get; set; } = true; } } diff --git a/src/Microsoft.AspNet.Authentication.Twitter/TwitterOptions.cs b/src/Microsoft.AspNet.Authentication.Twitter/TwitterOptions.cs index dae6fa6b20..85e266326a 100644 --- a/src/Microsoft.AspNet.Authentication.Twitter/TwitterOptions.cs +++ b/src/Microsoft.AspNet.Authentication.Twitter/TwitterOptions.cs @@ -49,13 +49,5 @@ namespace Microsoft.AspNet.Authentication.Twitter get { return (ITwitterEvents)base.Events; } set { base.Events = value; } } - - /// - /// Defines whether access tokens should be stored in the - /// after a successful authentication. - /// This property is set to false by default to reduce - /// the size of the final authentication cookie. - /// - public bool SaveTokensAsClaims { get; set; } } } diff --git a/src/Microsoft.AspNet.Authentication/RemoteAuthenticationOptions.cs b/src/Microsoft.AspNet.Authentication/RemoteAuthenticationOptions.cs index f5dad7267f..5fb3b4caf6 100644 --- a/src/Microsoft.AspNet.Authentication/RemoteAuthenticationOptions.cs +++ b/src/Microsoft.AspNet.Authentication/RemoteAuthenticationOptions.cs @@ -48,6 +48,14 @@ namespace Microsoft.AspNet.Authentication set { Description.DisplayName = value; } } + /// + /// Defines whether access and refresh tokens should be stored in the + /// after a successful authentication. + /// This property is set to false by default to reduce + /// the size of the final authentication cookie. + /// + public bool SaveTokensAsClaims { get; set; } + public IRemoteAuthenticationEvents Events = new RemoteAuthenticationEvents(); } } \ No newline at end of file