I am building an internal Web API(asp.net) and I need to integrate our Okta authentication with it. I have the SDK installed through NuGet and I am able to do simple things like get a User and see there Profile.
What I really need to do though is understand how I take a User, Authenticate them through Okta, and then later validate that same User.
Here is what I have, at a basic conceptual level.
var oktaClient = new OktaClient(apiToken: "00vEX-jX3to71axEZ1L3luDfaAPH9d-ZPBV4coG2Ya", baseUri: new Uri(uriString: "https://ourcompany.oktapreview.com"));
AuthClient authClient = oktaClient.GetAuthClient();
AuthResponse response = authClient.Authenticate(username: "MyUserName@corp.ourcompany.com", password: "MyPassword");
AuthResponse huh = authClient.GetStatus(response.StateToken);
The problem is that my response does not contain a StateToken. It only contains a SessionToken. So, what I could really use some help with is what I'm missing.
I've looked through the Okta Music Store(https://github.com/okta/okta-music-store) demo but that doesn't seem to answer my question. Perhaps because it's an older MVC 4 app and I'm using WebApi or just because it's a more complicated example than what I am trying to accomplish I don't know.
I have also been reading through http://developer.okta.com/docs/api/getting_started/design_principles.html and I'm still not seeing what I'm missing.