@@ -27,7 +27,7 @@ public OpenIdConnectSettings(bool validateConfiguration)
2727 ValidateIssuerSigningKey = SettingsReader . Read ( Settings . SettingsRootNamespace , "Authentication.ValidateIssuerSigningKey" , true ) ;
2828 RequireHttpsMetadata = SettingsReader . Read ( Settings . SettingsRootNamespace , "Authentication.RequireHttpsMetadata" , true ) ;
2929 ServicePulseClientId = SettingsReader . Read < string > ( Settings . SettingsRootNamespace , "Authentication.ServicePulse.ClientId" ) ;
30- ServicePulseApiScope = SettingsReader . Read < string > ( Settings . SettingsRootNamespace , "Authentication.ServicePulse.ApiScope " ) ;
30+ ServicePulseApiScopes = SettingsReader . Read < string > ( Settings . SettingsRootNamespace , "Authentication.ServicePulse.ApiScopes " ) ;
3131 ServicePulseAuthority = SettingsReader . Read < string > ( Settings . SettingsRootNamespace , "Authentication.ServicePulse.Authority" ) ;
3232
3333 if ( validateConfiguration )
@@ -63,11 +63,14 @@ public OpenIdConnectSettings(bool validateConfiguration)
6363 [ JsonPropertyName ( "servicePulseAuthority" ) ]
6464 public string ServicePulseAuthority { get ; }
6565
66+ [ JsonPropertyName ( "servicePulseAudience" ) ]
67+ public string ServicePulseAudience { get ; }
68+
6669 [ JsonPropertyName ( "servicePulseClientId" ) ]
6770 public string ServicePulseClientId { get ; }
6871
69- [ JsonPropertyName ( "servicePulseApiScope " ) ]
70- public string ServicePulseApiScope { get ; }
72+ [ JsonPropertyName ( "servicePulseApiScopes " ) ]
73+ public string ServicePulseApiScopes { get ; }
7174
7275 void Validate ( )
7376 {
@@ -129,10 +132,10 @@ void Validate()
129132 throw new Exception ( "Authentication.ServicePulse.ClientId is required when Authentication.ServicePulse.Enabled is true." ) ;
130133 }
131134
132- if ( string . IsNullOrWhiteSpace ( ServicePulseApiScope ) )
133- {
134- throw new Exception ( "Authentication.ServicePulse.ApiScope is required when Authentication.ServicePulse.Enabled is true." ) ;
135- }
135+ // if (string.IsNullOrWhiteSpace(ServicePulseApiScope))
136+ // {
137+ // throw new Exception("Authentication.ServicePulse.ApiScope is required when Authentication.ServicePulse.Enabled is true.");
138+ // }
136139
137140 if ( ServicePulseAuthority != null && ! Uri . TryCreate ( ServicePulseAuthority , UriKind . Absolute , out _ ) )
138141 {
@@ -149,7 +152,8 @@ void Validate()
149152 logger . LogInformation ( " RequireHttpsMetadata: {RequireHttpsMetadata}" , RequireHttpsMetadata ) ;
150153 logger . LogInformation ( " ServicePulseClientId: {ServicePulseClientId}" , ServicePulseClientId ) ;
151154 logger . LogInformation ( " ServicePulseAuthority: {ServicePulseAuthority}" , ServicePulseAuthority ) ;
152- logger . LogInformation ( " ServicePulseApiScope: {ServicePulseApiScope}" , ServicePulseApiScope ) ;
155+ logger . LogInformation ( " ServicePulseAudience: {ServicePulseAudience}" , ServicePulseAudience ) ;
156+ logger . LogInformation ( " ServicePulseApiScopes: {ServicePulseApiScopes}" , ServicePulseApiScopes ) ;
153157 }
154158 }
155159}
0 commit comments