public AuthResponse ValidateToken(string recoveryToken) { var apiObject = new ApiObject(); apiObject.SetProperty("recoveryToken", recoveryToken); var response = BaseClient.Post(resourcePath + Constants.RecoveryEndpoint + Constants.TokenEndpoint, apiObject.ToJson()); return Utils.Deserialize<AuthResponse>(response); }
public AuthResponse GetStatus(string stateToken) { var apiObject = new ApiObject(); apiObject.SetProperty("stateToken", stateToken); var response = BaseClient.Post(resourcePath, apiObject.ToJson()); return Utils.Deserialize<AuthResponse>(response); }
public AuthResponse ActivateTotpFactor(string stateToken, AuthResponse authResponse, string passCode) { var apiObject = new ApiObject(); apiObject.SetProperty("passCode", passCode); var nextLink = authResponse.Links["next"].First(); return Execute(stateToken, nextLink, apiObject); }
public AuthResponse Execute(string stateToken, Uri uri, ApiObject apiObject = null) { // Create a new apiObject if it's null, because we need to add a stateToken apiObject = apiObject ?? new ApiObject(); apiObject.SetProperty("stateToken", stateToken); var response = BaseClient.Post(uri, apiObject.ToJson()); return Utils.Deserialize<AuthResponse>(response); }
public AuthResponse Execute(string stateToken, Link link, ApiObject apiObject = null) { return Execute(stateToken, link.Href, apiObject); }