Skip to content

Commit

Permalink
ON-40650 # Add customGroups to RawJWTPayload
Browse files Browse the repository at this point in the history
  • Loading branch information
kizaonline committed May 24, 2024
1 parent 3e5d8f3 commit 85a42c9
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 5 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
### Added

- `googleMapsIntegrationKeyId` to `FormsAppBase`
- `approvalGroups` to `ApprovalsFormsApp`
- `groups` to `FormsAppBase`
- `customGroups` to `RawJWTPayload`
- `groups` to `FormSubmissionUser`

### Removed

Expand Down
1 change: 1 addition & 0 deletions OneBlink.SDK/FormsAppsClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ public async Task<JWTPayload> VerifyJWT(string token)
}
jWTPayload.phoneNumber = rawJWTPayload.customPhoneNumber;
jWTPayload.phoneNumberVerified = rawJWTPayload.customPhoneNumberVerified;
jWTPayload.groups = rawJWTPayload.customGroups;
if (rawJWTPayload.identities != null && rawJWTPayload.identities.Count > 0)
{
jWTPayload.providerType = rawJWTPayload.identities[0].providerType;
Expand Down
5 changes: 1 addition & 4 deletions OneBlink.SDK/models/ApprovalsFormsApp.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@ public override string type
{
get;
}
public List<string> approvalGroups
{
get; set;
}

}
}
4 changes: 4 additions & 0 deletions OneBlink.SDK/models/FormSubmission.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@ public bool? phoneNumberVerified
{
get; set;
}
public List<string> groups
{
get; set;
}
}

public enum FormSubmissionDeviceType
Expand Down
4 changes: 4 additions & 0 deletions OneBlink.SDK/models/FormsAppBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,5 +80,9 @@ public bool enableAppUserSignup
{
get; set;
}
public List<string> groups
{
get; set;
}
}
}
5 changes: 5 additions & 0 deletions OneBlink.SDK/models/JWTPayload.cs
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,11 @@ public string preferred_username
{
get; set;
}
[JsonProperty("custom:groups")]
public List<string> customGroups
{
get; set;
}
}

public class Identity
Expand Down

0 comments on commit 85a42c9

Please sign in to comment.