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;
|
||||
TokenEndpoint = FacebookDefaults.TokenEndpoint;
|
||||
UserInformationEndpoint = FacebookDefaults.UserInformationEndpoint;
|
||||
SaveTokensAsClaims = false;
|
||||
Fields = new List<string>();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -22,7 +22,6 @@ namespace Microsoft.AspNet.Authentication.Google
|
|||
AuthorizationEndpoint = GoogleDefaults.AuthorizationEndpoint;
|
||||
TokenEndpoint = GoogleDefaults.TokenEndpoint;
|
||||
UserInformationEndpoint = GoogleDefaults.UserInformationEndpoint;
|
||||
SaveTokensAsClaims = false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
|||
|
|
@ -22,7 +22,6 @@ namespace Microsoft.AspNet.Authentication.MicrosoftAccount
|
|||
AuthorizationEndpoint = MicrosoftAccountDefaults.AuthorizationEndpoint;
|
||||
TokenEndpoint = MicrosoftAccountDefaults.TokenEndpoint;
|
||||
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.
|
||||
/// </summary>
|
||||
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.
|
||||
/// </summary>
|
||||
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; }
|
||||
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; }
|
||||
}
|
||||
|
||||
/// <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();
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue