Skip to content

Commit 1a261c7

Browse files
authored
Update WebjobsAuthenticationEventsTokenClaim to WebJobsAuthenticationEventsTokenClaim (Azure#43815)
* Update WebjobsAuthenticationEventsTokenClaim to WebJobsAuthenticationEventsTokenClaim
1 parent 5698922 commit 1a261c7

File tree

6 files changed

+25
-31
lines changed

6 files changed

+25
-31
lines changed

sdk/entra/Microsoft.Azure.WebJobs.Extensions.AuthenticationEvents/CHANGELOG.md

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,12 @@
11
# Release History
22

3-
## 1.0.0-beta.8 (Unreleased)
4-
5-
### Features Added
6-
7-
### Breaking Changes
8-
9-
### Bugs Fixed
3+
## 1.0.0-beta.8 (2024-05-01)
104

115
### Other Changes
6+
- Updated Prefix WebJobs for WebjobsAuthenticationEventsTokenClaim -> WebJobsAuthenticationEventsTokenClaim
127

138
## 1.0.0-beta.7 (2024-04-15)
149

15-
1610
### Other Changes
1711
- Consildated namespaces. Removing:
1812
- Microsoft.Azure.WebJobs.Extensions.AuthenticationEvents.Framework

sdk/entra/Microsoft.Azure.WebJobs.Extensions.AuthenticationEvents/api/Microsoft.Azure.WebJobs.Extensions.AuthenticationEvents.netstandard2.0.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -215,9 +215,9 @@ public WebJobsAuthenticationEventsContextUser() { }
215215
[System.Text.Json.Serialization.JsonPropertyNameAttribute("userType")]
216216
public string UserType { get { throw null; } set { } }
217217
}
218-
public partial class WebjobsAuthenticationEventsTokenClaim
218+
public partial class WebJobsAuthenticationEventsTokenClaim
219219
{
220-
public WebjobsAuthenticationEventsTokenClaim(string id, params string[] values) { }
220+
public WebJobsAuthenticationEventsTokenClaim(string id, params string[] values) { }
221221
[System.ComponentModel.DataAnnotations.RequiredAttribute(AllowEmptyStrings=false)]
222222
[System.Text.Json.Serialization.JsonPropertyNameAttribute("id")]
223223
public string Id { get { throw null; } set { } }
@@ -227,10 +227,10 @@ public WebjobsAuthenticationEventsTokenClaim(string id, params string[] values)
227227
public partial class WebJobsProvideClaimsForToken : Microsoft.Azure.WebJobs.Extensions.AuthenticationEvents.TokenIssuanceStart.WebJobsTokenIssuanceAction
228228
{
229229
public WebJobsProvideClaimsForToken() { }
230-
public WebJobsProvideClaimsForToken(params Microsoft.Azure.WebJobs.Extensions.AuthenticationEvents.TokenIssuanceStart.WebjobsAuthenticationEventsTokenClaim[] claim) { }
230+
public WebJobsProvideClaimsForToken(params Microsoft.Azure.WebJobs.Extensions.AuthenticationEvents.TokenIssuanceStart.WebJobsAuthenticationEventsTokenClaim[] claim) { }
231231
[System.ComponentModel.DataAnnotations.RequiredAttribute]
232232
[System.Text.Json.Serialization.JsonPropertyNameAttribute("claims")]
233-
public System.Collections.Generic.List<Microsoft.Azure.WebJobs.Extensions.AuthenticationEvents.TokenIssuanceStart.WebjobsAuthenticationEventsTokenClaim> Claims { get { throw null; } }
233+
public System.Collections.Generic.List<Microsoft.Azure.WebJobs.Extensions.AuthenticationEvents.TokenIssuanceStart.WebJobsAuthenticationEventsTokenClaim> Claims { get { throw null; } }
234234
public void AddClaim(string Id, params string[] Values) { }
235235
}
236236
public abstract partial class WebJobsTokenIssuanceAction : Microsoft.Azure.WebJobs.Extensions.AuthenticationEvents.WebJobsAuthenticationEventsAction

sdk/entra/Microsoft.Azure.WebJobs.Extensions.AuthenticationEvents/src/TokenIssuanceStart/Actions/WebJobsProvideClaimsForToken.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public partial class WebJobsProvideClaimsForToken : WebJobsTokenIssuanceAction
1515
/// <value>The claims.</value>
1616
[JsonPropertyName("claims")]
1717
[Required]
18-
public List<WebjobsAuthenticationEventsTokenClaim> Claims { get; } = new List<WebjobsAuthenticationEventsTokenClaim>();
18+
public List<WebJobsAuthenticationEventsTokenClaim> Claims { get; } = new List<WebJobsAuthenticationEventsTokenClaim>();
1919

2020
/// <summary>Gets the type of the action of WebJobsProvideClaimsForToken.</summary>
2121
/// <value>The type of the action.</value>
@@ -27,7 +27,7 @@ public partial class WebJobsProvideClaimsForToken : WebJobsTokenIssuanceAction
2727
public WebJobsProvideClaimsForToken() { }
2828
/// <summary>Initializes a new instance of the <see cref="WebJobsProvideClaimsForToken" /> class.</summary>
2929
/// <param name="claim">A collection of claims to add.</param>
30-
public WebJobsProvideClaimsForToken(params WebjobsAuthenticationEventsTokenClaim[] claim)
30+
public WebJobsProvideClaimsForToken(params WebJobsAuthenticationEventsTokenClaim[] claim)
3131
{
3232
if (claim != null)
3333
{
@@ -44,7 +44,7 @@ public WebJobsProvideClaimsForToken(params WebjobsAuthenticationEventsTokenClaim
4444
/// <param name="Values">The claim values.</param>
4545
public void AddClaim(string Id, params string[] Values)
4646
{
47-
Claims.Add(new WebjobsAuthenticationEventsTokenClaim(Id, Values));
47+
Claims.Add(new WebJobsAuthenticationEventsTokenClaim(Id, Values));
4848
}
4949

5050
/// <summary>Builds the action body.</summary>

sdk/entra/Microsoft.Azure.WebJobs.Extensions.AuthenticationEvents/src/TokenIssuanceStart/Actions/WebjobsAuthenticationEventsTokenClaim.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@
77
namespace Microsoft.Azure.WebJobs.Extensions.AuthenticationEvents.TokenIssuanceStart
88
{
99
/// <summary>Represents a Token Claim.</summary>
10-
public class WebjobsAuthenticationEventsTokenClaim
10+
public class WebJobsAuthenticationEventsTokenClaim
1111
{
12-
/// <summary>Initializes a new instance of the <see cref="WebjobsAuthenticationEventsTokenClaim" /> class.</summary>
12+
/// <summary>Initializes a new instance of the <see cref="WebJobsAuthenticationEventsTokenClaim" /> class.</summary>
1313
/// <param name="id">The identifier.</param>
1414
/// <param name="values">The values.</param>
15-
public WebjobsAuthenticationEventsTokenClaim(string id, params string[] values)
15+
public WebJobsAuthenticationEventsTokenClaim(string id, params string[] values)
1616
{
1717
Id = id;
1818
Values = values;

sdk/entra/Microsoft.Azure.WebJobs.Extensions.AuthenticationEvents/tests/RequestResponseModelTests.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ public async Task TokenIssuanceStartObjectModelTest()
5050
{
5151
request.Response.Actions.Add(
5252
new WebJobsProvideClaimsForToken(
53-
new WebjobsAuthenticationEventsTokenClaim("DateOfBirth", "01/01/2000"),
54-
new WebjobsAuthenticationEventsTokenClaim("CustomRoles", "Writer", "Editor")
53+
new WebJobsAuthenticationEventsTokenClaim("DateOfBirth", "01/01/2000"),
54+
new WebJobsAuthenticationEventsTokenClaim("CustomRoles", "Writer", "Editor")
5555
));
5656

5757
await eventsResponseHandler.SetValueAsync(request.Completed(), CancellationToken.None);
@@ -76,8 +76,8 @@ public async Task TokenIssuanceStartRequestValidationTest(WebJobsAuthenticationE
7676
{
7777
request.Response.Actions.Add(
7878
new WebJobsProvideClaimsForToken(
79-
new WebjobsAuthenticationEventsTokenClaim("DateOfBirth", "01/01/2000"),
80-
new WebjobsAuthenticationEventsTokenClaim("CustomRoles", "Writer", "Editor")
79+
new WebJobsAuthenticationEventsTokenClaim("DateOfBirth", "01/01/2000"),
80+
new WebJobsAuthenticationEventsTokenClaim("CustomRoles", "Writer", "Editor")
8181
));
8282

8383
// set the request status type

sdk/entra/Microsoft.Azure.WebJobs.Extensions.AuthenticationEvents/tests/TestHelper.cs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -312,31 +312,31 @@ public static (WebJobsTokenIssuanceAction action, HttpStatusCode expectReturnCod
312312
HttpStatusCode.OK,
313313
"{\"data\":{\"@odata.type\":\"microsoft.graph.onTokenIssuanceStartResponseData\",\"actions\":[{\"@odata.type\":\"microsoft.graph.tokenIssuanceStart.provideClaimsForToken\",\"claims\":{}}]}}");
314314
case ActionTestTypes.NullClaimId:
315-
return (new WebJobsProvideClaimsForToken(new WebjobsAuthenticationEventsTokenClaim[] { new WebjobsAuthenticationEventsTokenClaim(null, string.Empty) }),
315+
return (new WebJobsProvideClaimsForToken(new WebJobsAuthenticationEventsTokenClaim[] { new WebJobsAuthenticationEventsTokenClaim(null, string.Empty) }),
316316
HttpStatusCode.InternalServerError,
317-
"{\"errors\":[\"WebJobsTokenIssuanceStartResponse: WebJobsProvideClaimsForToken: WebjobsAuthenticationEventsTokenClaim: The Id field is required.\"]}");
317+
"{\"errors\":[\"WebJobsTokenIssuanceStartResponse: WebJobsProvideClaimsForToken: WebJobsAuthenticationEventsTokenClaim: The Id field is required.\"]}");
318318
case ActionTestTypes.EmptyClaimsId:
319-
return (new WebJobsProvideClaimsForToken(new WebjobsAuthenticationEventsTokenClaim[] { new WebjobsAuthenticationEventsTokenClaim(String.Empty, string.Empty) }),
319+
return (new WebJobsProvideClaimsForToken(new WebJobsAuthenticationEventsTokenClaim[] { new WebJobsAuthenticationEventsTokenClaim(String.Empty, string.Empty) }),
320320
HttpStatusCode.InternalServerError,
321-
"{\"errors\":[\"WebJobsTokenIssuanceStartResponse: WebJobsProvideClaimsForToken: WebjobsAuthenticationEventsTokenClaim: The Id field is required.\"]}");
321+
"{\"errors\":[\"WebJobsTokenIssuanceStartResponse: WebJobsProvideClaimsForToken: WebJobsAuthenticationEventsTokenClaim: The Id field is required.\"]}");
322322
case ActionTestTypes.EmptyValueString:
323-
return (new WebJobsProvideClaimsForToken(new WebjobsAuthenticationEventsTokenClaim[] { new WebjobsAuthenticationEventsTokenClaim("key", string.Empty) }),
323+
return (new WebJobsProvideClaimsForToken(new WebJobsAuthenticationEventsTokenClaim[] { new WebJobsAuthenticationEventsTokenClaim("key", string.Empty) }),
324324
HttpStatusCode.OK,
325325
"{\"data\":{\"@odata.type\":\"microsoft.graph.onTokenIssuanceStartResponseData\",\"actions\":[{\"@odata.type\":\"microsoft.graph.tokenIssuanceStart.provideClaimsForToken\",\"claims\":{\"key\":\"\"}}]}}");
326326
case ActionTestTypes.NullValue:
327-
return (new WebJobsProvideClaimsForToken(new WebjobsAuthenticationEventsTokenClaim[] { new WebjobsAuthenticationEventsTokenClaim("key", null) }),
327+
return (new WebJobsProvideClaimsForToken(new WebJobsAuthenticationEventsTokenClaim[] { new WebJobsAuthenticationEventsTokenClaim("key", null) }),
328328
HttpStatusCode.OK,
329329
"{\"data\":{\"@odata.type\":\"microsoft.graph.onTokenIssuanceStartResponseData\",\"actions\":[{\"@odata.type\":\"microsoft.graph.tokenIssuanceStart.provideClaimsForToken\",\"claims\":{\"key\":null}}]}}");
330330
case ActionTestTypes.EmptyValueArray:
331-
return (new WebJobsProvideClaimsForToken(new WebjobsAuthenticationEventsTokenClaim[] { new WebjobsAuthenticationEventsTokenClaim("key", new string[] { }) }),
331+
return (new WebJobsProvideClaimsForToken(new WebJobsAuthenticationEventsTokenClaim[] { new WebJobsAuthenticationEventsTokenClaim("key", new string[] { }) }),
332332
HttpStatusCode.OK,
333333
"{\"data\":{\"@odata.type\":\"microsoft.graph.onTokenIssuanceStartResponseData\",\"actions\":[{\"@odata.type\":\"microsoft.graph.tokenIssuanceStart.provideClaimsForToken\",\"claims\":{\"key\":[]}}]}}");
334334
case ActionTestTypes.EmptyValueStringArray:
335-
return (new WebJobsProvideClaimsForToken(new WebjobsAuthenticationEventsTokenClaim[] { new WebjobsAuthenticationEventsTokenClaim("key", new string[] { String.Empty, String.Empty }) }),
335+
return (new WebJobsProvideClaimsForToken(new WebJobsAuthenticationEventsTokenClaim[] { new WebJobsAuthenticationEventsTokenClaim("key", new string[] { String.Empty, String.Empty }) }),
336336
HttpStatusCode.OK,
337337
"{\"data\":{\"@odata.type\":\"microsoft.graph.onTokenIssuanceStartResponseData\",\"actions\":[{\"@odata.type\":\"microsoft.graph.tokenIssuanceStart.provideClaimsForToken\",\"claims\":{\"key\":[\"\",\"\"]}}]}}");
338338
case ActionTestTypes.EmptyMixedArray:
339-
return (new WebJobsProvideClaimsForToken(new WebjobsAuthenticationEventsTokenClaim[] { new WebjobsAuthenticationEventsTokenClaim("key", new string[] { String.Empty, null, " " }) }),
339+
return (new WebJobsProvideClaimsForToken(new WebJobsAuthenticationEventsTokenClaim[] { new WebJobsAuthenticationEventsTokenClaim("key", new string[] { String.Empty, null, " " }) }),
340340
HttpStatusCode.OK,
341341
"{\"data\":{\"@odata.type\":\"microsoft.graph.onTokenIssuanceStartResponseData\",\"actions\":[{\"@odata.type\":\"microsoft.graph.tokenIssuanceStart.provideClaimsForToken\",\"claims\":{\"key\":[\"\",null,\" \"]}}]}}");
342342
case ActionTestTypes.NullActionItems:

0 commit comments

Comments
 (0)