Skip to content

Commit b115958

Browse files
committed
Added notes to token validation code
1 parent 3a5cf20 commit b115958

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

Microsoft.SCIM.WebHostSample/Startup.cs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ public void ConfigureServices(IServiceCollection services)
4141
{
4242
// Development environment code
4343
// Validation for bearer token for authorization used during testing.
44-
// This is not meant to replace proper OAuth for authentication purposes.
44+
// NOTE: It's not recommended to use this code in production, it is not meant to replace proper OAuth authentication.
45+
// This option is primarily available for testing purposes.
4546
services.AddAuthentication(options =>
4647
{
4748
options.DefaultAuthenticateScheme = JwtBearerDefaults.AuthenticationScheme;
@@ -65,7 +66,11 @@ public void ConfigureServices(IServiceCollection services)
6566
}
6667
else
6768
{
68-
// Azure AD token validation code
69+
// Leave the optional Secret Token field blank
70+
// Azure AD includes an OAuth bearer token issued from Azure AD with each request
71+
// The following code validates the Azure AD-issued token
72+
// NOTE: It's not recommended to leave this field blank and rely on a token generated by Azure AD.
73+
// This option is primarily available for testing purposes.
6974
services.AddAuthentication(options =>
7075
{
7176
options.DefaultAuthenticateScheme = JwtBearerDefaults.AuthenticationScheme;

0 commit comments

Comments
 (0)