okta-auth-java icon indicating copy to clipboard operation
okta-auth-java copied to clipboard

Add ability to do authentication with Activation Token

Open matthewdfleming opened this issue 7 years ago • 3 comments

I could be missing it but I was going to use this api as a part of my 'activation' flow. The idea that I would post to /api/v1/authn with a {"token": "blahblah"} and get the user back plus password policy etc.

I'm not super familiar with this implementation of the api though so maybe I'm missing where I can do that

matthewdfleming avatar May 31 '18 15:05 matthewdfleming

@matthewdfleming sorry we missed this.

You can get access to any property returned by using .getEmbedded().get("a-key")

Please reopen if you run into any issues!

bdemers avatar Jun 25 '18 18:06 bdemers

Hmm.. not sure about your response, it doesn't seem to be related to the question.

What I need to be able to do is to login via this api with just an activation token (rather than a username/password combo). Currently there does not seem to be any java method that I can use to do that. Is there one that I missed?

matthewdfleming avatar Jun 25 '18 18:06 matthewdfleming

Sorry, I misunderstood!

It isn't supported directly at the moment. You could probably do it by using:

AuthenticationRequest request = client.instantiate(AuthenticationRequest.class);
request.put("token", "blahblah"));
client.authenticate(request, ...);

Either way, I'll reopen to make sure we add a method signature for this.

bdemers avatar Jun 25 '18 20:06 bdemers