Promote SaveTokensAsClaims to RemoteAuthOptions
This commit is contained in:
parent
17072b1417
commit
f24c35f1a9
|
|
@ -24,7 +24,6 @@ namespace Microsoft.AspNet.Authentication.Facebook
|
||||||
AuthorizationEndpoint = FacebookDefaults.AuthorizationEndpoint;
|
AuthorizationEndpoint = FacebookDefaults.AuthorizationEndpoint;
|
||||||
TokenEndpoint = FacebookDefaults.TokenEndpoint;
|
TokenEndpoint = FacebookDefaults.TokenEndpoint;
|
||||||
UserInformationEndpoint = FacebookDefaults.UserInformationEndpoint;
|
UserInformationEndpoint = FacebookDefaults.UserInformationEndpoint;
|
||||||
SaveTokensAsClaims = false;
|
|
||||||
Fields = new List<string>();
|
Fields = new List<string>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,6 @@ namespace Microsoft.AspNet.Authentication.Google
|
||||||
AuthorizationEndpoint = GoogleDefaults.AuthorizationEndpoint;
|
AuthorizationEndpoint = GoogleDefaults.AuthorizationEndpoint;
|
||||||
TokenEndpoint = GoogleDefaults.TokenEndpoint;
|
TokenEndpoint = GoogleDefaults.TokenEndpoint;
|
||||||
UserInformationEndpoint = GoogleDefaults.UserInformationEndpoint;
|
UserInformationEndpoint = GoogleDefaults.UserInformationEndpoint;
|
||||||
SaveTokensAsClaims = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,6 @@ namespace Microsoft.AspNet.Authentication.MicrosoftAccount
|
||||||
AuthorizationEndpoint = MicrosoftAccountDefaults.AuthorizationEndpoint;
|
AuthorizationEndpoint = MicrosoftAccountDefaults.AuthorizationEndpoint;
|
||||||
TokenEndpoint = MicrosoftAccountDefaults.TokenEndpoint;
|
TokenEndpoint = MicrosoftAccountDefaults.TokenEndpoint;
|
||||||
UserInformationEndpoint = MicrosoftAccountDefaults.UserInformationEndpoint;
|
UserInformationEndpoint = MicrosoftAccountDefaults.UserInformationEndpoint;
|
||||||
SaveTokensAsClaims = false;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -64,13 +64,5 @@ namespace Microsoft.AspNet.Authentication.OAuth
|
||||||
/// Gets or sets the type used to secure data handled by the middleware.
|
/// Gets or sets the type used to secure data handled by the middleware.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public ISecureDataFormat<AuthenticationProperties> StateDataFormat { get; set; }
|
public ISecureDataFormat<AuthenticationProperties> StateDataFormat { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Defines whether access and refresh tokens should be stored in the
|
|
||||||
/// <see cref="ClaimsPrincipal"/> after a successful authentication.
|
|
||||||
/// You can set this property to <c>false</c> to reduce the size of the final
|
|
||||||
/// authentication cookie. Note that social providers set this property to <c>false</c> by default.
|
|
||||||
/// </summary>
|
|
||||||
public bool SaveTokensAsClaims { get; set; } = true;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -189,12 +189,5 @@ namespace Microsoft.AspNet.Authentication.OpenIdConnect
|
||||||
/// This is disabled by default.
|
/// This is disabled by default.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool UseTokenLifetime { get; set; }
|
public bool UseTokenLifetime { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Defines whether access and refresh tokens should be stored in the
|
|
||||||
/// <see cref="ClaimsPrincipal"/> after a successful authentication.
|
|
||||||
/// You can set this property to <c>false</c> to reduce the size of the final authentication cookie.
|
|
||||||
/// </summary>
|
|
||||||
public bool SaveTokensAsClaims { get; set; } = true;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -49,13 +49,5 @@ namespace Microsoft.AspNet.Authentication.Twitter
|
||||||
get { return (ITwitterEvents)base.Events; }
|
get { return (ITwitterEvents)base.Events; }
|
||||||
set { base.Events = value; }
|
set { base.Events = value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Defines whether access tokens should be stored in the
|
|
||||||
/// <see cref="ClaimsPrincipal"/> after a successful authentication.
|
|
||||||
/// This property is set to <c>false</c> by default to reduce
|
|
||||||
/// the size of the final authentication cookie.
|
|
||||||
/// </summary>
|
|
||||||
public bool SaveTokensAsClaims { get; set; }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -48,6 +48,14 @@ namespace Microsoft.AspNet.Authentication
|
||||||
set { Description.DisplayName = value; }
|
set { Description.DisplayName = value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Defines whether access and refresh tokens should be stored in the
|
||||||
|
/// <see cref="ClaimsPrincipal"/> after a successful authentication.
|
||||||
|
/// This property is set to <c>false</c> by default to reduce
|
||||||
|
/// the size of the final authentication cookie.
|
||||||
|
/// </summary>
|
||||||
|
public bool SaveTokensAsClaims { get; set; }
|
||||||
|
|
||||||
public IRemoteAuthenticationEvents Events = new RemoteAuthenticationEvents();
|
public IRemoteAuthenticationEvents Events = new RemoteAuthenticationEvents();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue