-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wanted to extend UserAgentBuilder class to pass custom user-agent value #60
Comments
@PranithaReddyAedla, Thanks for using Okta! |
There are certain methods that allow you to provide your own user-agent. Have checked this section in our readme? Does it cover your use case? |
Thank you for responding. @bryanapellanes-okta |
Hey @laura-rodriguez, Thank you for responding. |
I've updated the link with the right URL this time 😅 ! Sorry about that. https://github.com/okta/okta-auth-dotnet/#send-information-via-requests-headers |
@laura-rodriguez Thank you. Yeah, for primary authentication, we could pass custom user-agent. But, for factor authentications we don't have that option right. For futher proccedings after primary authentications I need to pass custom user-agent through out for all the calls. |
Thanks for your feedback @PranithaReddyAedla. You're right, that's not supported at the moment. Would you mind sharing why you need to send this info? Do you need this info to satisfy some sort of policy or just for tracking purposes? I'd like to understand your use case better to see how we can help. |
@laura-rodriguez Wanted it for tracking purposes. Need that custom user agent to reflect in okta sys logs. We want to track, which machine (machine name and IP address) of the organization is accessing. |
Thanks for sharing @PranithaReddyAedla! I put a ticket in our backlog to be prioritized. In the meantime, your best option is to fork the project and customize it with your implementation. |
Thanks a ton @laura-rodriguez for adding it to the backlog and responding. |
Hi @laura-rodriguez @bryanapellanes-okta |
@PranithaReddyAedla Thanks for checking in and sorry for the delay. I've started an internal thread on this topic with PM. We'll update here when there's more. Internal Link: https://oktainc.atlassian.net/browse/OKTA-377094?focusedCommentId=2732757 |
@bryanapellanes-okta Thanks for your response and for opening an internal thread. cc @bryanapellanes-okta @laura-rodriguez @bretterer As of now user-agent is of string type. Due to that, the value being passed is only assigned to RawUserAgent directly and browser is UNKNOWN always. |
I wanted to pass custom user-agent value for all factor authn requests
For that, I wanted to extend UserAgentBuilder class of Okta.Sdk.Abstractions and modify Generate() method to achieve what I wanted exactly. Since, UserAgentBuilder class is being a sealed type class that is not being possible now.
Currently, UserAgentBuilder generates user-agent value as "custom/{sdk-version} runtime/{runtime-info} os/{os-info}"
But, the following is how I need generate to user-agent value.
User-Agent = "machineName/{machine-name-here} machineIp/{ip-address-here} os/{os-info-here} runtime/{runtime-info-here}
Could you please me help with this? Is it possible to modify access-specifier of UserAgentBuilder? Or Is there any possible way that you can propose to solve my issue?
The text was updated successfully, but these errors were encountered: