okta / okta-sdk-dotnet

A .NET SDK for interacting with the Okta management API, enabling server-side code to manage Okta users, groups, applications, and more.
Other
160 stars 100 forks source link

Get transactionId from the VerifyUserFactorResponse #673

Closed 3sRykaert closed 10 months ago

3sRykaert commented 1 year ago

Describe the feature request?

Hey @laura-rodriguez ,

now that #671 and #672 are merged to the "release branch", is there a easier solution possible then manually parsing the "VerifyUserFactorResponse.Links.Poll.Href" to get the transactionId from the response? Now I have to "manually" parse the following result: image

In Okta.SDK 5.x there was this functionality (but was removed in v6.x), see f.e.: https://github.com/okta/okta-sdk-dotnet/blob/v5.6.2/src/Okta.Sdk/VerifyUserFactorResponse.cs

New or Affected Resource(s)

okta-sdk-dotnet

Provide a documentation link

https://developer.okta.com/docs/reference/api/factors/#issue-a-push-factor-challenge

Additional Information?

507

laura-rodriguez commented 1 year ago

Hi @3sRykaert,

We're not planning to add convenience methods to parse links in the near future. What you could potentially do is either mimic what we did in 5.x and adding a partial class with a GetTransactionId() or add a helper that parses links.

For this particular case, you have to do the following to get the transaction ID:

var transactionId = verifyUserFactorResponse.Links.Poll.Href.Split('/').Last();