Skip to content

Commit

Permalink
fix domain issue for other templates (#1150)
Browse files Browse the repository at this point in the history
  • Loading branch information
jennyf19 authored Apr 20, 2021
1 parent c5b7c1a commit b314ea8
Show file tree
Hide file tree
Showing 16 changed files with 87 additions and 87 deletions.
2 changes: 1 addition & 1 deletion ProjectTemplates/configuration.json
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@
"FileRelativePath": "Client/Program.cs",
"Replacements": [
{
"ReplaceFrom": "https://yourDomain.onmicrosoft.com/api.id.uri/access_as_user",
"ReplaceFrom": "https://qualified.domain.name/api.id.uri/access_as_user",
"ReplaceBy": "https://fabrikamb2c.onmicrosoft.com/helloapi/user_impersonation"
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,8 @@
"AAdB2CInstance": {
"type": "parameter",
"datatype": "string",
"defaultValue": "https://yourDomain.b2clogin.com/",
"replaces": "https:////yourDomain.b2clogin.com/",
"defaultValue": "https://qualified.domain.name.b2clogin.com/",
"replaces": "https:////qualified.domain.name.b2clogin.com/",
"description": "The Azure Active Directory B2C instance to connect to (use with IndividualB2C auth)."
},
"SignUpSignInPolicyId": {
Expand Down Expand Up @@ -258,7 +258,7 @@
"Domain": {
"type": "parameter",
"datatype": "string",
"replaces": "yourDomain",
"replaces": "qualified.domain.name",
"description": "The domain for the directory tenant (use with SingleOrg or IndividualB2C auth)."
},
"TenantId": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
////#if (IndividualB2CAuth)
// "AzureAdB2C": {
// "Instance": "https:////yourDomain.b2clogin.com/",
// "Instance": "https:////qualified.domain.name.b2clogin.com/",
// "ClientId": "11111111-1111-1111-11111111111111111",
// "CallbackPath": "/signin-oidc",
// "Domain": "yourDomain.onmicrosoft.com",
// "Domain": "qualified.domain.name",
// "SignedOutCallbackPath": "/signout/MySignUpSignInPolicyId",
//#if (GenerateApi)
// "ClientSecret": "secret-from-app-registration",
Expand All @@ -21,7 +21,7 @@
//#if (MultiOrgAuth)
// "TenantId": "common",
//#elseif (SingleOrgAuth)
// "Domain": "yourDomain",
// "Domain": "qualified.domain.name",
// "TenantId": "22222222-2222-2222-2222-222222222222",
//#endif
// "ClientId": "11111111-1111-1111-11111111111111111",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@
"Domain": {
"type": "parameter",
"datatype": "string",
"replaces": "yourDomain",
"replaces": "qualified.domain.name",
"description": "The domain for the directory tenant (use with SingleOrg or IndividualB2C auth)."
},
"AppIDUri": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public static async Task Main(string[] args)
{
builder.Configuration.Bind("AzureAdB2C", options.ProviderOptions.Authentication);
#if (Hosted)
options.ProviderOptions.DefaultAccessTokenScopes.Add("https://yourDomain.onmicrosoft.com/api.id.uri/api-scope");
options.ProviderOptions.DefaultAccessTokenScopes.Add("https://qualified.domain.name/api.id.uri/api-scope");
#endif
});
#endif
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
// "AzureAdB2C": {
// "Instance": "https:////aadB2CInstance.b2clogin.com/",
// "ClientId": "11111111-1111-1111-11111111111111111",
// "Domain": "yourDomain.onmicrosoft.com",
// "Domain": "qualified.domain.name",
//#if (GenerateApi)
// "ClientSecret": "secret-from-app-registration",
// "ClientCertificates" : [
Expand All @@ -25,7 +25,7 @@
//#if (!SingleOrgAuth)
// "TenantId": "common",
//#else
// "Domain": "yourDomain",
// "Domain": "qualified.domain.name",
// "TenantId": "22222222-2222-2222-2222-222222222222",
//#endif
// "ClientId": "11111111-1111-1111-11111111111111111",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@
"AAdB2CInstance": {
"type": "parameter",
"datatype": "string",
"defaultValue": "https://yourDomain.b2clogin.com/",
"replaces": "https:////yourDomain.b2clogin.com/",
"defaultValue": "https://qualified.domain.name.b2clogin.com/",
"replaces": "https:////qualified.domain.name.b2clogin.com/",
"description": "The Azure Active Directory B2C instance to connect to (use with IndividualB2C auth)."
},
"SignUpSignInPolicyId": {
Expand All @@ -67,7 +67,7 @@
"Domain": {
"type": "parameter",
"datatype": "string",
"replaces": "yourDomain",
"replaces": "qualified.domain.name",
"description": "The domain for the directory tenant (use with SingleOrg or IndividualB2C auth)."
},
"DefaultScope": {
Expand Down
6 changes: 3 additions & 3 deletions ProjectTemplates/templates/Functions-CSharp/appsettings.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
////#if (IndividualB2CAuth)
// "AzureAdB2C": {
// "Instance": "https:////yourDomain.b2clogin.com/",
// "Instance": "https:////qualified.domain.name.b2clogin.com/",
// "ClientId": "11111111-1111-1111-11111111111111111",
// "Domain": "yourDomain.onmicrosoft.com",
// "Domain": "qualified.domain.name",
//#if (GenerateApi)
// "ClientSecret": "secret-from-app-registration",
// "ClientCertificates" : [
Expand All @@ -17,7 +17,7 @@
//#if (!SingleOrgAuth)
// "TenantId": "common",
//#else
// "Domain": "yourDomain",
// "Domain": "qualified.domain.name",
// "TenantId": "22222222-2222-2222-2222-222222222222",
//#endif
// "ClientId": "11111111-1111-1111-11111111111111111",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,8 @@
"AAdB2CInstance": {
"type": "parameter",
"datatype": "string",
"defaultValue": "https://yourDomain.b2clogin.com/",
"replaces": "https:////yourDomain.b2clogin.com/",
"defaultValue": "https://qualified.domain.name.b2clogin.com/",
"replaces": "https:////qualified.domain.name.b2clogin.com/",
"description": "The Azure Active Directory B2C instance to connect to (use with IndividualB2C auth)."
},
"SignUpSignInPolicyId": {
Expand Down Expand Up @@ -182,7 +182,7 @@
"Domain": {
"type": "parameter",
"datatype": "string",
"replaces": "yourDomain",
"replaces": "qualified.domain.name",
"description": "The domain for the directory tenant (use with SingleOrg or IndividualB2C auth)."
},
"TenantId": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
////#if (IndividualB2CAuth)
// "AzureAdB2C": {
// "Instance": "https:////yourDomain.b2clogin.com/",
// "Instance": "https:////qualified.domain.name.b2clogin.com/",
// "ClientId": "11111111-1111-1111-11111111111111111",
// "CallbackPath": "/signin-oidc",
// "Domain": "yourDomain.onmicrosoft.com",
// "Domain": "qualified.domain.name",
//#if (GenerateApi)
// "ClientSecret": "secret-from-app-registration",
// "ClientCertificates" : [
Expand All @@ -21,7 +21,7 @@
//#if (MultiOrgAuth)
// "TenantId": "common",
//#elseif (SingleOrgAuth)
// "Domain": "yourDomain",
// "Domain": "qualified.domain.name",
// "TenantId": "22222222-2222-2222-2222-222222222222",
//#endif
// "ClientId": "11111111-1111-1111-11111111111111111",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,8 @@
"AAdB2CInstance": {
"type": "parameter",
"datatype": "string",
"defaultValue": "https://yourDomain.b2clogin.com/",
"replaces": "https:////yourDomain.b2clogin.com/",
"defaultValue": "https://qualified.domain.name.b2clogin.com/",
"replaces": "https:////qualified.domain.name.b2clogin.com/",
"description": "The Azure Active Directory B2C instance to connect to (use with IndividualB2C auth)."
},
"SignUpSignInPolicyId": {
Expand Down Expand Up @@ -178,7 +178,7 @@
"Domain": {
"type": "parameter",
"datatype": "string",
"replaces": "yourDomain",
"replaces": "qualified.domain.name",
"description": "The domain for the directory tenant (use with SingleOrg or IndividualB2C auth)."
},
"TenantId": {
Expand Down
6 changes: 3 additions & 3 deletions ProjectTemplates/templates/StarterWeb-CSharp/appsettings.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
////#if (IndividualB2CAuth)
// "AzureAdB2C": {
// "Instance": "https:////yourDomain.b2clogin.com/",
// "Instance": "https:////qualified.domain.name.b2clogin.com/",
// "ClientId": "11111111-1111-1111-11111111111111111",
// "Domain": "yourDomain.onmicrosoft.com",
// "Domain": "qualified.domain.name",
// "SignedOutCallbackPath": "/signout/MySignUpSignInPolicyId",
// "SignUpSignInPolicyId": "MySignUpSignInPolicyId",
// "ResetPasswordPolicyId": "MyResetPasswordPolicyId",
Expand All @@ -21,7 +21,7 @@
//#if (MultiOrgAuth)
// "TenantId": "common",
//#elseif (SingleOrgAuth)
// "Domain": "yourDomain",
// "Domain": "qualified.domain.name",
// "TenantId": "22222222-2222-2222-2222-222222222222",
//#endif
// "ClientId": "11111111-1111-1111-11111111111111111",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@
"AAdB2CInstance": {
"type": "parameter",
"datatype": "string",
"defaultValue": "https://yourDomain.b2clogin.com/",
"replaces": "https:////yourDomain.b2clogin.com/",
"defaultValue": "https://qualified.domain.name.b2clogin.com/",
"replaces": "https:////qualified.domain.name.b2clogin.com/",
"description": "The Azure Active Directory B2C instance to connect to (use with IndividualB2C auth)."
},
"SignUpSignInPolicyId": {
Expand All @@ -95,7 +95,7 @@
"Domain": {
"type": "parameter",
"datatype": "string",
"replaces": "yourDomain",
"replaces": "qualified.domain.namen",
"description": "The domain for the directory tenant (use with SingleOrg or IndividualB2C auth)."
},
"DefaultScope": {
Expand Down
2 changes: 1 addition & 1 deletion ProjectTemplates/templates/WebApi-CSharp/appsettings.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
////#if (IndividualB2CAuth)
// "AzureAdB2C": {
// "Instance": "https:////yourDomain.b2clogin.com/",
// "Instance": "https:////qualified.domain.name.b2clogin.com/",
// "ClientId": "11111111-1111-1111-11111111111111111",
// "Domain": "qualified.domain.name",
//#if (GenerateApi)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@
"AAdB2CInstance": {
"type": "parameter",
"datatype": "string",
"defaultValue": "https://yourDomain.b2clogin.com/",
"replaces": "https:////yourDomain.b2clogin.com/",
"defaultValue": "https://qualified.domain.name.b2clogin.com/",
"replaces": "https:////qualified.domain.name.b2clogin.com/",
"description": "The Azure Active Directory B2C instance to connect to (use with IndividualB2C auth)."
},
"SignUpSignInPolicyId": {
Expand All @@ -85,7 +85,7 @@
"Domain": {
"type": "parameter",
"datatype": "string",
"replaces": "yourDomain",
"replaces": "qualified.domain.name",
"description": "The domain for the directory tenant (use with SingleOrg or IndividualB2C auth)."
},
"DefaultScope": {
Expand Down
102 changes: 51 additions & 51 deletions ProjectTemplates/templates/Worker-CSharp/appsettings.json
Original file line number Diff line number Diff line change
@@ -1,54 +1,54 @@
{
////#if (IndividualB2CAuth)
// "AzureAdB2C": {
// "Instance": "https:////yourDomain.b2clogin.com/",
// "ClientId": "11111111-1111-1111-11111111111111111",
// "Domain": "yourDomain.onmicrosoft.com",
//#if (GenerateApi)
// "ClientSecret": "secret-from-app-registration",
// "ClientCertificates" : [
// ],
//#endif
// "SignUpSignInPolicyId": "MySignUpSignInPolicyId"
// },
////#elseif (OrganizationalAuth)
// "AzureAd": {
// "Instance": "https:////login.microsoftonline.com/",
//#if (!SingleOrgAuth)
// "TenantId": "common",
//#else
// "Domain": "yourDomain",
// "TenantId": "22222222-2222-2222-2222-222222222222",
//#endif
// "ClientId": "11111111-1111-1111-11111111111111111",
////#if (IndividualB2CAuth)
// "AzureAdB2C": {
// "Instance": "https:////qualified.domain.name.b2clogin.com/",
// "ClientId": "11111111-1111-1111-11111111111111111",
// "Domain": "qualified.domain.name",
//#if (GenerateApi)
// "ClientSecret": "secret-from-app-registration",
// "ClientCertificates" : [
// ],
//#endif
// "SignUpSignInPolicyId": "MySignUpSignInPolicyId"
// },
////#elseif (OrganizationalAuth)
// "AzureAd": {
// "Instance": "https:////login.microsoftonline.com/",
//#if (!SingleOrgAuth)
// "TenantId": "common",
//#else
// "Domain": "qualified.domain.name",
// "TenantId": "22222222-2222-2222-2222-222222222222",
//#endif
// "ClientId": "11111111-1111-1111-11111111111111111",

//#if (GenerateApiOrGraph)
// "ClientSecret": "secret-from-app-registration",
// "ClientCertificates" : [
// ],
//#endif
// "CallbackPath": "/signin-oidc"
// },
////#endif
////#if (GenerateApiOrGraph)
// "DownstreamApi": {
// /*
// 'Scopes' contains space separated scopes of the Web API you want to call. This can be:
// - a scope for a V2 application (for instance api://b3682cc7-8b30-4bd2-aaba-080c6bf0fd31/access_as_user)
// - a scope corresponding to a V1 application (for instance <App ID URI>/.default, where <App ID URI> is the
// App ID URI of a legacy v1 Web application
// Applications are registered in the https://portal.azure.com portal.
// */
// "BaseUrl": "[WebApiUrl]",
// "Scopes": "user.read"
// },
////#endif
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information"
}
},
"AllowedHosts": "*"
//#if (GenerateApiOrGraph)
// "ClientSecret": "secret-from-app-registration",
// "ClientCertificates" : [
// ],
//#endif
// "CallbackPath": "/signin-oidc"
// },
////#endif
////#if (GenerateApiOrGraph)
// "DownstreamApi": {
// /*
// 'Scopes' contains space separated scopes of the Web API you want to call. This can be:
// - a scope for a V2 application (for instance api://b3682cc7-8b30-4bd2-aaba-080c6bf0fd31/access_as_user)
// - a scope corresponding to a V1 application (for instance <App ID URI>/.default, where <App ID URI> is the
// App ID URI of a legacy v1 Web application
// Applications are registered in the https://portal.azure.com portal.
// */
// "BaseUrl": "[WebApiUrl]",
// "Scopes": "user.read"
// },
////#endif
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information"
}
},
"AllowedHosts": "*"
}

0 comments on commit b314ea8

Please sign in to comment.