-
Notifications
You must be signed in to change notification settings - Fork 23
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
Need an AuthenticationBuilder #13
Comments
Great idea! AuthenticationRequest request = authenticationClient.instantiate(AuthenticationRequest.class)
.setRelayState("some-relay-state")
.setUsername("joe.coder@example.com"); It requires a few extra lines though, are you thinking something like: AuthenticationRequest request = AuthenticationRequestBuilder.instance()
.setRelayState("some-relay-state")
.setUsername("joe.coder@example.com")
.build(); To customize the user-agent just implement a
|
Thanks, I found the A small thing that I ran into with that was when instantiating a subclass, the order of setter calls matters: // Works
client.instantiate(VerifyPassCodeFactorRequest.class)
.setPassCode(passCode)
.setStateToken(token);
// Does not compile
client.instantiate(VerifyPassCodeFactorRequest.class)
.setStateToken(token) // returns a VerifyFactorRequest
.setPassCode(passCode); // No such method on VerifyFactorRequest My app is essentially acting as a login portal / gateway...
Similarly, I need to set the
|
All good points. |
@jmalickenexient no update yet. Your comment will help us prioritize this though, Thanks! |
@bdemers does this new README section cover what was needed by this issue? https://github.com/okta/okta-auth-java#setting-request-headers-parameters-and-device-fingerprinting |
From my perspective, I think this issue is addressed with the |
It would be helpful if there was an
AuthenticationBuilder
, similar to theUserBuilder
of theokta-sdk-api
.If one wants to create an authentication proxy or broker application, they need to craft their own
AuthenticationRequest
with a context (deviceToken) and options. So, theclient.authenticate(username, password, relayState, handler)
method doesn't cut it.Also, I believe we'd need a way to set the
User-Agent
andX-Forwarded-For
headers on each request. (Perhaps this should be a separate issue.)The text was updated successfully, but these errors were encountered: