Skip to content

Commit 37161df

Browse files
authored
fix: add WAITING back to UserFactorVerifyResult enum (#1717)
* fix: add WAITING back to UserFactorVerifyResult enum (#1716) WAITING was dropped from UserFactorVerifyResult in 25.x, so async factor verifications (e.g. Okta Verify push polling) deserialized as UNKNOWN_DEFAULT_OPEN_API. Restore it in the spec. Co-Authored-By: Claude Code * test: add UserFactorVerifyResult WAITING deserialization test (#1716) Co-Authored-By: Claude Code
1 parent a3d987b commit 37161df

2 files changed

Lines changed: 40 additions & 0 deletions

File tree

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
/*
2+
* Copyright 2026-Present Okta, Inc.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
package com.okta.sdk.resource.model;
17+
18+
import org.testng.annotations.Test;
19+
20+
import static org.testng.Assert.assertEquals;
21+
import static org.testng.Assert.assertNotEquals;
22+
23+
/**
24+
* GH-1716: the Okta Factors API returns "factorResult": "WAITING" while polling async factor verifications
25+
* (e.g. Okta Verify push), but the 25.x enum dropped that constant, so it fell through to
26+
* UNKNOWN_DEFAULT_OPEN_API.
27+
*/
28+
public class UserFactorVerifyResultTest {
29+
30+
@Test
31+
public void fromValue_waiting_resolvesToRealConstant() {
32+
UserFactorVerifyResult result = UserFactorVerifyResult.fromValue("WAITING");
33+
34+
assertEquals(result, UserFactorVerifyResult.WAITING);
35+
assertNotEquals(result, UserFactorVerifyResult.UNKNOWN_DEFAULT_OPEN_API);
36+
assertEquals(result.getValue(), "WAITING");
37+
}
38+
}

‎src/swagger/api.yaml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81739,6 +81739,7 @@ components:
8173981739
- SUCCESS
8174081740
- TIMEOUT
8174181741
- TIME_WINDOW_EXCEEDED
81742+
- WAITING
8174281743
x-enumDescriptions:
8174381744
CANCELED: User cancelled the verification
8174481745
CHALLENGE: Okta issued a verification challenge
@@ -81750,6 +81751,7 @@ components:
8175081751
SUCCESS: User completed the verification
8175181752
TIMEOUT: Okta didn't complete the verification within the allowed time window
8175281753
TIME_WINDOW_EXCEEDED: User completed the verification outside of the allowed time window. Another verification is required.
81754+
WAITING: Verification is in progress
8175381755
UserFactorVerifyResultWaiting:
8175481756
description: Result of a factor verification
8175581757
type: string

0 commit comments

Comments
 (0)