-
Notifications
You must be signed in to change notification settings - Fork 218
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature Request] Make internal constants class public #548
Comments
makes sense. @jmprieur thoughts? only issue i see is breaking changes if we change the constant values, we have flexibility to do that right now. |
yes, I agree. This is the problem (avoiding breaking changes) |
For the account controller I used next.
|
The idea behind the Constants class was so that we internally don't have to type out all the literal strings, which can be added/changed/removed as the library develops. This class has a lot of unrelated constants, which will not be useful to the end users and, if made public, can add more confusion to the API. There's public ClaimConstants class that has some of the constants that you mentioned. This class is more stable since it represents constants for claim types that won't change. I am hesitant to make Constants.cs public. But maybe we can extract and move some of the constants (that are useful to the users) to a different public class like ClaimConstants. |
@UM001 : which constants would you want to see public? |
@jmprieur - @UM001 listed them above. @UM001 would especially appreciate your input. I didn't include "Policy" as we use UserFlow for B2C, and AzureAD also has the concept of Policy, so I thought it might be more confusing. I've included the rest on your list. |
I think you have added them already. Great.
and those are of Woodgrove sample:
This class also holds constants. |
@UM001, this is available in Microsoft.Identity.Web 1.0.0 |
In the AccountController example constants are used. However, those constants are internal and not public usable.
Maybe make them usable? Same for AzureAdB2C, I used it from other library instead this one.
https://github.com/AzureAD/microsoft-identity-web/blob/master/src/Microsoft.Identity.Web.UI/Areas/MicrosoftIdentity/Controllers/AccountController.cs
namespace Microsoft.Identity.Web
{
//
// Summary:
// General constants.
[NullableAttribute(0)]
[NullableContextAttribute(1)]
internal static class Constants
{
public const string TenantDiscoveryEndpoint = "tenant_discovery_endpoint";
public const string AzureAdB2C = "AzureAdB2C";
public const string PreferredUserName = "preferred_username";
public const string NameClaim = "name";
public const string Tfp = "tfp";
public const string Consent = "consent";
public const string ConsentUrl = "consentUri";
`
The text was updated successfully, but these errors were encountered: