@@ -151,9 +151,9 @@ public void GetAuthorizationLevel_InvalidKeyHeader_ReturnsAnonymous()
151151 }
152152
153153 [ Fact ]
154- public void GetAuthorizationLevel_ValidKeyQueryParam_MasterKey_ReturnsAdmin ( )
154+ public void GetAuthorizationLevel_ValidCodeQueryParam_MasterKey_ReturnsAdmin ( )
155155 {
156- Uri uri = new Uri ( string . Format ( "http://functions/api/foo?key ={0}" , testMasterKeyValue ) ) ;
156+ Uri uri = new Uri ( string . Format ( "http://functions/api/foo?code ={0}" , testMasterKeyValue ) ) ;
157157 HttpRequestMessage request = new HttpRequestMessage ( HttpMethod . Get , uri ) ;
158158
159159 AuthorizationLevel level = AuthorizationLevelAttribute . GetAuthorizationLevel ( request , _mockSecretManager . Object ) ;
@@ -162,24 +162,24 @@ public void GetAuthorizationLevel_ValidKeyQueryParam_MasterKey_ReturnsAdmin()
162162 }
163163
164164 [ Fact ]
165- public void GetAuthorizationLevel_ValidKeyQueryParam_FunctionKey_ReturnsFunction ( )
165+ public void GetAuthorizationLevel_ValidCodeQueryParam_FunctionKey_ReturnsFunction ( )
166166 {
167167 // first try host level function key
168- Uri uri = new Uri ( string . Format ( "http://functions/api/foo?key ={0}" , testHostFunctionKeyValue ) ) ;
168+ Uri uri = new Uri ( string . Format ( "http://functions/api/foo?code ={0}" , testHostFunctionKeyValue ) ) ;
169169 HttpRequestMessage request = new HttpRequestMessage ( HttpMethod . Get , uri ) ;
170170 AuthorizationLevel level = AuthorizationLevelAttribute . GetAuthorizationLevel ( request , _mockSecretManager . Object , functionName : "TestFunction" ) ;
171171 Assert . Equal ( AuthorizationLevel . Function , level ) ;
172172
173- uri = new Uri ( string . Format ( "http://functions/api/foo?key ={0}" , testFunctionKeyValue ) ) ;
173+ uri = new Uri ( string . Format ( "http://functions/api/foo?code ={0}" , testFunctionKeyValue ) ) ;
174174 request = new HttpRequestMessage ( HttpMethod . Get , uri ) ;
175175 level = AuthorizationLevelAttribute . GetAuthorizationLevel ( request , _mockSecretManager . Object , functionName : "TestFunction" ) ;
176176 Assert . Equal ( AuthorizationLevel . Function , level ) ;
177177 }
178178
179179 [ Fact ]
180- public void GetAuthorizationLevel_InvalidKeyQueryParam_ReturnsAnonymous ( )
180+ public void GetAuthorizationLevel_InvalidCodeQueryParam_ReturnsAnonymous ( )
181181 {
182- Uri uri = new Uri ( string . Format ( "http://functions/api/foo?key ={0}" , "invalid" ) ) ;
182+ Uri uri = new Uri ( string . Format ( "http://functions/api/foo?code ={0}" , "invalid" ) ) ;
183183 HttpRequestMessage request = new HttpRequestMessage ( HttpMethod . Get , uri ) ;
184184
185185 AuthorizationLevel level = AuthorizationLevelAttribute . GetAuthorizationLevel ( request , _mockSecretManager . Object ) ;
0 commit comments