From 23c74cd88750827d3ccbe115f768127b435a388e Mon Sep 17 00:00:00 2001 From: Aleksandr Balakirev Date: Sat, 26 Oct 2024 10:54:04 +0200 Subject: [PATCH 01/28] Add .env.example --- .env.example | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 .env.example diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..4989e6f --- /dev/null +++ b/.env.example @@ -0,0 +1,2 @@ +CORBADO_API_SECRET=corbado1_xxx +CORBADO_PROJECT_ID=pro-xxx From 334802383851e5634c0427deb24cb47dfcf9e134 Mon Sep 17 00:00:00 2001 From: Aleksandr Balakirev Date: Sun, 27 Oct 2024 17:53:25 +0100 Subject: [PATCH 02/28] Make frontend api required for config --- .env.example | 3 ++ .github/workflows/ci.yml | 1 + src/main/java/com/corbado/sdk/Config.java | 51 +++---------------- src/test/java/com/corbado/util/TestUtils.java | 21 +++++--- 4 files changed, 27 insertions(+), 49 deletions(-) diff --git a/.env.example b/.env.example index 4989e6f..1f77004 100644 --- a/.env.example +++ b/.env.example @@ -1,2 +1,5 @@ CORBADO_API_SECRET=corbado1_xxx CORBADO_PROJECT_ID=pro-xxx +CORBADO_BACKEND_API= +CORBADO_FRONTEND_API= + diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2337c46..cd52cbe 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -101,6 +101,7 @@ jobs: CORBADO_API_SECRET: ${{ secrets.CORBADO_API_SECRET }} CORBADO_PROJECT_ID: ${{ secrets.CORBADO_PROJECT_ID }} CORBADO_BACKEND_API: ${{ vars.CORBADO_BACKEND_API }} + CORBADO_FRONTEND_API: ${{ vars.CORBADO_FRONTEND_API }} run: mvn --batch-mode --update-snapshots verify -DskipInstall deploy: diff --git a/src/main/java/com/corbado/sdk/Config.java b/src/main/java/com/corbado/sdk/Config.java index ba279e8..2182485 100644 --- a/src/main/java/com/corbado/sdk/Config.java +++ b/src/main/java/com/corbado/sdk/Config.java @@ -2,7 +2,9 @@ import java.net.MalformedURLException; import java.net.URL; + import org.apache.commons.lang3.StringUtils; + import lombok.Builder; import lombok.Getter; import lombok.NonNull; @@ -40,8 +42,8 @@ public class Config { /** The api secret with custom setter. Must be provided. */ @NonNull @Getter private String apiSecret; - /** The backend api with custom setter. Default value: "https://backendapi.cloud.corbado.io/v2" */ - @Getter @Builder.Default private String backendApi = "https://backendapi.cloud.corbado.io/v2"; + /** The backend api with custom setter. */ + @Getter private String backendApi; /** The short session cookie name. Default value: "cbo_short_session" */ @Getter @Setter @Builder.Default private String shortSessionCookieName = "cbo_short_session"; @@ -61,38 +63,6 @@ public class Config { /** The cname. Replaces issuer field if present. */ @Getter @Setter private String cname; - // Constructors - /** - * Instantiates a new config. - * - * @param projectId the project id - * @param apiSecret the api secret - */ - public Config(@NonNull final String projectId, @NonNull final String apiSecret) { - - setProjectId(projectId); // set and validate - setApiSecret(apiSecret); - - // default values - setFrontendApi(projectId); - setIssuer(this.frontendApi); - } - - /** - * Instantiates a new config. - * - * @param projectId the project id - * @param apiSecret the api secret - * @param backendApi the backend api - */ - public Config( - @NonNull final String projectId, - @NonNull final String apiSecret, - @NonNull final String backendApi) { - this(projectId, apiSecret); - setBackendApi(backendApi); - } - // Custom Getters and Setters /** * Sets the api secret. @@ -136,8 +106,6 @@ public void setBackendApi(String backendApi) { */ public void setFrontendApi(String frontendApi) { frontendApi = StringUtils.trim(frontendApi); - frontendApi = StringUtils.prependIfMissing(frontendApi, HTTPS); - frontendApi = StringUtils.appendIfMissing(frontendApi, ".frontendapi.corbado.io"); try { new URL(frontendApi); // Validate URL syntax @@ -178,10 +146,10 @@ public void setProjectId(@NonNull String projectId) { public Config( @NonNull final String projectId, @NonNull final String apiSecret, - final String backendApi, + @NonNull final String backendApi, final String shortSessionCookieName, final String issuer, - final String frontendApi, + @NonNull final String frontendApi, final Integer shortSessionLength, final boolean cacheKeys, String cname) { @@ -190,11 +158,8 @@ public Config( setApiSecret(apiSecret); setBackendApi(backendApi); setShortSessionCookieName(shortSessionCookieName); - if (StringUtils.isEmpty(frontendApi)) { - setFrontendApi(projectId); - } else { - setFrontendApi(frontendApi); - } + setFrontendApi(frontendApi); + setShortSessionLength(shortSessionLength); setCacheKeys(cacheKeys); setCname(cname); diff --git a/src/test/java/com/corbado/util/TestUtils.java b/src/test/java/com/corbado/util/TestUtils.java index a897091..7d01cee 100644 --- a/src/test/java/com/corbado/util/TestUtils.java +++ b/src/test/java/com/corbado/util/TestUtils.java @@ -26,6 +26,9 @@ public class TestUtils { /** The Constant CORBADO_BACKEND_API. */ public static final String CORBADO_BACKEND_API = "CORBADO_BACKEND_API"; + /** The Constant CORBADO_FRONTEND_API. */ + public static final String CORBADO_FRONTEND_API = "CORBADO_FRONTEND_API"; + /** The Constant CANNOT_BE_BLANK_MESSAGE. */ public static final String CANNOT_BE_BLANK_MESSAGE = "cannot be blank"; @@ -120,13 +123,19 @@ public static CorbadoSdk instantiateSDK() throws StandardException { if (StringUtils.isEmpty(backendApi)) { backendApi = dotenv.get(CORBADO_BACKEND_API); } - Config config = null; - if (StringUtils.isEmpty(backendApi)) { - config = Config.builder().apiSecret(apiSecret).projectId(projectId).build(); - } else { - config = - Config.builder().apiSecret(apiSecret).projectId(projectId).backendApi(backendApi).build(); + + // Check for CORBADO_BACKEND_API + String frontendApi = System.getenv(CORBADO_FRONTEND_API); + if (StringUtils.isEmpty(frontendApi)) { + frontendApi = dotenv.get(CORBADO_FRONTEND_API); } + final Config config = + Config.builder() + .apiSecret(apiSecret) + .projectId(projectId) + .backendApi(backendApi) + .frontendApi(frontendApi) + .build(); return new CorbadoSdk(config); } From 01707b0fa34f2bcb3c16ecdbabd412b5c4baa390 Mon Sep 17 00:00:00 2001 From: Aleksandr Balakirev Date: Sun, 27 Oct 2024 18:28:58 +0100 Subject: [PATCH 03/28] Renamed short-term session to session-token --- src/main/java/com/corbado/sdk/Config.java | 6 +-- .../com/corbado/unit/SessionServiceTest.java | 41 +++++++++---------- 2 files changed, 21 insertions(+), 26 deletions(-) diff --git a/src/main/java/com/corbado/sdk/Config.java b/src/main/java/com/corbado/sdk/Config.java index 2182485..d526c0e 100644 --- a/src/main/java/com/corbado/sdk/Config.java +++ b/src/main/java/com/corbado/sdk/Config.java @@ -2,9 +2,7 @@ import java.net.MalformedURLException; import java.net.URL; - import org.apache.commons.lang3.StringUtils; - import lombok.Builder; import lombok.Getter; import lombok.NonNull; @@ -45,8 +43,8 @@ public class Config { /** The backend api with custom setter. */ @Getter private String backendApi; - /** The short session cookie name. Default value: "cbo_short_session" */ - @Getter @Setter @Builder.Default private String shortSessionCookieName = "cbo_short_session"; + /** The short session cookie name. Default value: "cbo_session_token" */ + @Getter @Setter @Builder.Default private String shortSessionCookieName = "cbo_session_token"; /** The issuer. Used for session verification. */ @Getter @Setter private String issuer; diff --git a/src/test/java/com/corbado/unit/SessionServiceTest.java b/src/test/java/com/corbado/unit/SessionServiceTest.java index b6dc2bd..a97242a 100644 --- a/src/test/java/com/corbado/unit/SessionServiceTest.java +++ b/src/test/java/com/corbado/unit/SessionServiceTest.java @@ -5,7 +5,23 @@ import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertThrows; import static org.mockito.ArgumentMatchers.anyString; - +import com.auth0.jwk.Jwk; +import com.auth0.jwk.JwkException; +import com.auth0.jwk.JwkProvider; +import com.auth0.jwk.SigningKeyNotFoundException; +import com.auth0.jwt.JWT; +import com.auth0.jwt.algorithms.Algorithm; +import com.auth0.jwt.exceptions.IncorrectClaimException; +import com.auth0.jwt.exceptions.JWTDecodeException; +import com.auth0.jwt.exceptions.JWTVerificationException; +import com.auth0.jwt.exceptions.TokenExpiredException; +import com.corbado.entities.SessionValidationResult; +import com.corbado.exceptions.StandardException; +import com.corbado.services.SessionService; +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonObject; +import com.google.gson.JsonSyntaxException; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.IOException; @@ -24,7 +40,6 @@ import java.util.List; import java.util.Map; import java.util.stream.Stream; - import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; @@ -36,24 +51,6 @@ import org.mockito.Mockito; import org.mockito.junit.jupiter.MockitoExtension; -import com.auth0.jwk.Jwk; -import com.auth0.jwk.JwkException; -import com.auth0.jwk.JwkProvider; -import com.auth0.jwk.SigningKeyNotFoundException; -import com.auth0.jwt.JWT; -import com.auth0.jwt.algorithms.Algorithm; -import com.auth0.jwt.exceptions.IncorrectClaimException; -import com.auth0.jwt.exceptions.JWTDecodeException; -import com.auth0.jwt.exceptions.JWTVerificationException; -import com.auth0.jwt.exceptions.TokenExpiredException; -import com.corbado.entities.SessionValidationResult; -import com.corbado.exceptions.StandardException; -import com.corbado.services.SessionService; -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonObject; -import com.google.gson.JsonSyntaxException; - /** Unit Test for session service. */ @ExtendWith(MockitoExtension.class) public class SessionServiceTest { @@ -186,7 +183,7 @@ void testInitParametersValidation( */ @ParameterizedTest @MethodSource("provideJwts") - void test_getCurrentUser(final String jwt, Class e) + void test_getCurrentUser(final String jwt, final Class e) throws StandardException, IncorrectClaimException, JWTVerificationException, JwkException { if (e != null) { @@ -340,7 +337,7 @@ private static String generateJwt(final String iss, final long exp, final long n */ private static SessionService createSessionService() { return new SessionService( - "cbo_short_session", + "cbo_session_token", "https://auth.acme.com", "https://example_uri.com", 10, From 06a01572977afdd1ea2cdd6e6fae44991cf4d7d4 Mon Sep 17 00:00:00 2001 From: Aleksandr Balakirev Date: Sun, 27 Oct 2024 19:21:56 +0100 Subject: [PATCH 04/28] Change short-term session naming to session-token naming --- src/main/java/com/corbado/sdk/Config.java | 20 +++--- .../com/corbado/services/SessionService.java | 61 +++++++++---------- .../com/corbado/unit/SessionServiceTest.java | 8 +-- 3 files changed, 43 insertions(+), 46 deletions(-) diff --git a/src/main/java/com/corbado/sdk/Config.java b/src/main/java/com/corbado/sdk/Config.java index d526c0e..055f682 100644 --- a/src/main/java/com/corbado/sdk/Config.java +++ b/src/main/java/com/corbado/sdk/Config.java @@ -43,8 +43,8 @@ public class Config { /** The backend api with custom setter. */ @Getter private String backendApi; - /** The short session cookie name. Default value: "cbo_session_token" */ - @Getter @Setter @Builder.Default private String shortSessionCookieName = "cbo_session_token"; + /** The session token cookie name. Default value: "cbo_session_token." */ + @Getter @Setter @Builder.Default private String sessionTokenCookieName = "cbo_session_token"; /** The issuer. Used for session verification. */ @Getter @Setter private String issuer; @@ -52,8 +52,8 @@ public class Config { /** The frontend api with custom setter. */ @Getter private String frontendApi; - /** The short session length for session service. Default = 300. */ - @Getter @Setter @Builder.Default private Integer shortSessionLength = 300; + /** The life duration for session service token. Default = 300. */ + @Getter @Setter @Builder.Default private Integer sessionTokenLength = 300; /** Flag to cache keys in session service. Default = true. */ @Getter @Setter @Builder.Default private boolean cacheKeys = true; @@ -134,10 +134,10 @@ public void setProjectId(@NonNull String projectId) { * @param projectId the project id * @param apiSecret the api secret * @param backendApi the backend api - * @param shortSessionCookieName the short session cookie name + * @param sessionTokenCookieName the short session cookie name * @param issuer the issuer * @param frontendApi the frontend api - * @param shortSessionLength the short session length + * @param sessionTokenLength the short session length * @param cacheKeys the cache keys * @param cname the cname */ @@ -145,20 +145,20 @@ public Config( @NonNull final String projectId, @NonNull final String apiSecret, @NonNull final String backendApi, - final String shortSessionCookieName, + final String sessionTokenCookieName, final String issuer, @NonNull final String frontendApi, - final Integer shortSessionLength, + final Integer sessionTokenLength, final boolean cacheKeys, String cname) { setProjectId(projectId); setApiSecret(apiSecret); setBackendApi(backendApi); - setShortSessionCookieName(shortSessionCookieName); + setSessionTokenCookieName(sessionTokenCookieName); setFrontendApi(frontendApi); - setShortSessionLength(shortSessionLength); + setSessionTokenLength(sessionTokenLength); setCacheKeys(cacheKeys); setCname(cname); diff --git a/src/main/java/com/corbado/services/SessionService.java b/src/main/java/com/corbado/services/SessionService.java index 0a91ed5..cfe0569 100644 --- a/src/main/java/com/corbado/services/SessionService.java +++ b/src/main/java/com/corbado/services/SessionService.java @@ -1,12 +1,5 @@ package com.corbado.services; -import java.net.MalformedURLException; -import java.net.URL; -import java.security.interfaces.RSAPublicKey; -import java.util.concurrent.TimeUnit; - -import org.apache.commons.lang3.StringUtils; - import com.auth0.jwk.Jwk; import com.auth0.jwk.JwkException; import com.auth0.jwk.JwkProvider; @@ -21,7 +14,11 @@ import com.corbado.entities.SessionValidationResult; import com.corbado.sdk.Config; import com.corbado.utils.ValidationUtils; - +import java.net.MalformedURLException; +import java.net.URL; +import java.security.interfaces.RSAPublicKey; +import java.util.concurrent.TimeUnit; +import org.apache.commons.lang3.StringUtils; import lombok.Getter; import lombok.NonNull; import lombok.Setter; @@ -40,8 +37,8 @@ public class SessionService { /** The Constant DEFAULT_SESSION_LENGTH. */ private static final int DEFAULT_SESSION_LENGTH = 300; - /** The short session cookie name. */ - private String shortSessionCookieName; + /** The session token cookie name. */ + private String sessionTokenCookieName; /** The issuer. */ private String issuer; @@ -50,7 +47,7 @@ public class SessionService { private String jwksUri; /** The last short session validation result. */ - private String lastShortSessionValidationResult; + private String lastSessionTokenValidationResult; /** The jwk provider. */ private JwkProvider jwkProvider; @@ -58,23 +55,23 @@ public class SessionService { /** * Instantiates a new session service. * - * @param shortSessionCookieName the short session cookie name + * @param sessionTokenCookieName the short session cookie name * @param issuer the issuer * @param jwksUri the jwks uri - * @param shortSessionLength the short session length + * @param sessionTokenLength the short session length * @param cacheKeys the cache keys */ public SessionService( - final String shortSessionCookieName, + final String sessionTokenCookieName, final String issuer, final String jwksUri, - Integer shortSessionLength, + Integer sessionTokenLength, final boolean cacheKeys) { - ValidationUtils.validateNotEmpty(shortSessionCookieName, issuer, jwksUri); - shortSessionLength = (shortSessionLength != null) ? shortSessionLength : DEFAULT_SESSION_LENGTH; + ValidationUtils.validateNotEmpty(sessionTokenCookieName, issuer, jwksUri); + sessionTokenLength = (sessionTokenLength != null) ? sessionTokenLength : DEFAULT_SESSION_LENGTH; - this.shortSessionCookieName = shortSessionCookieName; + this.sessionTokenCookieName = sessionTokenCookieName; this.issuer = issuer; this.jwksUri = jwksUri; @@ -82,7 +79,7 @@ public SessionService( try { jwkProviderBuilder = new JwkProviderBuilder(new URL(jwksUri)); if (cacheKeys) { - jwkProviderBuilder.cached(JWK_CACHE_SIZE, shortSessionLength, TimeUnit.SECONDS); + jwkProviderBuilder.cached(JWK_CACHE_SIZE, sessionTokenLength, TimeUnit.SECONDS); } this.jwkProvider = jwkProviderBuilder.build(); } catch (final MalformedURLException e) { @@ -98,10 +95,10 @@ public SessionService( */ public SessionService(@NonNull final Config config) { this( - config.getShortSessionCookieName(), + config.getSessionTokenCookieName(), config.getIssuer(), config.getFrontendApi() + "/.well-known/jwks", - config.getShortSessionLength(), + config.getSessionTokenLength(), config.isCacheKeys()); } @@ -111,38 +108,38 @@ public SessionService(@NonNull final Config config) { * @param issuer the new issuer mismatch error */ public void setIssuerMismatchError(final String issuer) { - this.lastShortSessionValidationResult = + this.lastSessionTokenValidationResult = String.format("Mismatch in issuer (configured: %s, JWT: %s)", this.issuer, issuer); } /** * Gets the and validate user from short session value. * - * @param shortSession the short session + * @param sessionToken the short session * @return the and validate user from short session value * @throws JWTVerificationException the JWT verification exception * @throws JwkException the jwk exception * @throws IncorrectClaimException the incorrect claim exception */ - private SessionValidationResult getAndValidateUserFromShortSessionValue(final String shortSession) + private SessionValidationResult getAndValidateUserFromShortSessionValue(final String sessionToken) throws JWTVerificationException, JwkException, IncorrectClaimException { - if (shortSession == null || shortSession.isEmpty()) { + if (sessionToken == null || sessionToken.isEmpty()) { throw new IllegalArgumentException("Session value cannot be null or empty"); } try { // Get the signing key - DecodedJWT decodedJwt = JWT.decode(shortSession); + DecodedJWT decodedJwt = JWT.decode(sessionToken); final Jwk jwk = this.jwkProvider.get(decodedJwt.getKeyId()); if (jwk == null) { - throw new SigningKeyNotFoundException(shortSession, null); + throw new SigningKeyNotFoundException(sessionToken, null); } final RSAPublicKey publicKey = (RSAPublicKey) jwk.getPublicKey(); // Verify and decode the JWT using the signing key final Algorithm algorithm = Algorithm.RSA256(publicKey); final JWTVerifier verifier = JWT.require(algorithm).withIssuer(this.issuer).build(); - decodedJwt = verifier.verify(shortSession); + decodedJwt = verifier.verify(sessionToken); return SessionValidationResult.builder() .fullName(decodedJwt.getClaim("name").asString()) @@ -168,17 +165,17 @@ private SessionValidationResult getAndValidateUserFromShortSessionValue(final St } /** - * Retrieves userID and full name if 'shortSession' is valid. + * Retrieves userID and full name if 'sessionToken' is valid. * - * @param shortSession the short session + * @param sessionToken the short session * @return the and validate current user * @throws IncorrectClaimException the incorrect claim exception * @throws JWTVerificationException the JWT verification exception * @throws JwkException the jwk exception */ - public SessionValidationResult getAndValidateCurrentUser(final String shortSession) + public SessionValidationResult getAndValidateCurrentUser(final String sessionToken) throws IncorrectClaimException, JWTVerificationException, JwkException { - return getAndValidateUserFromShortSessionValue(shortSession); + return getAndValidateUserFromShortSessionValue(sessionToken); } } diff --git a/src/test/java/com/corbado/unit/SessionServiceTest.java b/src/test/java/com/corbado/unit/SessionServiceTest.java index a97242a..ee4db9c 100644 --- a/src/test/java/com/corbado/unit/SessionServiceTest.java +++ b/src/test/java/com/corbado/unit/SessionServiceTest.java @@ -148,7 +148,7 @@ void test_testGenerateJwt() throws InvalidKeySpecException, NoSuchAlgorithmExcep * * @param issuer the issuer * @param jwksUri the jwks uri - * @param shortSessionCookieName the short session cookie name + * @param sessionTokenCookieName the short session cookie name * @param expectValid the expect valid */ @ParameterizedTest @@ -156,17 +156,17 @@ void test_testGenerateJwt() throws InvalidKeySpecException, NoSuchAlgorithmExcep void testInitParametersValidation( final String issuer, final String jwksUri, - final String shortSessionCookieName, + final String sessionTokenCookieName, final boolean expectValid) { if (expectValid) { // No exception should be raised assertDoesNotThrow( - () -> new SessionService(shortSessionCookieName, issuer, jwksUri, 0, false)); + () -> new SessionService(sessionTokenCookieName, issuer, jwksUri, 0, false)); } else { // ValidationError should be raised assertThrows( IllegalArgumentException.class, - () -> new SessionService(shortSessionCookieName, issuer, jwksUri, 0, false)); + () -> new SessionService(sessionTokenCookieName, issuer, jwksUri, 0, false)); } } From 5a897c4d8843147173051ee84b560ee674251b36 Mon Sep 17 00:00:00 2001 From: Aleksandr Balakirev Date: Sun, 27 Oct 2024 19:25:04 +0100 Subject: [PATCH 05/28] Renamed getAndValidateUserFromShortSessionValue to validateToken, deleted getAndValidateCurrentUser from session service --- .../com/corbado/services/SessionService.java | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/src/main/java/com/corbado/services/SessionService.java b/src/main/java/com/corbado/services/SessionService.java index cfe0569..c765b85 100644 --- a/src/main/java/com/corbado/services/SessionService.java +++ b/src/main/java/com/corbado/services/SessionService.java @@ -121,7 +121,7 @@ public void setIssuerMismatchError(final String issuer) { * @throws JwkException the jwk exception * @throws IncorrectClaimException the incorrect claim exception */ - private SessionValidationResult getAndValidateUserFromShortSessionValue(final String sessionToken) + public SessionValidationResult validateToken(final String sessionToken) throws JWTVerificationException, JwkException, IncorrectClaimException { if (sessionToken == null || sessionToken.isEmpty()) { @@ -163,19 +163,4 @@ private SessionValidationResult getAndValidateUserFromShortSessionValue(final St throw e; } } - - /** - * Retrieves userID and full name if 'sessionToken' is valid. - * - * @param sessionToken the short session - * @return the and validate current user - * @throws IncorrectClaimException the incorrect claim exception - * @throws JWTVerificationException the JWT verification exception - * @throws JwkException the jwk exception - */ - public SessionValidationResult getAndValidateCurrentUser(final String sessionToken) - throws IncorrectClaimException, JWTVerificationException, JwkException { - - return getAndValidateUserFromShortSessionValue(sessionToken); - } } From d95ed11dd846e77555670b98d7d3cbf771e84bbd Mon Sep 17 00:00:00 2001 From: Aleksandr Balakirev Date: Sun, 27 Oct 2024 19:26:34 +0100 Subject: [PATCH 06/28] Apply getAndValidateCurrentUser renaming for tests --- .../com/corbado/unit/SessionServiceTest.java | 47 +++++++++++++++++-- 1 file changed, 44 insertions(+), 3 deletions(-) diff --git a/src/test/java/com/corbado/unit/SessionServiceTest.java b/src/test/java/com/corbado/unit/SessionServiceTest.java index ee4db9c..9c625f1 100644 --- a/src/test/java/com/corbado/unit/SessionServiceTest.java +++ b/src/test/java/com/corbado/unit/SessionServiceTest.java @@ -187,13 +187,17 @@ void test_getCurrentUser(final String jwt, final Class e) throws StandardException, IncorrectClaimException, JWTVerificationException, JwkException { if (e != null) { - assertThrows(e, () -> sessionService.getAndValidateCurrentUser(jwt)); + assertThrows(e, () -> sessionService.validateToken(jwt)); } else { - final SessionValidationResult validationResult = - sessionService.getAndValidateCurrentUser(jwt); + final SessionValidationResult validationResult = sessionService.validateToken(jwt); assertEquals(TEST_NAME, validationResult.getFullName()); assertEquals(TEST_USER_ID, validationResult.getUserID()); } + /** + * Inits the parameters test data. + * + * @return the stream + */ } // ------------------ Test data --------------------- // @@ -213,6 +217,13 @@ static Stream initParametersTestData() { new Object[] {"s", "", "name", false}, // Test empty short_session_cookie_name new Object[] {"s", "2", "", false}); + /** + * Provide jwts. + * + * @return the list + * @throws InvalidKeySpecException the invalid key spec exception + * @throws NoSuchAlgorithmException the no such algorithm exception + */ } /** @@ -275,6 +286,15 @@ static List provideJwts() throws InvalidKeySpecException, NoSuchAlgori }); return testData; + /** + * Read private key. + * + * @param privateKeyPath the private key path + * @return the RSA private key + * @throws IOException Signals that an I/O exception has occurred. + * @throws NoSuchAlgorithmException the no such algorithm exception + * @throws InvalidKeySpecException the invalid key spec exception + */ } // ------------------ Utility functions--------------------- // @@ -302,6 +322,16 @@ private static RSAPrivateKey readPrivateKey(final String privateKeyPath) final KeyFactory keyFactory = KeyFactory.getInstance("RSA"); final PKCS8EncodedKeySpec keySpec = new PKCS8EncodedKeySpec(encoded); return (RSAPrivateKey) keyFactory.generatePrivate(keySpec); + /** + * Generate jwt. + * + * @param iss the iss + * @param exp the exp + * @param nbf the nbf + * @return the string + * @throws InvalidKeySpecException the invalid key spec exception + * @throws NoSuchAlgorithmException the no such algorithm exception + */ } /** @@ -329,6 +359,11 @@ private static String generateJwt(final String iss, final long exp, final long n .withClaim("email", TEST_EMAIL) .withClaim("phone_number", TEST_PHONE_NUMBER) .sign(algorithm); + /** + * Creates the session service. + * + * @return the session service + */ } /** @@ -342,6 +377,12 @@ private static SessionService createSessionService() { "https://example_uri.com", 10, false); // URLs do not matter, url access is mocked + /** + * Read jwks. + * + * @return the json array + * @throws FileNotFoundException the file not found exception + */ } /** From 7892b8a6bf444757f4b160a36e4b3802c0445df1 Mon Sep 17 00:00:00 2001 From: Aleksandr Balakirev Date: Sun, 27 Oct 2024 19:29:37 +0100 Subject: [PATCH 07/28] Bump version for major release --- README.md | 4 ++-- VERSION | 2 +- pom.xml | 2 +- src/main/java/com/corbado/sdk/CorbadoSdk.java | 8 +++----- 4 files changed, 7 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 05e7bc5..858db77 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ You can find the latest SDK version at [central repository](https://repo1.maven. Add this dependency to your project's build file: ```groovy -implementation "com.corbado:corbado-java:1.0.4" +implementation "com.corbado:corbado-java:2.0.0" ``` #### Maven users @@ -38,7 +38,7 @@ Add this dependency to your project's POM: com.corbado corbado-java - 1.0.4 + 2.0.0 ``` diff --git a/VERSION b/VERSION index a6a3a43..359a5b9 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.0.4 \ No newline at end of file +2.0.0 \ No newline at end of file diff --git a/pom.xml b/pom.xml index 07eebb5..fee2afb 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ com.corbado corbado-java jar - 1.0.4 + 2.0.0 Corbado Java Corbado Java SDK https://github.com/corbado/corbado-java diff --git a/src/main/java/com/corbado/sdk/CorbadoSdk.java b/src/main/java/com/corbado/sdk/CorbadoSdk.java index 5fd74ff..38bf841 100644 --- a/src/main/java/com/corbado/sdk/CorbadoSdk.java +++ b/src/main/java/com/corbado/sdk/CorbadoSdk.java @@ -1,8 +1,5 @@ package com.corbado.sdk; -import java.util.HashMap; -import java.util.Map; - import com.corbado.exceptions.StandardException; import com.corbado.generated.api.IdentifiersApi; import com.corbado.generated.api.UsersApi; @@ -12,7 +9,8 @@ import com.corbado.services.UserService; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; - +import java.util.HashMap; +import java.util.Map; import lombok.Getter; import lombok.NonNull; import lombok.extern.slf4j.Slf4j; @@ -104,6 +102,6 @@ private static String getLanguageVersion() { * @return the version */ public String getVersion() { - return "1.0.4"; + return "2.0.0"; } } From 2245aa0c1f19c0f070ba2f1184579743a4311fb7 Mon Sep 17 00:00:00 2001 From: Aleksandr Balakirev Date: Sun, 27 Oct 2024 19:31:12 +0100 Subject: [PATCH 08/28] Refactor SDK version in code to a constant --- src/main/java/com/corbado/sdk/CorbadoSdk.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/corbado/sdk/CorbadoSdk.java b/src/main/java/com/corbado/sdk/CorbadoSdk.java index 38bf841..6426534 100644 --- a/src/main/java/com/corbado/sdk/CorbadoSdk.java +++ b/src/main/java/com/corbado/sdk/CorbadoSdk.java @@ -24,6 +24,8 @@ @Slf4j public class CorbadoSdk { + private static final String CURRENT_SDK_VERSION = "2.0.0"; + /** The Constant CORBADO_HEADER_NAME. */ private static final String CORBADO_HEADER_NAME = "X-Corbado-SDK"; @@ -101,7 +103,7 @@ private static String getLanguageVersion() { * * @return the version */ - public String getVersion() { - return "2.0.0"; + public static String getVersion() { + return CURRENT_SDK_VERSION; } } From f406a5b4a649cd77d3489090653f88fa2186c04d Mon Sep 17 00:00:00 2001 From: Aleksandr Balakirev Date: Sun, 27 Oct 2024 19:58:37 +0100 Subject: [PATCH 09/28] Add TokenValidationException class --- .../enums/exception/ValidationErrorType.java | 44 ++++++++++++ .../exceptions/TokenValidationException.java | 67 +++++++++++++++++++ .../com/corbado/services/SessionService.java | 2 +- 3 files changed, 112 insertions(+), 1 deletion(-) create mode 100644 src/main/java/com/corbado/enums/exception/ValidationErrorType.java create mode 100644 src/main/java/com/corbado/exceptions/TokenValidationException.java diff --git a/src/main/java/com/corbado/enums/exception/ValidationErrorType.java b/src/main/java/com/corbado/enums/exception/ValidationErrorType.java new file mode 100644 index 0000000..fc8230c --- /dev/null +++ b/src/main/java/com/corbado/enums/exception/ValidationErrorType.java @@ -0,0 +1,44 @@ +package com.corbado.enums.exception; + +import com.corbado.exceptions.TokenValidationException; + +/** Enum representing error types for {@link TokenValidationException}. */ +public enum ValidationErrorType { + + /** The invalid token. */ + INVALID_TOKEN("Invalid token"), + + /** The signing key error. */ + SIGNING_KEY_ERROR("Could not retrieve signing key"), + + /** The empty session token. */ + EMPTY_SESSION_TOKEN("Session token is empty"), + + /** The empty issuer. */ + EMPTY_ISSUER("Issuer is empty"), + + /** The issuer missmatch. */ + ISSUER_MISSMATCH("Token issuer does not match"); + + /** The description. */ + private final String description; + + /** + * Instantiates a new validation error type. + * + * @param description the description + */ + ValidationErrorType(final String description) { + this.description = description; + } + + /** + * To string. + * + * @return the string + */ + @Override + public String toString() { + return description; + } +} diff --git a/src/main/java/com/corbado/exceptions/TokenValidationException.java b/src/main/java/com/corbado/exceptions/TokenValidationException.java new file mode 100644 index 0000000..14130af --- /dev/null +++ b/src/main/java/com/corbado/exceptions/TokenValidationException.java @@ -0,0 +1,67 @@ +package com.corbado.exceptions; + +import com.corbado.enums.exception.ValidationErrorType; +import lombok.Getter; + +/** + * TokenValidationException is a custom exception used to indicate issues during token validation. + * This exception is typically thrown when the token's issuer, format, or other key attributes do + * not meet the expected validation criteria. + * + *

This exception wraps a specific {@link ValidationErrorType} enum value to categorize the type + * of validation error encountered, and it provides a descriptive message detailing the reason for + * the exception. Additionally, it can wrap an underlying exception that caused the validation + * failure, allowing for more detailed error tracing. + * + *

Typical usage includes handling invalid token attributes, such as missing or mismatched + * issuers, empty tokens, or other validation failures. + * + *

Example usage: + * + *

{@code
+ * try {
+ *     validateToken(token);
+ * } catch (SomeOtherException e) {
+ *     throw new TokenValidationException(ValidationErrorType.ISSUER_MISMATCH,
+ *         "Issuer mismatch (configured issuer: 'expected.com', JWT issuer: 'actual.com')", e);
+ * }
+ * }
+ * + * @see ValidationErrorType + */ +public class TokenValidationException extends RuntimeException { + + /** The Constant serialVersionUID. */ + @Getter private static final long serialVersionUID = -2978676337061777870L; + + /** The error type. */ + @Getter private final ValidationErrorType errorType; + + /** + * Constructs a new TokenValidationException with a specified error type, a detailed message, and + * an optional original exception that caused this validation failure. + * + * @param errorType the type of validation error encountered, represented by {@link + * ValidationErrorType} + * @param message a descriptive message providing additional context for the validation error + * @param cause the original exception that caused this validation failure, if any + */ + public TokenValidationException( + final ValidationErrorType errorType, final String message, final Throwable cause) { + super(message, cause); + this.errorType = errorType; + } + + /** + * Constructs a new TokenValidationException with a specified error type and detailed message, + * without an underlying cause. + * + * @param errorType the type of validation error encountered, represented by {@link + * ValidationErrorType} + * @param message a descriptive message providing additional context for the validation error + */ + public TokenValidationException(final ValidationErrorType errorType, final String message) { + super(message); + this.errorType = errorType; + } +} diff --git a/src/main/java/com/corbado/services/SessionService.java b/src/main/java/com/corbado/services/SessionService.java index c765b85..7ca6a6b 100644 --- a/src/main/java/com/corbado/services/SessionService.java +++ b/src/main/java/com/corbado/services/SessionService.java @@ -138,7 +138,7 @@ public SessionValidationResult validateToken(final String sessionToken) // Verify and decode the JWT using the signing key final Algorithm algorithm = Algorithm.RSA256(publicKey); - final JWTVerifier verifier = JWT.require(algorithm).withIssuer(this.issuer).build(); + final JWTVerifier verifier = JWT.require(algorithm).build(); decodedJwt = verifier.verify(sessionToken); return SessionValidationResult.builder() From eb5e6078abc9f4b9712198f962428b3c6e8db597 Mon Sep 17 00:00:00 2001 From: Aleksandr Balakirev Date: Mon, 28 Oct 2024 03:20:16 +0100 Subject: [PATCH 10/28] Adapt Session Service to reference implementation --- .../entities/SessionValidationResult.java | 29 --- .../enums/exception/ValidationErrorType.java | 13 +- .../com/corbado/services/SessionService.java | 125 +++++++++---- .../com/corbado/unit/SessionServiceTest.java | 171 +++++++++++++----- .../com/corbado/unit/data/invalidRsaKey.pem | 29 +++ 5 files changed, 259 insertions(+), 108 deletions(-) delete mode 100644 src/main/java/com/corbado/entities/SessionValidationResult.java create mode 100644 src/test/java/com/corbado/unit/data/invalidRsaKey.pem diff --git a/src/main/java/com/corbado/entities/SessionValidationResult.java b/src/main/java/com/corbado/entities/SessionValidationResult.java deleted file mode 100644 index 52e8731..0000000 --- a/src/main/java/com/corbado/entities/SessionValidationResult.java +++ /dev/null @@ -1,29 +0,0 @@ -package com.corbado.entities; - -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Getter; -import lombok.NoArgsConstructor; -import lombok.Setter; - -/** Result class for SessionService validation. */ -@Getter -@Setter -@NoArgsConstructor -@AllArgsConstructor - -/** - * The Class SessionValidationResultBuilder. - */ -@Builder -public class SessionValidationResult { - - /** The user ID. */ - private String userID; - - /** The full name. */ - private String fullName; - - /** The error. */ - private Exception error; -} diff --git a/src/main/java/com/corbado/enums/exception/ValidationErrorType.java b/src/main/java/com/corbado/enums/exception/ValidationErrorType.java index fc8230c..3486832 100644 --- a/src/main/java/com/corbado/enums/exception/ValidationErrorType.java +++ b/src/main/java/com/corbado/enums/exception/ValidationErrorType.java @@ -8,15 +8,20 @@ public enum ValidationErrorType { /** The invalid token. */ INVALID_TOKEN("Invalid token"), - /** The signing key error. */ - SIGNING_KEY_ERROR("Could not retrieve signing key"), - /** The empty session token. */ EMPTY_SESSION_TOKEN("Session token is empty"), /** The empty issuer. */ EMPTY_ISSUER("Issuer is empty"), + JWT_BEFORE("Token is not valid yet"), + + JWT_EXPIRED("Token is expired"), + + INVALID_PUBLIC_KEY("Public key is invalid"), + + JWT_INVALID_SIGNATURE("Token signature is invalid"), + /** The issuer missmatch. */ ISSUER_MISSMATCH("Token issuer does not match"); @@ -39,6 +44,6 @@ public enum ValidationErrorType { */ @Override public String toString() { - return description; + return this.description; } } diff --git a/src/main/java/com/corbado/services/SessionService.java b/src/main/java/com/corbado/services/SessionService.java index 7ca6a6b..9f3a2a3 100644 --- a/src/main/java/com/corbado/services/SessionService.java +++ b/src/main/java/com/corbado/services/SessionService.java @@ -1,5 +1,13 @@ package com.corbado.services; +import java.net.MalformedURLException; +import java.net.URL; +import java.security.interfaces.RSAPublicKey; +import java.util.concurrent.TimeUnit; + +import org.apache.commons.lang3.StringUtils; + +import com.auth0.jwk.InvalidPublicKeyException; import com.auth0.jwk.Jwk; import com.auth0.jwk.JwkException; import com.auth0.jwk.JwkProvider; @@ -10,15 +18,15 @@ import com.auth0.jwt.algorithms.Algorithm; import com.auth0.jwt.exceptions.IncorrectClaimException; import com.auth0.jwt.exceptions.JWTVerificationException; +import com.auth0.jwt.exceptions.SignatureVerificationException; +import com.auth0.jwt.exceptions.TokenExpiredException; import com.auth0.jwt.interfaces.DecodedJWT; -import com.corbado.entities.SessionValidationResult; +import com.corbado.entities.UserEntity; +import com.corbado.enums.exception.ValidationErrorType; +import com.corbado.exceptions.TokenValidationException; import com.corbado.sdk.Config; import com.corbado.utils.ValidationUtils; -import java.net.MalformedURLException; -import java.net.URL; -import java.security.interfaces.RSAPublicKey; -import java.util.concurrent.TimeUnit; -import org.apache.commons.lang3.StringUtils; + import lombok.Getter; import lombok.NonNull; import lombok.Setter; @@ -52,13 +60,15 @@ public class SessionService { /** The jwk provider. */ private JwkProvider jwkProvider; + private final String projectId; + /** * Instantiates a new session service. * * @param sessionTokenCookieName the short session cookie name * @param issuer the issuer * @param jwksUri the jwks uri - * @param sessionTokenLength the short session length + * @param sessionTokenLength the short session length. Defaults to 300. * @param cacheKeys the cache keys */ public SessionService( @@ -66,14 +76,16 @@ public SessionService( final String issuer, final String jwksUri, Integer sessionTokenLength, - final boolean cacheKeys) { + final boolean cacheKeys, + final String projectId) { - ValidationUtils.validateNotEmpty(sessionTokenCookieName, issuer, jwksUri); + ValidationUtils.validateNotEmpty(sessionTokenCookieName, issuer, jwksUri, projectId); sessionTokenLength = (sessionTokenLength != null) ? sessionTokenLength : DEFAULT_SESSION_LENGTH; this.sessionTokenCookieName = sessionTokenCookieName; this.issuer = issuer; this.jwksUri = jwksUri; + this.projectId = projectId; JwkProviderBuilder jwkProviderBuilder; try { @@ -99,7 +111,8 @@ public SessionService(@NonNull final Config config) { config.getIssuer(), config.getFrontendApi() + "/.well-known/jwks", config.getSessionTokenLength(), - config.isCacheKeys()); + config.isCacheKeys(), + config.getProjectId()); } /** @@ -116,20 +129,21 @@ public void setIssuerMismatchError(final String issuer) { * Gets the and validate user from short session value. * * @param sessionToken the short session - * @return the and validate user from short session value + * @return User entity from short session value * @throws JWTVerificationException the JWT verification exception * @throws JwkException the jwk exception * @throws IncorrectClaimException the incorrect claim exception */ - public SessionValidationResult validateToken(final String sessionToken) - throws JWTVerificationException, JwkException, IncorrectClaimException { + public UserEntity validateToken(final String sessionToken) throws TokenValidationException { if (sessionToken == null || sessionToken.isEmpty()) { - throw new IllegalArgumentException("Session value cannot be null or empty"); + throw new TokenValidationException( + ValidationErrorType.EMPTY_SESSION_TOKEN, "Session token is empty"); } + DecodedJWT decodedJwt = null; try { // Get the signing key - DecodedJWT decodedJwt = JWT.decode(sessionToken); + decodedJwt = JWT.decode(sessionToken); final Jwk jwk = this.jwkProvider.get(decodedJwt.getKeyId()); if (jwk == null) { throw new SigningKeyNotFoundException(sessionToken, null); @@ -140,27 +154,70 @@ public SessionValidationResult validateToken(final String sessionToken) final Algorithm algorithm = Algorithm.RSA256(publicKey); final JWTVerifier verifier = JWT.require(algorithm).build(); decodedJwt = verifier.verify(sessionToken); - - return SessionValidationResult.builder() - .fullName(decodedJwt.getClaim("name").asString()) - .userID(decodedJwt.getClaim("sub").asString()) - .build(); - - } catch (final IncorrectClaimException e) { - // Be careful of the case where issuer does not match. You have probably forgotten to set - // the cname in config class. We add an additional message to the exception and retrow it to - // underline its importance. - if (StringUtils.equals(e.getClaimName(), "iss")) { - final String message = - e.getMessage() - + "Be careful of the case where issuer does not match. " - + "You have probably forgotten to set the cname in config class."; - throw new IncorrectClaimException(message, e.getClaimName(), e.getClaimValue()); + } catch (final InvalidPublicKeyException e) { + throw new TokenValidationException(ValidationErrorType.INVALID_PUBLIC_KEY, e.getMessage(), e); + } catch (final TokenExpiredException e) { + throw new TokenValidationException(ValidationErrorType.JWT_EXPIRED, e.getMessage(), e); + + } catch (final SignatureVerificationException e) { + throw new TokenValidationException( + ValidationErrorType.JWT_INVALID_SIGNATURE, e.getMessage(), e); + + } catch (final JWTVerificationException e) { + ValidationErrorType errorType = null; + if (StringUtils.startsWith(e.getMessage(), "The Token can't be used before")) { + errorType = ValidationErrorType.JWT_BEFORE; + } else { + errorType = ValidationErrorType.INVALID_TOKEN; } - throw e; + throw new TokenValidationException( + errorType, + "JWTVerificationException exception during token validation: " + + sessionToken + + ". Detailed message: " + + e.getMessage(), + e); + } catch (final Exception e) { + throw new TokenValidationException( + ValidationErrorType.INVALID_TOKEN, + "Unexpected exception during token validation: " + sessionToken, + e); + } + validateIssuer(decodedJwt.getClaim("iss").asString(), this.projectId); + return new UserEntity( + // TODO: add UserStatus + decodedJwt.getClaim("sub").asString(), null, decodedJwt.getClaim("name").asString(), null); + } + + private void validateIssuer(String tokenIssuer, String sessionToken) + throws TokenValidationException { + // Check if issuer is empty + if (tokenIssuer == null || StringUtils.isBlank(tokenIssuer)) { + throw new TokenValidationException( + ValidationErrorType.EMPTY_ISSUER, "Issuer is empty. Session token: " + sessionToken); + } + + // Check for old Frontend API (without .cloud.) + final String expectedOld = "https://" + this.projectId + ".frontendapi.corbado.io"; + if (tokenIssuer.equals(expectedOld)) { + return; + } + + // Check for new Frontend API (with .cloud.) + final String expectedNew = "https://" + this.projectId + ".frontendapi.cloud.corbado.io"; + if (tokenIssuer.equals(expectedNew)) { + return; + } - } catch (final JwkException | JWTVerificationException e) { - throw e; + // Check against the configured issuer (e.g., a custom domain or CNAME) + if (!tokenIssuer.equals(this.issuer)) { + throw new TokenValidationException( + ValidationErrorType.ISSUER_MISSMATCH, + "Issuer mismatch (configured via FrontendAPI: '" + + this.issuer + + "', JWT issuer: '" + + tokenIssuer + + "')"); } } } diff --git a/src/test/java/com/corbado/unit/SessionServiceTest.java b/src/test/java/com/corbado/unit/SessionServiceTest.java index 9c625f1..c1ba956 100644 --- a/src/test/java/com/corbado/unit/SessionServiceTest.java +++ b/src/test/java/com/corbado/unit/SessionServiceTest.java @@ -5,23 +5,7 @@ import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertThrows; import static org.mockito.ArgumentMatchers.anyString; -import com.auth0.jwk.Jwk; -import com.auth0.jwk.JwkException; -import com.auth0.jwk.JwkProvider; -import com.auth0.jwk.SigningKeyNotFoundException; -import com.auth0.jwt.JWT; -import com.auth0.jwt.algorithms.Algorithm; -import com.auth0.jwt.exceptions.IncorrectClaimException; -import com.auth0.jwt.exceptions.JWTDecodeException; -import com.auth0.jwt.exceptions.JWTVerificationException; -import com.auth0.jwt.exceptions.TokenExpiredException; -import com.corbado.entities.SessionValidationResult; -import com.corbado.exceptions.StandardException; -import com.corbado.services.SessionService; -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonObject; -import com.google.gson.JsonSyntaxException; + import java.io.FileNotFoundException; import java.io.FileReader; import java.io.IOException; @@ -40,6 +24,7 @@ import java.util.List; import java.util.Map; import java.util.stream.Stream; + import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; @@ -51,13 +36,35 @@ import org.mockito.Mockito; import org.mockito.junit.jupiter.MockitoExtension; +import com.auth0.jwk.Jwk; +import com.auth0.jwk.JwkException; +import com.auth0.jwk.JwkProvider; +import com.auth0.jwt.JWT; +import com.auth0.jwt.algorithms.Algorithm; +import com.auth0.jwt.exceptions.IncorrectClaimException; +import com.auth0.jwt.exceptions.JWTVerificationException; +import com.corbado.entities.UserEntity; +import com.corbado.enums.exception.ValidationErrorType; +import com.corbado.exceptions.StandardException; +import com.corbado.exceptions.TokenValidationException; +import com.corbado.services.SessionService; +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonObject; +import com.google.gson.JsonSyntaxException; + /** Unit Test for session service. */ @ExtendWith(MockitoExtension.class) public class SessionServiceTest { + private static final String TEST_PROJECT_ID = "pro-55"; + /** The Constant PRIVATE_KEY_PATH. */ private static final String PRIVATE_KEY_PATH = "src/test/java/com/corbado/unit/data/rsakey.pem"; + private static final String INVALID_PRIVATE_KEY_PATH = + "src/test/java/com/corbado/unit/data/invalidRsakey.pem"; + /** The Constant JWKS_PATH. */ private static final String JWKS_PATH = "src/test/java/com/corbado/unit/data/jwks.json"; @@ -85,6 +92,8 @@ public class SessionServiceTest { /** The private key. */ private static RSAPrivateKey privateKey; + private static RSAPrivateKey invalidPrivateKey; + // ------------------ Set up --------------------- // /** @@ -101,6 +110,7 @@ public static void setUpClass() sessionService = createSessionService(); jwks = readJwks(); privateKey = readPrivateKey(PRIVATE_KEY_PATH); + invalidPrivateKey = readPrivateKey(INVALID_PRIVATE_KEY_PATH); } /** @@ -140,7 +150,7 @@ void test_testDataIsPresent() throws InvalidKeySpecException, NoSuchAlgorithmExc */ @Test void test_testGenerateJwt() throws InvalidKeySpecException, NoSuchAlgorithmException { - assertNotNull(generateJwt("1", 3, 4)); + assertNotNull(generateJwt("1", 3, 4, privateKey)); } /** @@ -161,12 +171,16 @@ void testInitParametersValidation( if (expectValid) { // No exception should be raised assertDoesNotThrow( - () -> new SessionService(sessionTokenCookieName, issuer, jwksUri, 0, false)); + () -> + new SessionService( + sessionTokenCookieName, issuer, jwksUri, 0, false, TEST_PROJECT_ID)); } else { // ValidationError should be raised assertThrows( IllegalArgumentException.class, - () -> new SessionService(sessionTokenCookieName, issuer, jwksUri, 0, false)); + () -> + new SessionService( + sessionTokenCookieName, issuer, jwksUri, 0, false, TEST_PROJECT_ID)); } } @@ -183,13 +197,20 @@ void testInitParametersValidation( */ @ParameterizedTest @MethodSource("provideJwts") - void test_getCurrentUser(final String jwt, final Class e) - throws StandardException, IncorrectClaimException, JWTVerificationException, JwkException { - - if (e != null) { - assertThrows(e, () -> sessionService.validateToken(jwt)); + // In all tests SessionService is configured with frontendAPI=https://auth.acme.com + void test_getCurrentUser( + final String jwt, + final Class expectedException, + ValidationErrorType expectedValidationErrorType) { + + if (expectedException != null) { + final TokenValidationException exception = + assertThrows(expectedException, () -> sessionService.validateToken(jwt)); + if (expectedValidationErrorType != null || exception.getErrorType() != null) { + assertEquals(expectedValidationErrorType, exception.getErrorType()); + } } else { - final SessionValidationResult validationResult = sessionService.validateToken(jwt); + final UserEntity validationResult = sessionService.validateToken(jwt); assertEquals(TEST_NAME, validationResult.getFullName()); assertEquals(TEST_USER_ID, validationResult.getUserID()); } @@ -236,23 +257,28 @@ static Stream initParametersTestData() { static List provideJwts() throws InvalidKeySpecException, NoSuchAlgorithmException { final List testData = new ArrayList<>(); - // JWT with invalid format - testData.add(new Object[] {"invalid", JWTDecodeException.class}); - // JWT signed with wrong algorithm (HS256 instead of RS256) final String jwtWithWrongAlgorithm = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6Ik" + "pvaG4gRG9lIiwiYWRtaW4iOnRydWV9.dyt0CoTl4WoVjAHI9Q_CwSKhl6d_9rhM3NrXuJttkao"; - testData.add(new Object[] {jwtWithWrongAlgorithm, SigningKeyNotFoundException.class}); + testData.add( + new Object[] { + jwtWithWrongAlgorithm, TokenValidationException.class, ValidationErrorType.INVALID_TOKEN + }); + // Empty JWT + testData.add( + new Object[] {"", TokenValidationException.class, ValidationErrorType.EMPTY_SESSION_TOKEN}); // Not before (nbf) in future testData.add( new Object[] { generateJwt( "https://auth.acme.com", System.currentTimeMillis() / 1000 + 100, - System.currentTimeMillis() / 1000 + 100), - IncorrectClaimException.class + System.currentTimeMillis() / 1000 + 100, + privateKey), + TokenValidationException.class, + ValidationErrorType.JWT_BEFORE }); // Expired (exp) @@ -261,8 +287,10 @@ static List provideJwts() throws InvalidKeySpecException, NoSuchAlgori generateJwt( "https://auth.acme.com", System.currentTimeMillis() / 1000 - 100, - System.currentTimeMillis() / 1000 - 100), - TokenExpiredException.class + System.currentTimeMillis() / 1000 - 100, + privateKey), + TokenValidationException.class, + ValidationErrorType.JWT_EXPIRED }); // Invalid issuer (iss) @@ -271,19 +299,78 @@ static List provideJwts() throws InvalidKeySpecException, NoSuchAlgori generateJwt( "https://invalid.com", System.currentTimeMillis() / 1000 + 100, - System.currentTimeMillis() / 1000 - 100), - IncorrectClaimException.class + System.currentTimeMillis() / 1000 - 100, + privateKey), + TokenValidationException.class, + ValidationErrorType.ISSUER_MISSMATCH }); - - // Success + // Wrong private key testData.add( new Object[] { generateJwt( "https://auth.acme.com", System.currentTimeMillis() / 1000 + 100, - System.currentTimeMillis() / 1000 - 100), + System.currentTimeMillis() / 1000 - 100, + invalidPrivateKey), + TokenValidationException.class, + ValidationErrorType.JWT_INVALID_SIGNATURE + }); + // Success with cname + testData.add( + new Object[] { + generateJwt( + "https://auth.acme.com", + System.currentTimeMillis() / 1000 + 100, + System.currentTimeMillis() / 1000 - 100, + privateKey), + null, + ValidationErrorType.JWT_INVALID_SIGNATURE + }); + // Empty issuer + testData.add( + new Object[] { + generateJwt( + "", + System.currentTimeMillis() / 1000 + 100, + System.currentTimeMillis() / 1000 - 100, + privateKey), + TokenValidationException.class, + ValidationErrorType.EMPTY_ISSUER + }); + // "Success with new Frontend API URL in JWT", + testData.add( + new Object[] { + generateJwt( + "https://" + TEST_PROJECT_ID + ".frontendapi.cloud.corbado.io", + System.currentTimeMillis() / 1000 + 100, + System.currentTimeMillis() / 1000 - 100, + privateKey), + null, null }); + // "Success with old Frontend API URL in JWT", + testData.add( + new Object[] { + generateJwt( + "https://" + TEST_PROJECT_ID + ".frontendapi.corbado.io", + System.currentTimeMillis() / 1000 + 100, + System.currentTimeMillis() / 1000 - 100, + privateKey), + null, + null + }); + + // "Wrong project id", + testData.add( + new Object[] { + generateJwt( + "https://" + "pro-1" + ".frontendapi.corbado.io", + System.currentTimeMillis() / 1000 + 100, + System.currentTimeMillis() / 1000 - 100, + privateKey), + TokenValidationException.class, + ValidationErrorType.ISSUER_MISSMATCH + }); return testData; /** @@ -344,7 +431,8 @@ private static RSAPrivateKey readPrivateKey(final String privateKeyPath) * @throws InvalidKeySpecException the invalid key spec exception * @throws NoSuchAlgorithmException the no such algorithm exception */ - private static String generateJwt(final String iss, final long exp, final long nbf) + private static String generateJwt( + final String iss, final long exp, final long nbf, RSAPrivateKey privateKey) throws InvalidKeySpecException, NoSuchAlgorithmException { final Algorithm algorithm = Algorithm.RSA256(privateKey); @@ -376,7 +464,8 @@ private static SessionService createSessionService() { "https://auth.acme.com", "https://example_uri.com", 10, - false); // URLs do not matter, url access is mocked + false, + TEST_PROJECT_ID); // URLs do not matter, url access is mocked /** * Read jwks. * diff --git a/src/test/java/com/corbado/unit/data/invalidRsaKey.pem b/src/test/java/com/corbado/unit/data/invalidRsaKey.pem new file mode 100644 index 0000000..82985fa --- /dev/null +++ b/src/test/java/com/corbado/unit/data/invalidRsaKey.pem @@ -0,0 +1,29 @@ +-----BEGIN PRIVATE KEY----- +MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDLz6W6oWFh92+W +Sv59SZGx6M7vqjToarfMLR328mCgmZCkijiBf5h63LuT+YQMzGZQylamK199cU6r +HE/gtGxuroenICY9HyxLwrEqiycBJXO1ndD5cZMy7d9iQn5ibQiC7wIcnoFwAqYA +j71mW0QnAWOCXXrGVPZOn5lPBg/+Gv/jG9eOhKHptxPNVeznxe5p7RIJWGlKszyo +co71WgVrzi9CQXWFdy5WKUgq81Dn6B3Id5vfJE/zDaa64eMS69HumMWuOqK7UXXd +zidUz0IfJ/FqfSrQL+6N3x0RHm00VHHCV5qnszhoVo982y3lddihJfQ2/APL2qf7 +679eRbWLAgMBAAECggEAX4wlYe0uPkNF6OuXixzmVMWT3f+pdhwxtmKgXZkbe68C +hGDYRL2Qumio96JOKcHZZZ62KIjE54YrH0TSncF35BumNM95ncXzekD31b4Otxbb +vBUUVxzLqWCjDOmnXnVHPDrYfppAjEZxlGnOnSHEPZUFFaTFXh2OqyVfNhDdhn5D +OWSVXFRutOXf6vMjFJzxXde/clMDS0FgzcVYW7ojPTsSJK65q279wbtXNrCie0Ws +s78hmx9PUx2VHfUVvA2VZhVJbjmhS/ThUgT7asjUXGp1Rg1zz6Q98MOU3Vcn4hoa +JZGV7Zi+FQTGN7/mJRQwv2+RR4hsAxwyP9wPJ2gyIQKBgQDVoUUFfdBEnW9q3/vN +qSyfOb7GnmfO+ZgfODWoL4BHW+/I74a8m04hWEv+shhvBL4jtxCto9UQS5WBAybP +NOb2/jqm8WGqWu1n2k3pNX4K0d/mEXh/KNoc+KbaSv1ze5KPWXpPzUably8WdPNB +u1gSmDLFW6UboOGDG7cRRQMSdwKBgQD0O9duTdCirYdx3Fy0bVv3rSfAWhaVmTlp +GjKm1sLJkNUsO5eB3ts3tqGWPsOK1TKkgCfcYcN604XPbsng1MJaDvmA/uFOc7yh +79naNDZkr4MFxwxBBmwizBmVp8ycDoeXBa34K7mJ3xhhkBqZoj90NyQrsrJ/r3RI +iZCCebhGjQKBgQC5BQt6ThTq2E9/CK5U2IhE/wYzj03o/FK79zrBhyJaq01pgcn3 +36ozRv3KgQSYYksrM4nGWXZWvp+lNM2P+AlxMY4quDQWDto+b9u6dxHK3SpFYCw0 +NXVyUghwVzJbqlKsxJoiM29LogyuLmvgKhmFQTv3of/FhfjKTF6pHlQi0QKBgQDg +fWy8T7w4+0XnC4UOtwJ0uu0x6dyebzOM/u6V2gs7GOxIdxIA5qYbJLyMDG7SWrrs +53s8H4R9jpWNIClhhk6KVv9RaXYRFWLKeluFLL7ed1D4a4hA8LVOmsndfFofC1/o +GelZll85ch3H95vroW2v1ctieyOFJ/G7hu6Ub2tJNQKBgHnZgHq3QylHTZHkokeP +58HEE80ZEqqMEaMsVlkKw8e9Z7/BklTOFRdBWQFjRDTiLOnI0VXRD2M170VFP+7J +Jdqz5P2EUeO4dxG/EyXLmA/ef3xQG1Kf7U6nbBSMAfRlnp4lt+wBLPXpiRGXM5u5 +KGtqwJa1GYP/6zTAET5UPVEE +-----END PRIVATE KEY----- + From b59e1c477bee4111b91bc2d7c700058a081cf76d Mon Sep 17 00:00:00 2001 From: Aleksandr Balakirev Date: Sun, 3 Nov 2024 21:34:44 +0100 Subject: [PATCH 11/28] Remove example .env from sdk --- .env.example | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 .env.example diff --git a/.env.example b/.env.example deleted file mode 100644 index 1f77004..0000000 --- a/.env.example +++ /dev/null @@ -1,5 +0,0 @@ -CORBADO_API_SECRET=corbado1_xxx -CORBADO_PROJECT_ID=pro-xxx -CORBADO_BACKEND_API= -CORBADO_FRONTEND_API= - From 15c36aa3265f98748cde88e1cc15c2cfa2e68436 Mon Sep 17 00:00:00 2001 From: Aleksandr Balakirev Date: Sun, 3 Nov 2024 22:06:23 +0100 Subject: [PATCH 12/28] Removed sessionTokenCookieName, reorder Mandatory fields in config --- .github/workflows/ci.yml | 4 +-- src/main/java/com/corbado/sdk/Config.java | 36 +++++++++---------- .../com/corbado/services/SessionService.java | 9 +---- .../com/corbado/unit/SessionServiceTest.java | 24 ++++--------- 4 files changed, 26 insertions(+), 47 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cd52cbe..d1ad747 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -98,10 +98,10 @@ jobs: - name: Run test suite env: - CORBADO_API_SECRET: ${{ secrets.CORBADO_API_SECRET }} CORBADO_PROJECT_ID: ${{ secrets.CORBADO_PROJECT_ID }} - CORBADO_BACKEND_API: ${{ vars.CORBADO_BACKEND_API }} + CORBADO_API_SECRET: ${{ secrets.CORBADO_API_SECRET }} CORBADO_FRONTEND_API: ${{ vars.CORBADO_FRONTEND_API }} + CORBADO_BACKEND_API: ${{ vars.CORBADO_BACKEND_API }} run: mvn --batch-mode --update-snapshots verify -DskipInstall deploy: diff --git a/src/main/java/com/corbado/sdk/Config.java b/src/main/java/com/corbado/sdk/Config.java index 055f682..2786e96 100644 --- a/src/main/java/com/corbado/sdk/Config.java +++ b/src/main/java/com/corbado/sdk/Config.java @@ -2,7 +2,9 @@ import java.net.MalformedURLException; import java.net.URL; + import org.apache.commons.lang3.StringUtils; + import lombok.Builder; import lombok.Getter; import lombok.NonNull; @@ -23,8 +25,7 @@ public class Config { /** The Constant HTTPS prefix. */ private static final String HTTPS = "https://"; - // Fields - + // ---------- Constants ---------- /** The Constant API_VERSION. */ private static final String API_VERSION = "2"; @@ -34,24 +35,25 @@ public class Config { /** Project Id must begin with this prefix. */ private static final String PROJECT_ID_PREFIX = "pro-"; + // ---------- Mandatory fields ---------- + /** The project id with custom setter. Must be provided. */ @NonNull @Getter private String projectId; /** The api secret with custom setter. Must be provided. */ @NonNull @Getter private String apiSecret; + /** The frontend api with custom setter. */ + @Getter private String frontendApi; + /** The backend api with custom setter. */ @Getter private String backendApi; - /** The session token cookie name. Default value: "cbo_session_token." */ - @Getter @Setter @Builder.Default private String sessionTokenCookieName = "cbo_session_token"; + // ---------- Non-mandatory fields ---------- /** The issuer. Used for session verification. */ @Getter @Setter private String issuer; - /** The frontend api with custom setter. */ - @Getter private String frontendApi; - /** The life duration for session service token. Default = 300. */ @Getter @Setter @Builder.Default private Integer sessionTokenLength = 300; @@ -134,28 +136,24 @@ public void setProjectId(@NonNull String projectId) { * @param projectId the project id * @param apiSecret the api secret * @param backendApi the backend api - * @param sessionTokenCookieName the short session cookie name - * @param issuer the issuer * @param frontendApi the frontend api + * @param issuer the issuer * @param sessionTokenLength the short session length * @param cacheKeys the cache keys * @param cname the cname */ public Config( - @NonNull final String projectId, - @NonNull final String apiSecret, - @NonNull final String backendApi, - final String sessionTokenCookieName, - final String issuer, - @NonNull final String frontendApi, - final Integer sessionTokenLength, - final boolean cacheKeys, + @NonNull String projectId, + @NonNull String apiSecret, + String frontendApi, + String backendApi, + String issuer, + Integer sessionTokenLength, + boolean cacheKeys, String cname) { - setProjectId(projectId); setApiSecret(apiSecret); setBackendApi(backendApi); - setSessionTokenCookieName(sessionTokenCookieName); setFrontendApi(frontendApi); setSessionTokenLength(sessionTokenLength); diff --git a/src/main/java/com/corbado/services/SessionService.java b/src/main/java/com/corbado/services/SessionService.java index 9f3a2a3..368d425 100644 --- a/src/main/java/com/corbado/services/SessionService.java +++ b/src/main/java/com/corbado/services/SessionService.java @@ -45,9 +45,6 @@ public class SessionService { /** The Constant DEFAULT_SESSION_LENGTH. */ private static final int DEFAULT_SESSION_LENGTH = 300; - /** The session token cookie name. */ - private String sessionTokenCookieName; - /** The issuer. */ private String issuer; @@ -65,24 +62,21 @@ public class SessionService { /** * Instantiates a new session service. * - * @param sessionTokenCookieName the short session cookie name * @param issuer the issuer * @param jwksUri the jwks uri * @param sessionTokenLength the short session length. Defaults to 300. * @param cacheKeys the cache keys */ public SessionService( - final String sessionTokenCookieName, final String issuer, final String jwksUri, Integer sessionTokenLength, final boolean cacheKeys, final String projectId) { - ValidationUtils.validateNotEmpty(sessionTokenCookieName, issuer, jwksUri, projectId); + ValidationUtils.validateNotEmpty(issuer, jwksUri, projectId); sessionTokenLength = (sessionTokenLength != null) ? sessionTokenLength : DEFAULT_SESSION_LENGTH; - this.sessionTokenCookieName = sessionTokenCookieName; this.issuer = issuer; this.jwksUri = jwksUri; this.projectId = projectId; @@ -107,7 +101,6 @@ public SessionService( */ public SessionService(@NonNull final Config config) { this( - config.getSessionTokenCookieName(), config.getIssuer(), config.getFrontendApi() + "/.well-known/jwks", config.getSessionTokenLength(), diff --git a/src/test/java/com/corbado/unit/SessionServiceTest.java b/src/test/java/com/corbado/unit/SessionServiceTest.java index c1ba956..a2c3ab8 100644 --- a/src/test/java/com/corbado/unit/SessionServiceTest.java +++ b/src/test/java/com/corbado/unit/SessionServiceTest.java @@ -158,29 +158,20 @@ void test_testGenerateJwt() throws InvalidKeySpecException, NoSuchAlgorithmExcep * * @param issuer the issuer * @param jwksUri the jwks uri - * @param sessionTokenCookieName the short session cookie name * @param expectValid the expect valid */ @ParameterizedTest @MethodSource("initParametersTestData") void testInitParametersValidation( - final String issuer, - final String jwksUri, - final String sessionTokenCookieName, - final boolean expectValid) { + final String issuer, final String jwksUri, final boolean expectValid) { if (expectValid) { // No exception should be raised - assertDoesNotThrow( - () -> - new SessionService( - sessionTokenCookieName, issuer, jwksUri, 0, false, TEST_PROJECT_ID)); + assertDoesNotThrow(() -> new SessionService(issuer, jwksUri, 0, false, TEST_PROJECT_ID)); } else { // ValidationError should be raised assertThrows( IllegalArgumentException.class, - () -> - new SessionService( - sessionTokenCookieName, issuer, jwksUri, 0, false, TEST_PROJECT_ID)); + () -> new SessionService(issuer, jwksUri, 0, false, TEST_PROJECT_ID)); } } @@ -231,13 +222,11 @@ void test_getCurrentUser( static Stream initParametersTestData() { return Stream.of( // Valid session service - new Object[] {"s", "2", "name", true}, + new Object[] {"s", "2", true}, // Test empty issuer - new Object[] {"", "2", "name", false}, + new Object[] {"", "2", false}, // Test empty jwks_uri - new Object[] {"s", "", "name", false}, - // Test empty short_session_cookie_name - new Object[] {"s", "2", "", false}); + new Object[] {"s", "", false}); /** * Provide jwts. * @@ -460,7 +449,6 @@ private static String generateJwt( */ private static SessionService createSessionService() { return new SessionService( - "cbo_session_token", "https://auth.acme.com", "https://example_uri.com", 10, From afad0f7786044546ae9e9005176d8cd0d94cf62c Mon Sep 17 00:00:00 2001 From: Aleksandr Balakirev Date: Sun, 3 Nov 2024 22:09:32 +0100 Subject: [PATCH 13/28] Rename error codes for ValidationErrorType --- .../enums/exception/ValidationErrorType.java | 16 ++++++++-------- .../com/corbado/services/SessionService.java | 18 +++++++++--------- .../com/corbado/unit/SessionServiceTest.java | 18 +++++++++--------- 3 files changed, 26 insertions(+), 26 deletions(-) diff --git a/src/main/java/com/corbado/enums/exception/ValidationErrorType.java b/src/main/java/com/corbado/enums/exception/ValidationErrorType.java index 3486832..e4b581f 100644 --- a/src/main/java/com/corbado/enums/exception/ValidationErrorType.java +++ b/src/main/java/com/corbado/enums/exception/ValidationErrorType.java @@ -6,24 +6,24 @@ public enum ValidationErrorType { /** The invalid token. */ - INVALID_TOKEN("Invalid token"), + CODE_INVALID_TOKEN("Invalid token"), /** The empty session token. */ - EMPTY_SESSION_TOKEN("Session token is empty"), + CODE_EMPTY_SESSION_TOKEN("Session token is empty"), /** The empty issuer. */ - EMPTY_ISSUER("Issuer is empty"), + CODE_EMPTY_ISSUER("Issuer is empty"), - JWT_BEFORE("Token is not valid yet"), + CODE_JWT_BEFORE("Token is not valid yet"), - JWT_EXPIRED("Token is expired"), + CODE_JWT_EXPIRED("Token is expired"), - INVALID_PUBLIC_KEY("Public key is invalid"), + CODE_INVALID_PUBLIC_KEY("Public key is invalid"), - JWT_INVALID_SIGNATURE("Token signature is invalid"), + CODE_JWT_INVALID_SIGNATURE("Token signature is invalid"), /** The issuer missmatch. */ - ISSUER_MISSMATCH("Token issuer does not match"); + CODE_ISSUER_MISSMATCH("Token issuer does not match"); /** The description. */ private final String description; diff --git a/src/main/java/com/corbado/services/SessionService.java b/src/main/java/com/corbado/services/SessionService.java index 368d425..554e623 100644 --- a/src/main/java/com/corbado/services/SessionService.java +++ b/src/main/java/com/corbado/services/SessionService.java @@ -131,7 +131,7 @@ public UserEntity validateToken(final String sessionToken) throws TokenValidatio if (sessionToken == null || sessionToken.isEmpty()) { throw new TokenValidationException( - ValidationErrorType.EMPTY_SESSION_TOKEN, "Session token is empty"); + ValidationErrorType.CODE_EMPTY_SESSION_TOKEN, "Session token is empty"); } DecodedJWT decodedJwt = null; try { @@ -148,20 +148,20 @@ public UserEntity validateToken(final String sessionToken) throws TokenValidatio final JWTVerifier verifier = JWT.require(algorithm).build(); decodedJwt = verifier.verify(sessionToken); } catch (final InvalidPublicKeyException e) { - throw new TokenValidationException(ValidationErrorType.INVALID_PUBLIC_KEY, e.getMessage(), e); + throw new TokenValidationException(ValidationErrorType.CODE_INVALID_PUBLIC_KEY, e.getMessage(), e); } catch (final TokenExpiredException e) { - throw new TokenValidationException(ValidationErrorType.JWT_EXPIRED, e.getMessage(), e); + throw new TokenValidationException(ValidationErrorType.CODE_JWT_EXPIRED, e.getMessage(), e); } catch (final SignatureVerificationException e) { throw new TokenValidationException( - ValidationErrorType.JWT_INVALID_SIGNATURE, e.getMessage(), e); + ValidationErrorType.CODE_JWT_INVALID_SIGNATURE, e.getMessage(), e); } catch (final JWTVerificationException e) { ValidationErrorType errorType = null; if (StringUtils.startsWith(e.getMessage(), "The Token can't be used before")) { - errorType = ValidationErrorType.JWT_BEFORE; + errorType = ValidationErrorType.CODE_JWT_BEFORE; } else { - errorType = ValidationErrorType.INVALID_TOKEN; + errorType = ValidationErrorType.CODE_INVALID_TOKEN; } throw new TokenValidationException( errorType, @@ -172,7 +172,7 @@ public UserEntity validateToken(final String sessionToken) throws TokenValidatio e); } catch (final Exception e) { throw new TokenValidationException( - ValidationErrorType.INVALID_TOKEN, + ValidationErrorType.CODE_INVALID_TOKEN, "Unexpected exception during token validation: " + sessionToken, e); } @@ -187,7 +187,7 @@ private void validateIssuer(String tokenIssuer, String sessionToken) // Check if issuer is empty if (tokenIssuer == null || StringUtils.isBlank(tokenIssuer)) { throw new TokenValidationException( - ValidationErrorType.EMPTY_ISSUER, "Issuer is empty. Session token: " + sessionToken); + ValidationErrorType.CODE_EMPTY_ISSUER, "Issuer is empty. Session token: " + sessionToken); } // Check for old Frontend API (without .cloud.) @@ -205,7 +205,7 @@ private void validateIssuer(String tokenIssuer, String sessionToken) // Check against the configured issuer (e.g., a custom domain or CNAME) if (!tokenIssuer.equals(this.issuer)) { throw new TokenValidationException( - ValidationErrorType.ISSUER_MISSMATCH, + ValidationErrorType.CODE_ISSUER_MISSMATCH, "Issuer mismatch (configured via FrontendAPI: '" + this.issuer + "', JWT issuer: '" diff --git a/src/test/java/com/corbado/unit/SessionServiceTest.java b/src/test/java/com/corbado/unit/SessionServiceTest.java index a2c3ab8..6856020 100644 --- a/src/test/java/com/corbado/unit/SessionServiceTest.java +++ b/src/test/java/com/corbado/unit/SessionServiceTest.java @@ -252,12 +252,12 @@ static List provideJwts() throws InvalidKeySpecException, NoSuchAlgori + "pvaG4gRG9lIiwiYWRtaW4iOnRydWV9.dyt0CoTl4WoVjAHI9Q_CwSKhl6d_9rhM3NrXuJttkao"; testData.add( new Object[] { - jwtWithWrongAlgorithm, TokenValidationException.class, ValidationErrorType.INVALID_TOKEN + jwtWithWrongAlgorithm, TokenValidationException.class, ValidationErrorType.CODE_INVALID_TOKEN }); // Empty JWT testData.add( - new Object[] {"", TokenValidationException.class, ValidationErrorType.EMPTY_SESSION_TOKEN}); + new Object[] {"", TokenValidationException.class, ValidationErrorType.CODE_EMPTY_SESSION_TOKEN}); // Not before (nbf) in future testData.add( new Object[] { @@ -267,7 +267,7 @@ static List provideJwts() throws InvalidKeySpecException, NoSuchAlgori System.currentTimeMillis() / 1000 + 100, privateKey), TokenValidationException.class, - ValidationErrorType.JWT_BEFORE + ValidationErrorType.CODE_JWT_BEFORE }); // Expired (exp) @@ -279,7 +279,7 @@ static List provideJwts() throws InvalidKeySpecException, NoSuchAlgori System.currentTimeMillis() / 1000 - 100, privateKey), TokenValidationException.class, - ValidationErrorType.JWT_EXPIRED + ValidationErrorType.CODE_JWT_EXPIRED }); // Invalid issuer (iss) @@ -291,7 +291,7 @@ static List provideJwts() throws InvalidKeySpecException, NoSuchAlgori System.currentTimeMillis() / 1000 - 100, privateKey), TokenValidationException.class, - ValidationErrorType.ISSUER_MISSMATCH + ValidationErrorType.CODE_ISSUER_MISSMATCH }); // Wrong private key testData.add( @@ -302,7 +302,7 @@ static List provideJwts() throws InvalidKeySpecException, NoSuchAlgori System.currentTimeMillis() / 1000 - 100, invalidPrivateKey), TokenValidationException.class, - ValidationErrorType.JWT_INVALID_SIGNATURE + ValidationErrorType.CODE_JWT_INVALID_SIGNATURE }); // Success with cname testData.add( @@ -313,7 +313,7 @@ static List provideJwts() throws InvalidKeySpecException, NoSuchAlgori System.currentTimeMillis() / 1000 - 100, privateKey), null, - ValidationErrorType.JWT_INVALID_SIGNATURE + ValidationErrorType.CODE_JWT_INVALID_SIGNATURE }); // Empty issuer testData.add( @@ -324,7 +324,7 @@ static List provideJwts() throws InvalidKeySpecException, NoSuchAlgori System.currentTimeMillis() / 1000 - 100, privateKey), TokenValidationException.class, - ValidationErrorType.EMPTY_ISSUER + ValidationErrorType.CODE_EMPTY_ISSUER }); // "Success with new Frontend API URL in JWT", testData.add( @@ -358,7 +358,7 @@ static List provideJwts() throws InvalidKeySpecException, NoSuchAlgori System.currentTimeMillis() / 1000 - 100, privateKey), TokenValidationException.class, - ValidationErrorType.ISSUER_MISSMATCH + ValidationErrorType.CODE_ISSUER_MISSMATCH }); return testData; From cda074221235156ea5535d05244773e7725cc169 Mon Sep 17 00:00:00 2001 From: Aleksandr Balakirev Date: Sun, 3 Nov 2024 22:12:02 +0100 Subject: [PATCH 14/28] Change CORBADO_FRONTEND_API from variable to secret in CI/CD --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d1ad747..eb21b34 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -100,7 +100,7 @@ jobs: env: CORBADO_PROJECT_ID: ${{ secrets.CORBADO_PROJECT_ID }} CORBADO_API_SECRET: ${{ secrets.CORBADO_API_SECRET }} - CORBADO_FRONTEND_API: ${{ vars.CORBADO_FRONTEND_API }} + CORBADO_FRONTEND_API: ${{ secrets.CORBADO_FRONTEND_API }} CORBADO_BACKEND_API: ${{ vars.CORBADO_BACKEND_API }} run: mvn --batch-mode --update-snapshots verify -DskipInstall From 0d357f59a0203602ad5a6f2d9373efc013a554b9 Mon Sep 17 00:00:00 2001 From: Aleksandr Balakirev <55588266+alexbalakirev@users.noreply.github.com> Date: Tue, 12 Nov 2024 13:36:17 +0100 Subject: [PATCH 15/28] Fix alignment of secrets in ci.yml --- .github/workflows/ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index eb21b34..a433f38 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -98,10 +98,10 @@ jobs: - name: Run test suite env: - CORBADO_PROJECT_ID: ${{ secrets.CORBADO_PROJECT_ID }} - CORBADO_API_SECRET: ${{ secrets.CORBADO_API_SECRET }} - CORBADO_FRONTEND_API: ${{ secrets.CORBADO_FRONTEND_API }} - CORBADO_BACKEND_API: ${{ vars.CORBADO_BACKEND_API }} + CORBADO_PROJECT_ID: ${{ secrets.CORBADO_PROJECT_ID }} + CORBADO_API_SECRET: ${{ secrets.CORBADO_API_SECRET }} + CORBADO_FRONTEND_API: ${{ secrets.CORBADO_FRONTEND_API }} + CORBADO_BACKEND_API: ${{ vars.CORBADO_BACKEND_API }} run: mvn --batch-mode --update-snapshots verify -DskipInstall deploy: From 5c271381a9e3c45678926c797f087423b0cc6b60 Mon Sep 17 00:00:00 2001 From: Aleksandr Balakirev Date: Sun, 15 Dec 2024 14:09:02 +0100 Subject: [PATCH 16/28] Update generated OpenAPI code --- .../corbado/generated/api/AuthEventsApi.java | 12 +- .../corbado/generated/api/ChallengesApi.java | 24 +- .../generated/api/ConnectTokensApi.java | 48 +- .../corbado/generated/api/IdentifiersApi.java | 48 +- .../generated/api/PasskeyChallengesApi.java | 24 +- .../generated/api/PasskeyEventsApi.java | 36 +- .../corbado/generated/api/PasskeysApi.java | 72 ++- .../generated/api/ProjectConfigApi.java | 12 +- .../corbado/generated/api/SessionsApi.java | 60 ++- .../com/corbado/generated/api/UsersApi.java | 108 ++-- .../generated/api/WebhookEndpointsApi.java | 462 ++++++++++++++++++ .../corbado/generated/invoker/ApiClient.java | 35 +- .../generated/invoker/ApiException.java | 2 +- .../generated/invoker/Configuration.java | 2 +- .../com/corbado/generated/invoker/JSON.java | 5 + .../com/corbado/generated/invoker/Pair.java | 2 +- .../invoker/ServerConfiguration.java | 15 +- .../generated/invoker/ServerVariable.java | 15 +- .../corbado/generated/invoker/StringUtil.java | 2 +- .../generated/invoker/auth/ApiKeyAuth.java | 2 +- .../invoker/auth/HttpBearerAuth.java | 2 +- .../generated/model/AaguidDetails.java | 276 +++++++++++ .../model/AbstractOpenApiSchema.java | 2 +- .../corbado/generated/model/AuthEvent.java | 38 +- .../generated/model/AuthEventCreateReq.java | 28 +- .../corbado/generated/model/Challenge.java | 58 ++- .../generated/model/ChallengeCreateReq.java | 52 +- .../generated/model/ChallengeUpdateReq.java | 8 +- .../generated/model/ClientInformation.java | 75 ++- .../corbado/generated/model/ConnectToken.java | 33 +- .../model/ConnectTokenCreateReq.java | 18 +- .../generated/model/ConnectTokenData.java | 61 ++- .../model/ConnectTokenDataPasskeyAppend.java | 13 +- .../model/ConnectTokenDataPasskeyDelete.java | 8 +- .../model/ConnectTokenDataPasskeyList.java | 8 +- .../model/ConnectTokenDataPasskeyLogin.java | 214 ++++++++ .../generated/model/ConnectTokenList.java | 13 +- .../generated/model/ConnectTokenType.java | 4 +- .../model/ConnectTokenUpdateReq.java | 8 +- .../corbado/generated/model/Credential.java | 98 ++-- .../generated/model/CredentialList.java | 13 +- .../corbado/generated/model/DecisionTag.java | 4 +- .../corbado/generated/model/DetectionTag.java | 13 +- .../com/corbado/generated/model/ErrorRsp.java | 35 +- .../generated/model/ErrorRspAllOfError.java | 32 +- .../model/ErrorRspAllOfErrorValidation.java | 13 +- .../corbado/generated/model/GenericRsp.java | 25 +- .../corbado/generated/model/Identifier.java | 28 +- .../generated/model/IdentifierCreateReq.java | 18 +- .../generated/model/IdentifierList.java | 13 +- .../generated/model/IdentifierUpdateReq.java | 8 +- .../model/JavaScriptHighEntropy.java | 18 +- .../corbado/generated/model/LongSession.java | 28 +- .../generated/model/LongSessionCreateReq.java | 13 +- .../generated/model/LongSessionUpdateReq.java | 8 +- .../com/corbado/generated/model/Paging.java | 18 +- .../model/PasskeyAppendFinishReq.java | 28 +- .../model/PasskeyAppendFinishRsp.java | 8 +- .../model/PasskeyAppendStartReq.java | 28 +- .../model/PasskeyAppendStartRsp.java | 53 +- .../generated/model/PasskeyChallenge.java | 33 +- .../generated/model/PasskeyChallengeList.java | 13 +- .../model/PasskeyChallengeUpdateReq.java | 8 +- .../corbado/generated/model/PasskeyData.java | 63 ++- .../corbado/generated/model/PasskeyEvent.java | 43 +- .../model/PasskeyEventCreateReq.java | 62 ++- .../generated/model/PasskeyEventList.java | 13 +- .../generated/model/PasskeyEventType.java | 10 +- .../generated/model/PasskeyIntelFlags.java | 8 +- .../model/PasskeyLoginFinishReq.java | 23 +- .../model/PasskeyLoginFinishRsp.java | 8 +- .../generated/model/PasskeyLoginStartReq.java | 23 +- .../generated/model/PasskeyLoginStartRsp.java | 58 ++- .../model/PasskeyMediationFinishReq.java | 18 +- .../model/PasskeyMediationFinishRsp.java | 8 +- .../model/PasskeyMediationStartReq.java | 8 +- .../model/PasskeyMediationStartRsp.java | 13 +- .../model/ProjectConfigUpdateCnameReq.java | 8 +- .../corbado/generated/model/RequestData.java | 18 +- .../corbado/generated/model/ShortSession.java | 8 +- .../model/ShortSessionCreateReq.java | 13 +- .../generated/model/SocialAccount.java | 38 +- .../model/SocialAccountCreateReq.java | 28 +- .../generated/model/SocialAccountList.java | 13 +- .../com/corbado/generated/model/User.java | 23 +- .../generated/model/UserCreateReq.java | 18 +- .../generated/model/UserUpdateReq.java | 13 +- .../generated/model/WebhookEndpoint.java | 380 ++++++++++++++ .../model/WebhookEndpointCreateReq.java | 287 +++++++++++ .../generated/model/WebhookEndpointList.java | 232 +++++++++ .../generated/model/WebhookEventType.java | 80 +++ 91 files changed, 3266 insertions(+), 712 deletions(-) create mode 100644 src/main/java/com/corbado/generated/api/WebhookEndpointsApi.java create mode 100644 src/main/java/com/corbado/generated/model/AaguidDetails.java create mode 100644 src/main/java/com/corbado/generated/model/ConnectTokenDataPasskeyLogin.java create mode 100644 src/main/java/com/corbado/generated/model/WebhookEndpoint.java create mode 100644 src/main/java/com/corbado/generated/model/WebhookEndpointCreateReq.java create mode 100644 src/main/java/com/corbado/generated/model/WebhookEndpointList.java create mode 100644 src/main/java/com/corbado/generated/model/WebhookEventType.java diff --git a/src/main/java/com/corbado/generated/api/AuthEventsApi.java b/src/main/java/com/corbado/generated/api/AuthEventsApi.java index 4e72970..b3f6759 100644 --- a/src/main/java/com/corbado/generated/api/AuthEventsApi.java +++ b/src/main/java/com/corbado/generated/api/AuthEventsApi.java @@ -82,7 +82,8 @@ public void setCustomBaseUrl(String customBaseUrl) { * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - +
+ @@ -158,7 +159,8 @@ private okhttp3.Call authEventCreateValidateBeforeCall(String userID, AuthEventC * @return AuthEvent * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 Auth event has been created -
0 Error -
+
+ @@ -177,7 +179,8 @@ public AuthEvent authEventCreate(String userID, AuthEventCreateReq authEventCrea * @return ApiResponse<AuthEvent> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 Auth event has been created -
0 Error -
+
+ @@ -198,7 +201,8 @@ public ApiResponse authEventCreateWithHttpInfo(String userID, AuthEve * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 Auth event has been created -
0 Error -
+
+ diff --git a/src/main/java/com/corbado/generated/api/ChallengesApi.java b/src/main/java/com/corbado/generated/api/ChallengesApi.java index 0ce2724..5892e02 100644 --- a/src/main/java/com/corbado/generated/api/ChallengesApi.java +++ b/src/main/java/com/corbado/generated/api/ChallengesApi.java @@ -83,7 +83,8 @@ public void setCustomBaseUrl(String customBaseUrl) { * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 Auth event has been created -
0 Error -
+
+ @@ -159,7 +160,8 @@ private okhttp3.Call challengeCreateValidateBeforeCall(String userID, ChallengeC * @return Challenge * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 Challenge has been created -
0 Error -
+
+ @@ -178,7 +180,8 @@ public Challenge challengeCreate(String userID, ChallengeCreateReq challengeCrea * @return ApiResponse<Challenge> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 Challenge has been created -
0 Error -
+
+ @@ -199,7 +202,8 @@ public ApiResponse challengeCreateWithHttpInfo(String userID, Challen * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 Challenge has been created -
0 Error -
+
+ @@ -221,7 +225,8 @@ public okhttp3.Call challengeCreateAsync(String userID, ChallengeCreateReq chall * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 Challenge has been created -
0 Error -
+
+ @@ -304,7 +309,8 @@ private okhttp3.Call challengeUpdateValidateBeforeCall(String userID, String cha * @return Challenge * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 Challenge has been updated -
0 Error -
+
+ @@ -324,7 +330,8 @@ public Challenge challengeUpdate(String userID, String challengeID, ChallengeUpd * @return ApiResponse<Challenge> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 Challenge has been updated -
0 Error -
+
+ @@ -346,7 +353,8 @@ public ApiResponse challengeUpdateWithHttpInfo(String userID, String * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 Challenge has been updated -
0 Error -
+
+ diff --git a/src/main/java/com/corbado/generated/api/ConnectTokensApi.java b/src/main/java/com/corbado/generated/api/ConnectTokensApi.java index 167f137..33c59b4 100644 --- a/src/main/java/com/corbado/generated/api/ConnectTokensApi.java +++ b/src/main/java/com/corbado/generated/api/ConnectTokensApi.java @@ -84,7 +84,8 @@ public void setCustomBaseUrl(String customBaseUrl) { * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 Challenge has been updated -
0 Error -
+
+ @@ -153,7 +154,8 @@ private okhttp3.Call connectTokenCreateValidateBeforeCall(ConnectTokenCreateReq * @return ConnectToken * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 Connect token has been created -
0 Error -
+
+ @@ -171,7 +173,8 @@ public ConnectToken connectTokenCreate(ConnectTokenCreateReq connectTokenCreateR * @return ApiResponse<ConnectToken> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 Connect token has been created -
0 Error -
+
+ @@ -191,7 +194,8 @@ public ApiResponse connectTokenCreateWithHttpInfo(ConnectTokenCrea * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 Connect token has been created -
0 Error -
+
+ @@ -211,7 +215,8 @@ public okhttp3.Call connectTokenCreateAsync(ConnectTokenCreateReq connectTokenCr * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 Connect token has been created -
0 Error -
+
+ @@ -280,7 +285,8 @@ private okhttp3.Call connectTokenDeleteValidateBeforeCall(String connectTokenID, * @return GenericRsp * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 Operation succeeded -
0 Error -
+
+ @@ -298,7 +304,8 @@ public GenericRsp connectTokenDelete(String connectTokenID) throws ApiException * @return ApiResponse<GenericRsp> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 Operation succeeded -
0 Error -
+
+ @@ -318,7 +325,8 @@ public ApiResponse connectTokenDeleteWithHttpInfo(String connectToke * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 Operation succeeded -
0 Error -
+
+ @@ -341,7 +349,8 @@ public okhttp3.Call connectTokenDeleteAsync(String connectTokenID, final ApiCall * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 Operation succeeded -
0 Error -
+
+ @@ -423,7 +432,8 @@ private okhttp3.Call connectTokenListValidateBeforeCall(String sort, List +
Response Details
Status Code Description Response Headers
200 List of all matching append tokens -
0 Error -
+ @@ -444,7 +454,8 @@ public ConnectTokenList connectTokenList(String sort, List filter, Integ * @return ApiResponse<ConnectTokenList> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 List of all matching append tokens -
0 Error -
+
+ @@ -467,7 +478,8 @@ public ApiResponse connectTokenListWithHttpInfo(String sort, L * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 List of all matching append tokens -
0 Error -
+
+ @@ -488,7 +500,8 @@ public okhttp3.Call connectTokenListAsync(String sort, List filter, Inte * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 List of all matching append tokens -
0 Error -
+
+ @@ -564,7 +577,8 @@ private okhttp3.Call connectTokenUpdateValidateBeforeCall(String connectTokenID, * @return GenericRsp * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 Operation succeeded -
0 Error -
+
+ @@ -583,7 +597,8 @@ public GenericRsp connectTokenUpdate(String connectTokenID, ConnectTokenUpdateRe * @return ApiResponse<GenericRsp> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 Operation succeeded -
0 Error -
+
+ @@ -604,7 +619,8 @@ public ApiResponse connectTokenUpdateWithHttpInfo(String connectToke * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 Operation succeeded -
0 Error -
+
+ diff --git a/src/main/java/com/corbado/generated/api/IdentifiersApi.java b/src/main/java/com/corbado/generated/api/IdentifiersApi.java index 4383647..ed886ce 100644 --- a/src/main/java/com/corbado/generated/api/IdentifiersApi.java +++ b/src/main/java/com/corbado/generated/api/IdentifiersApi.java @@ -85,7 +85,8 @@ public void setCustomBaseUrl(String customBaseUrl) { * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 Operation succeeded -
0 Error -
+
+ @@ -161,7 +162,8 @@ private okhttp3.Call identifierCreateValidateBeforeCall(String userID, Identifie * @return Identifier * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 Identifier has been created -
0 Error -
+
+ @@ -180,7 +182,8 @@ public Identifier identifierCreate(String userID, IdentifierCreateReq identifier * @return ApiResponse<Identifier> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 Identifier has been created -
0 Error -
+
+ @@ -201,7 +204,8 @@ public ApiResponse identifierCreateWithHttpInfo(String userID, Ident * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 Identifier has been created -
0 Error -
+
+ @@ -222,7 +226,8 @@ public okhttp3.Call identifierCreateAsync(String userID, IdentifierCreateReq ide * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 Identifier has been created -
0 Error -
+
+ @@ -298,7 +303,8 @@ private okhttp3.Call identifierDeleteValidateBeforeCall(String userID, String id * @return GenericRsp * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 Operation succeeded -
0 Error -
+
+ @@ -317,7 +323,8 @@ public GenericRsp identifierDelete(String userID, String identifierID) throws Ap * @return ApiResponse<GenericRsp> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 Operation succeeded -
0 Error -
+
+ @@ -338,7 +345,8 @@ public ApiResponse identifierDeleteWithHttpInfo(String userID, Strin * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 Operation succeeded -
0 Error -
+
+ @@ -361,7 +369,8 @@ public okhttp3.Call identifierDeleteAsync(String userID, String identifierID, fi * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 Operation succeeded -
0 Error -
+
+ @@ -443,7 +452,8 @@ private okhttp3.Call identifierListValidateBeforeCall(String sort, List * @return IdentifierList * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 List of all matching identifiers -
0 Error -
+
+ @@ -464,7 +474,8 @@ public IdentifierList identifierList(String sort, List filter, Integer p * @return ApiResponse<IdentifierList> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 List of all matching identifiers -
0 Error -
+
+ @@ -487,7 +498,8 @@ public ApiResponse identifierListWithHttpInfo(String sort, List< * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 List of all matching identifiers -
0 Error -
+
+ @@ -509,7 +521,8 @@ public okhttp3.Call identifierListAsync(String sort, List filter, Intege * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 List of all matching identifiers -
0 Error -
+
+ @@ -592,7 +605,8 @@ private okhttp3.Call identifierUpdateValidateBeforeCall(String userID, String id * @return Identifier * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 Identifier has been updated -
0 Error -
+
+ @@ -612,7 +626,8 @@ public Identifier identifierUpdate(String userID, String identifierID, Identifie * @return ApiResponse<Identifier> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 Identifier has been updated -
0 Error -
+
+ @@ -634,7 +649,8 @@ public ApiResponse identifierUpdateWithHttpInfo(String userID, Strin * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 Identifier has been updated -
0 Error -
+
+ diff --git a/src/main/java/com/corbado/generated/api/PasskeyChallengesApi.java b/src/main/java/com/corbado/generated/api/PasskeyChallengesApi.java index 436139a..4141d15 100644 --- a/src/main/java/com/corbado/generated/api/PasskeyChallengesApi.java +++ b/src/main/java/com/corbado/generated/api/PasskeyChallengesApi.java @@ -86,7 +86,8 @@ public void setCustomBaseUrl(String customBaseUrl) { * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 Identifier has been updated -
0 Error -
+
+ @@ -175,7 +176,8 @@ private okhttp3.Call passkeyChallengeListValidateBeforeCall(String userID, Strin * @return PasskeyChallengeList * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 List of all matching passkey challenges -
0 Error -
+
+ @@ -197,7 +199,8 @@ public PasskeyChallengeList passkeyChallengeList(String userID, String sort, Lis * @return ApiResponse<PasskeyChallengeList> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 List of all matching passkey challenges -
0 Error -
+
+ @@ -221,7 +224,8 @@ public ApiResponse passkeyChallengeListWithHttpInfo(String * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 List of all matching passkey challenges -
0 Error -
+
+ @@ -243,7 +247,8 @@ public okhttp3.Call passkeyChallengeListAsync(String userID, String sort, List +
Response Details
Status Code Description Response Headers
200 List of all matching passkey challenges -
0 Error -
+ @@ -326,7 +331,8 @@ private okhttp3.Call passkeyChallengeUpdateValidateBeforeCall(String userID, Str * @return PasskeyChallenge * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 Passkey challenge has been updated -
0 Error -
+
+ @@ -346,7 +352,8 @@ public PasskeyChallenge passkeyChallengeUpdate(String userID, String passkeyChal * @return ApiResponse<PasskeyChallenge> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 Passkey challenge has been updated -
0 Error -
+
+ @@ -368,7 +375,8 @@ public ApiResponse passkeyChallengeUpdateWithHttpInfo(String u * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 Passkey challenge has been updated -
0 Error -
+
+ diff --git a/src/main/java/com/corbado/generated/api/PasskeyEventsApi.java b/src/main/java/com/corbado/generated/api/PasskeyEventsApi.java index 01d209f..fd435b2 100644 --- a/src/main/java/com/corbado/generated/api/PasskeyEventsApi.java +++ b/src/main/java/com/corbado/generated/api/PasskeyEventsApi.java @@ -84,7 +84,8 @@ public void setCustomBaseUrl(String customBaseUrl) { * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 Passkey challenge has been updated -
0 Error -
+
+ @@ -160,7 +161,8 @@ private okhttp3.Call passkeyEventCreateValidateBeforeCall(String userID, Passkey * @return PasskeyEvent * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 Passkey event has been created -
0 Error -
+
+ @@ -179,7 +181,8 @@ public PasskeyEvent passkeyEventCreate(String userID, PasskeyEventCreateReq pass * @return ApiResponse<PasskeyEvent> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 Passkey event has been created -
0 Error -
+
+ @@ -200,7 +203,8 @@ public ApiResponse passkeyEventCreateWithHttpInfo(String userID, P * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 Passkey event has been created -
0 Error -
+
+ @@ -221,7 +225,8 @@ public okhttp3.Call passkeyEventCreateAsync(String userID, PasskeyEventCreateReq * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 Passkey event has been created -
0 Error -
+
+ @@ -297,7 +302,8 @@ private okhttp3.Call passkeyEventDeleteValidateBeforeCall(String userID, String * @return GenericRsp * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 Operation succeeded -
0 Error -
+
+ @@ -316,7 +322,8 @@ public GenericRsp passkeyEventDelete(String userID, String passkeyEventID) throw * @return ApiResponse<GenericRsp> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 Operation succeeded -
0 Error -
+
+ @@ -337,7 +344,8 @@ public ApiResponse passkeyEventDeleteWithHttpInfo(String userID, Str * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 Operation succeeded -
0 Error -
+
+ @@ -361,7 +369,8 @@ public okhttp3.Call passkeyEventDeleteAsync(String userID, String passkeyEventID * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 Operation succeeded -
0 Error -
+
+ @@ -450,7 +459,8 @@ private okhttp3.Call passkeyEventListValidateBeforeCall(String userID, String so * @return PasskeyEventList * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 List of all matching passkey events -
0 Error -
+
+ @@ -472,7 +482,8 @@ public PasskeyEventList passkeyEventList(String userID, String sort, List +
Response Details
Status Code Description Response Headers
200 List of all matching passkey events -
0 Error -
+ @@ -496,7 +507,8 @@ public ApiResponse passkeyEventListWithHttpInfo(String userID, * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 List of all matching passkey events -
0 Error -
+
+ diff --git a/src/main/java/com/corbado/generated/api/PasskeysApi.java b/src/main/java/com/corbado/generated/api/PasskeysApi.java index c251b6c..d9045e0 100644 --- a/src/main/java/com/corbado/generated/api/PasskeysApi.java +++ b/src/main/java/com/corbado/generated/api/PasskeysApi.java @@ -91,7 +91,8 @@ public void setCustomBaseUrl(String customBaseUrl) { * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 List of all matching passkey events -
0 Error -
+
+ @@ -160,7 +161,8 @@ private okhttp3.Call passkeyAppendFinishValidateBeforeCall(PasskeyAppendFinishRe * @return PasskeyAppendFinishRsp * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 Passkey append succeeded -
0 Error -
+
+ @@ -178,7 +180,8 @@ public PasskeyAppendFinishRsp passkeyAppendFinish(PasskeyAppendFinishReq passkey * @return ApiResponse<PasskeyAppendFinishRsp> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 Passkey append succeeded -
0 Error -
+
+ @@ -198,7 +201,8 @@ public ApiResponse passkeyAppendFinishWithHttpInfo(Passk * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 Passkey append succeeded -
0 Error -
+
+ @@ -218,7 +222,8 @@ public okhttp3.Call passkeyAppendFinishAsync(PasskeyAppendFinishReq passkeyAppen * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 Passkey append succeeded -
0 Error -
+
+ @@ -287,7 +292,8 @@ private okhttp3.Call passkeyAppendStartValidateBeforeCall(PasskeyAppendStartReq * @return PasskeyAppendStartRsp * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 Passkey append challenge has been created -
0 Error -
+
+ @@ -305,7 +311,8 @@ public PasskeyAppendStartRsp passkeyAppendStart(PasskeyAppendStartReq passkeyApp * @return ApiResponse<PasskeyAppendStartRsp> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 Passkey append challenge has been created -
0 Error -
+
+ @@ -325,7 +332,8 @@ public ApiResponse passkeyAppendStartWithHttpInfo(Passkey * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 Passkey append challenge has been created -
0 Error -
+
+ @@ -345,7 +353,8 @@ public okhttp3.Call passkeyAppendStartAsync(PasskeyAppendStartReq passkeyAppendS * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 Passkey append challenge has been created -
0 Error -
+
+ @@ -414,7 +423,8 @@ private okhttp3.Call passkeyLoginFinishValidateBeforeCall(PasskeyLoginFinishReq * @return PasskeyLoginFinishRsp * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 Passkey login succeeded -
0 Error -
+
+ @@ -432,7 +442,8 @@ public PasskeyLoginFinishRsp passkeyLoginFinish(PasskeyLoginFinishReq passkeyLog * @return ApiResponse<PasskeyLoginFinishRsp> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 Passkey login succeeded -
0 Error -
+
+ @@ -452,7 +463,8 @@ public ApiResponse passkeyLoginFinishWithHttpInfo(Passkey * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 Passkey login succeeded -
0 Error -
+
+ @@ -472,7 +484,8 @@ public okhttp3.Call passkeyLoginFinishAsync(PasskeyLoginFinishReq passkeyLoginFi * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 Passkey login succeeded -
0 Error -
+
+ @@ -541,7 +554,8 @@ private okhttp3.Call passkeyLoginStartValidateBeforeCall(PasskeyLoginStartReq pa * @return PasskeyLoginStartRsp * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 Passkey login challenge has been created -
0 Error -
+
+ @@ -559,7 +573,8 @@ public PasskeyLoginStartRsp passkeyLoginStart(PasskeyLoginStartReq passkeyLoginS * @return ApiResponse<PasskeyLoginStartRsp> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 Passkey login challenge has been created -
0 Error -
+
+ @@ -579,7 +594,8 @@ public ApiResponse passkeyLoginStartWithHttpInfo(PasskeyLo * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 Passkey login challenge has been created -
0 Error -
+
+ @@ -599,7 +615,8 @@ public okhttp3.Call passkeyLoginStartAsync(PasskeyLoginStartReq passkeyLoginStar * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 Passkey login challenge has been created -
0 Error -
+
+ @@ -668,7 +685,8 @@ private okhttp3.Call passkeyMediationFinishValidateBeforeCall(PasskeyMediationFi * @return PasskeyMediationFinishRsp * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 Passkey mediation has been success, thus we can return a userID -
0 Error -
+
+ @@ -686,7 +704,8 @@ public PasskeyMediationFinishRsp passkeyMediationFinish(PasskeyMediationFinishRe * @return ApiResponse<PasskeyMediationFinishRsp> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 Passkey mediation has been success, thus we can return a userID -
0 Error -
+
+ @@ -706,7 +725,8 @@ public ApiResponse passkeyMediationFinishWithHttpInfo * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 Passkey mediation has been success, thus we can return a userID -
0 Error -
+
+ @@ -726,7 +746,8 @@ public okhttp3.Call passkeyMediationFinishAsync(PasskeyMediationFinishReq passke * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 Passkey mediation has been success, thus we can return a userID -
0 Error -
+
+ @@ -795,7 +816,8 @@ private okhttp3.Call passkeyMediationStartValidateBeforeCall(PasskeyMediationSta * @return PasskeyMediationStartRsp * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 Passkey login challenge has been created -
0 Error -
+
+ @@ -813,7 +835,8 @@ public PasskeyMediationStartRsp passkeyMediationStart(PasskeyMediationStartReq p * @return ApiResponse<PasskeyMediationStartRsp> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 Passkey login challenge has been created -
0 Error -
+
+ @@ -833,7 +856,8 @@ public ApiResponse passkeyMediationStartWithHttpInfo(P * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 Passkey login challenge has been created -
0 Error -
+
+ diff --git a/src/main/java/com/corbado/generated/api/ProjectConfigApi.java b/src/main/java/com/corbado/generated/api/ProjectConfigApi.java index 4e191a1..5a2324c 100644 --- a/src/main/java/com/corbado/generated/api/ProjectConfigApi.java +++ b/src/main/java/com/corbado/generated/api/ProjectConfigApi.java @@ -81,7 +81,8 @@ public void setCustomBaseUrl(String customBaseUrl) { * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 Passkey login challenge has been created -
0 Error -
+
+ @@ -150,7 +151,8 @@ private okhttp3.Call projectConfigUpdateCNAMEValidateBeforeCall(ProjectConfigUpd * @return GenericRsp * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 Operation succeeded -
0 Error -
+
+ @@ -168,7 +170,8 @@ public GenericRsp projectConfigUpdateCNAME(ProjectConfigUpdateCnameReq projectCo * @return ApiResponse<GenericRsp> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 Operation succeeded -
0 Error -
+
+ @@ -188,7 +191,8 @@ public ApiResponse projectConfigUpdateCNAMEWithHttpInfo(ProjectConfi * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 Operation succeeded -
0 Error -
+
+ diff --git a/src/main/java/com/corbado/generated/api/SessionsApi.java b/src/main/java/com/corbado/generated/api/SessionsApi.java index c27e5f5..227b080 100644 --- a/src/main/java/com/corbado/generated/api/SessionsApi.java +++ b/src/main/java/com/corbado/generated/api/SessionsApi.java @@ -85,7 +85,8 @@ public void setCustomBaseUrl(String customBaseUrl) { * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 Operation succeeded -
0 Error -
+
+ @@ -161,7 +162,8 @@ private okhttp3.Call longSessionCreateValidateBeforeCall(String userID, LongSess * @return LongSession * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 Long session has been created -
0 Error -
+
+ @@ -180,7 +182,8 @@ public LongSession longSessionCreate(String userID, LongSessionCreateReq longSes * @return ApiResponse<LongSession> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 Long session has been created -
0 Error -
+
+ @@ -201,7 +204,8 @@ public ApiResponse longSessionCreateWithHttpInfo(String userID, Lon * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 Long session has been created -
0 Error -
+
+ @@ -221,7 +225,8 @@ public okhttp3.Call longSessionCreateAsync(String userID, LongSessionCreateReq l * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 Long session has been created -
0 Error -
+
+ @@ -290,7 +295,8 @@ private okhttp3.Call longSessionGetValidateBeforeCall(String longSessionID, fina * @return LongSession * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 Long session has been returned -
0 Error -
+
+ @@ -308,7 +314,8 @@ public LongSession longSessionGet(String longSessionID) throws ApiException { * @return ApiResponse<LongSession> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 Long session has been returned -
0 Error -
+
+ @@ -328,7 +335,8 @@ public ApiResponse longSessionGetWithHttpInfo(String longSessionID) * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 Long session has been returned -
0 Error -
+
+ @@ -350,7 +358,8 @@ public okhttp3.Call longSessionGetAsync(String longSessionID, final ApiCallback< * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 Long session has been returned -
0 Error -
+
+ @@ -433,7 +442,8 @@ private okhttp3.Call longSessionUpdateValidateBeforeCall(String userID, String l * @return LongSession * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 Long session has been updated -
0 Error -
+
+ @@ -453,7 +463,8 @@ public LongSession longSessionUpdate(String userID, String longSessionID, LongSe * @return ApiResponse<LongSession> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 Long session has been updated -
0 Error -
+
+ @@ -475,7 +486,8 @@ public ApiResponse longSessionUpdateWithHttpInfo(String userID, Str * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 Long session has been updated -
0 Error -
+
+ @@ -497,7 +509,8 @@ public okhttp3.Call longSessionUpdateAsync(String userID, String longSessionID, * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 Long session has been updated -
0 Error -
+
+ @@ -580,7 +593,8 @@ private okhttp3.Call shortSessionCreateValidateBeforeCall(String userID, String * @return ShortSession * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 Short session has been created -
0 Error -
+
+ @@ -600,7 +614,8 @@ public ShortSession shortSessionCreate(String userID, String longSessionID, Shor * @return ApiResponse<ShortSession> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 Short session has been created -
0 Error -
+
+ @@ -622,7 +637,8 @@ public ApiResponse shortSessionCreateWithHttpInfo(String userID, S * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 Short session has been created -
0 Error -
+
+ @@ -643,7 +659,8 @@ public okhttp3.Call shortSessionCreateAsync(String userID, String longSessionID, * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 Short session has been created -
0 Error -
+
+ @@ -719,7 +736,8 @@ private okhttp3.Call userLongSessionGetValidateBeforeCall(String userID, String * @return LongSession * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 Long session has been returned -
0 Error -
+
+ @@ -738,7 +756,8 @@ public LongSession userLongSessionGet(String userID, String longSessionID) throw * @return ApiResponse<LongSession> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 Long session has been returned -
0 Error -
+
+ @@ -759,7 +778,8 @@ public ApiResponse userLongSessionGetWithHttpInfo(String userID, St * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 Long session has been returned -
0 Error -
+
+ diff --git a/src/main/java/com/corbado/generated/api/UsersApi.java b/src/main/java/com/corbado/generated/api/UsersApi.java index 7945125..026f2b0 100644 --- a/src/main/java/com/corbado/generated/api/UsersApi.java +++ b/src/main/java/com/corbado/generated/api/UsersApi.java @@ -88,7 +88,8 @@ public void setCustomBaseUrl(String customBaseUrl) { * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 Long session has been returned -
0 Error -
+
+ @@ -164,7 +165,8 @@ private okhttp3.Call credentialDeleteValidateBeforeCall(String userID, String cr * @return GenericRsp * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 Operation succeeded -
0 Error -
+
+ @@ -183,7 +185,8 @@ public GenericRsp credentialDelete(String userID, String credentialID) throws Ap * @return ApiResponse<GenericRsp> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 Operation succeeded -
0 Error -
+
+ @@ -204,7 +207,8 @@ public ApiResponse credentialDeleteWithHttpInfo(String userID, Strin * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 Operation succeeded -
0 Error -
+
+ @@ -228,7 +232,8 @@ public okhttp3.Call credentialDeleteAsync(String userID, String credentialID, fi * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 Operation succeeded -
0 Error -
+
+ @@ -317,7 +322,8 @@ private okhttp3.Call credentialListValidateBeforeCall(String userID, String sort * @return CredentialList * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 List of credentials (passkeys) -
0 Error -
+
+ @@ -339,7 +345,8 @@ public CredentialList credentialList(String userID, String sort, List fi * @return ApiResponse<CredentialList> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 List of credentials (passkeys) -
0 Error -
+
+ @@ -363,7 +370,8 @@ public ApiResponse credentialListWithHttpInfo(String userID, Str * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 List of credentials (passkeys) -
0 Error -
+
+ @@ -384,7 +392,8 @@ public okhttp3.Call credentialListAsync(String userID, String sort, List * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 List of credentials (passkeys) -
0 Error -
+
+ @@ -460,7 +469,8 @@ private okhttp3.Call socialAccountCreateValidateBeforeCall(String userID, Social * @return SocialAccount * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 Social account has been created -
0 Error -
+
+ @@ -479,7 +489,8 @@ public SocialAccount socialAccountCreate(String userID, SocialAccountCreateReq s * @return ApiResponse<SocialAccount> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 Social account has been created -
0 Error -
+
+ @@ -500,7 +511,8 @@ public ApiResponse socialAccountCreateWithHttpInfo(String userID, * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 Social account has been created -
0 Error -
+
+ @@ -523,7 +535,8 @@ public okhttp3.Call socialAccountCreateAsync(String userID, SocialAccountCreateR * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 Social account has been created -
0 Error -
+
+ @@ -605,7 +618,8 @@ private okhttp3.Call socialAccountListValidateBeforeCall(String sort, List +
Response Details
Status Code Description Response Headers
200 List of social accounts -
0 Error -
+ @@ -626,7 +640,8 @@ public SocialAccountList socialAccountList(String sort, List filter, Int * @return ApiResponse<SocialAccountList> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 List of social accounts -
0 Error -
+
+ @@ -649,7 +664,8 @@ public ApiResponse socialAccountListWithHttpInfo(String sort, * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 List of social accounts -
0 Error -
+
+ @@ -669,7 +685,8 @@ public okhttp3.Call socialAccountListAsync(String sort, List filter, Int * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 List of social accounts -
0 Error -
+
+ @@ -738,7 +755,8 @@ private okhttp3.Call userCreateValidateBeforeCall(UserCreateReq userCreateReq, f * @return User * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 User has been created -
0 Error -
+
+ @@ -756,7 +774,8 @@ public User userCreate(UserCreateReq userCreateReq) throws ApiException { * @return ApiResponse<User> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 User has been created -
0 Error -
+
+ @@ -776,7 +795,8 @@ public ApiResponse userCreateWithHttpInfo(UserCreateReq userCreateReq) thr * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 User has been created -
0 Error -
+
+ @@ -796,7 +816,8 @@ public okhttp3.Call userCreateAsync(UserCreateReq userCreateReq, final ApiCallba * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 User has been created -
0 Error -
+
+ @@ -865,7 +886,8 @@ private okhttp3.Call userDeleteValidateBeforeCall(String userID, final ApiCallba * @return GenericRsp * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 Operation succeeded -
0 Error -
+
+ @@ -883,7 +905,8 @@ public GenericRsp userDelete(String userID) throws ApiException { * @return ApiResponse<GenericRsp> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 Operation succeeded -
0 Error -
+
+ @@ -903,7 +926,8 @@ public ApiResponse userDeleteWithHttpInfo(String userID) throws ApiE * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 Operation succeeded -
0 Error -
+
+ @@ -923,7 +947,8 @@ public okhttp3.Call userDeleteAsync(String userID, final ApiCallback * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 Operation succeeded -
0 Error -
+
+ @@ -992,7 +1017,8 @@ private okhttp3.Call userGetValidateBeforeCall(String userID, final ApiCallback * @return User * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 User has been returned -
0 Error -
+
+ @@ -1010,7 +1036,8 @@ public User userGet(String userID) throws ApiException { * @return ApiResponse<User> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 User has been returned -
0 Error -
+
+ @@ -1030,7 +1057,8 @@ public ApiResponse userGetWithHttpInfo(String userID) throws ApiException * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 User has been returned -
0 Error -
+
+ @@ -1054,7 +1082,8 @@ public okhttp3.Call userGetAsync(String userID, final ApiCallback _callbac * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 User has been returned -
0 Error -
+
+ @@ -1143,7 +1172,8 @@ private okhttp3.Call userSocialAccountListValidateBeforeCall(String userID, Stri * @return List<SocialAccount> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 List of social accounts -
0 Error -
+
+ @@ -1165,7 +1195,8 @@ public List userSocialAccountList(String userID, String sort, Lis * @return ApiResponse<List<SocialAccount>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 List of social accounts -
0 Error -
+
+ @@ -1189,7 +1220,8 @@ public ApiResponse> userSocialAccountListWithHttpInfo(String * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 List of social accounts -
0 Error -
+
+ @@ -1210,7 +1242,8 @@ public okhttp3.Call userSocialAccountListAsync(String userID, String sort, List< * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 List of social accounts -
0 Error -
+
+ @@ -1286,7 +1319,8 @@ private okhttp3.Call userUpdateValidateBeforeCall(String userID, UserUpdateReq u * @return User * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 User has been updated -
0 Error -
+
+ @@ -1305,7 +1339,8 @@ public User userUpdate(String userID, UserUpdateReq userUpdateReq) throws ApiExc * @return ApiResponse<User> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 User has been updated -
0 Error -
+
+ @@ -1326,7 +1361,8 @@ public ApiResponse userUpdateWithHttpInfo(String userID, UserUpdateReq use * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 User has been updated -
0 Error -
+
+ diff --git a/src/main/java/com/corbado/generated/api/WebhookEndpointsApi.java b/src/main/java/com/corbado/generated/api/WebhookEndpointsApi.java new file mode 100644 index 0000000..da6c17d --- /dev/null +++ b/src/main/java/com/corbado/generated/api/WebhookEndpointsApi.java @@ -0,0 +1,462 @@ +/* + * Corbado Backend API + * # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@corbado.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.corbado.generated.api; + +import com.corbado.generated.invoker.ApiCallback; +import com.corbado.generated.invoker.ApiClient; +import com.corbado.generated.invoker.ApiException; +import com.corbado.generated.invoker.ApiResponse; +import com.corbado.generated.invoker.Configuration; +import com.corbado.generated.invoker.Pair; +import com.corbado.generated.invoker.ProgressRequestBody; +import com.corbado.generated.invoker.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + +import com.corbado.generated.model.ErrorRsp; +import com.corbado.generated.model.GenericRsp; +import com.corbado.generated.model.WebhookEndpoint; +import com.corbado.generated.model.WebhookEndpointCreateReq; +import com.corbado.generated.model.WebhookEndpointList; + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class WebhookEndpointsApi { + private ApiClient localVarApiClient; + private int localHostIndex; + private String localCustomBaseUrl; + + public WebhookEndpointsApi() { + this(Configuration.getDefaultApiClient()); + } + + public WebhookEndpointsApi(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + + /** + * Build call for webhookEndpointCreate + * @param webhookEndpointCreateReq (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details +
Response Details
Status Code Description Response Headers
200 User has been updated -
0 Error -
+ + + + +
Response Details
Status Code Description Response Headers
200 Webhook endpoint has been created -
0 Error -
+ */ + public okhttp3.Call webhookEndpointCreateCall(WebhookEndpointCreateReq webhookEndpointCreateReq, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = webhookEndpointCreateReq; + + // create path and map variables + String localVarPath = "/webhookEndpoints"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "basicAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call webhookEndpointCreateValidateBeforeCall(WebhookEndpointCreateReq webhookEndpointCreateReq, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'webhookEndpointCreateReq' is set + if (webhookEndpointCreateReq == null) { + throw new ApiException("Missing the required parameter 'webhookEndpointCreateReq' when calling webhookEndpointCreate(Async)"); + } + + return webhookEndpointCreateCall(webhookEndpointCreateReq, _callback); + + } + + /** + * + * Creates a new webhook endpoint + * @param webhookEndpointCreateReq (required) + * @return WebhookEndpoint + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 Webhook endpoint has been created -
0 Error -
+ */ + public WebhookEndpoint webhookEndpointCreate(WebhookEndpointCreateReq webhookEndpointCreateReq) throws ApiException { + ApiResponse localVarResp = webhookEndpointCreateWithHttpInfo(webhookEndpointCreateReq); + return localVarResp.getData(); + } + + /** + * + * Creates a new webhook endpoint + * @param webhookEndpointCreateReq (required) + * @return ApiResponse<WebhookEndpoint> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 Webhook endpoint has been created -
0 Error -
+ */ + public ApiResponse webhookEndpointCreateWithHttpInfo(WebhookEndpointCreateReq webhookEndpointCreateReq) throws ApiException { + okhttp3.Call localVarCall = webhookEndpointCreateValidateBeforeCall(webhookEndpointCreateReq, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Creates a new webhook endpoint + * @param webhookEndpointCreateReq (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 Webhook endpoint has been created -
0 Error -
+ */ + public okhttp3.Call webhookEndpointCreateAsync(WebhookEndpointCreateReq webhookEndpointCreateReq, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = webhookEndpointCreateValidateBeforeCall(webhookEndpointCreateReq, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for webhookEndpointDelete + * @param webhookEndpointID ID of a webhook endpoint (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 Operation succeeded -
0 Error -
+ */ + public okhttp3.Call webhookEndpointDeleteCall(String webhookEndpointID, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/webhookEndpoints/{webhookEndpointID}" + .replace("{" + "webhookEndpointID" + "}", localVarApiClient.escapeString(webhookEndpointID.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "basicAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call webhookEndpointDeleteValidateBeforeCall(String webhookEndpointID, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'webhookEndpointID' is set + if (webhookEndpointID == null) { + throw new ApiException("Missing the required parameter 'webhookEndpointID' when calling webhookEndpointDelete(Async)"); + } + + return webhookEndpointDeleteCall(webhookEndpointID, _callback); + + } + + /** + * + * Deletes an existing webhook endpoint + * @param webhookEndpointID ID of a webhook endpoint (required) + * @return GenericRsp + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 Operation succeeded -
0 Error -
+ */ + public GenericRsp webhookEndpointDelete(String webhookEndpointID) throws ApiException { + ApiResponse localVarResp = webhookEndpointDeleteWithHttpInfo(webhookEndpointID); + return localVarResp.getData(); + } + + /** + * + * Deletes an existing webhook endpoint + * @param webhookEndpointID ID of a webhook endpoint (required) + * @return ApiResponse<GenericRsp> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 Operation succeeded -
0 Error -
+ */ + public ApiResponse webhookEndpointDeleteWithHttpInfo(String webhookEndpointID) throws ApiException { + okhttp3.Call localVarCall = webhookEndpointDeleteValidateBeforeCall(webhookEndpointID, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Deletes an existing webhook endpoint + * @param webhookEndpointID ID of a webhook endpoint (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 Operation succeeded -
0 Error -
+ */ + public okhttp3.Call webhookEndpointDeleteAsync(String webhookEndpointID, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = webhookEndpointDeleteValidateBeforeCall(webhookEndpointID, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for webhookEndpointList + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 List of webhook endpoints -
0 Error -
+ */ + public okhttp3.Call webhookEndpointListCall(final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/webhookEndpoints"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "basicAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call webhookEndpointListValidateBeforeCall(final ApiCallback _callback) throws ApiException { + return webhookEndpointListCall(_callback); + + } + + /** + * + * Returns a list of webhook endpoints + * @return WebhookEndpointList + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 List of webhook endpoints -
0 Error -
+ */ + public WebhookEndpointList webhookEndpointList() throws ApiException { + ApiResponse localVarResp = webhookEndpointListWithHttpInfo(); + return localVarResp.getData(); + } + + /** + * + * Returns a list of webhook endpoints + * @return ApiResponse<WebhookEndpointList> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 List of webhook endpoints -
0 Error -
+ */ + public ApiResponse webhookEndpointListWithHttpInfo() throws ApiException { + okhttp3.Call localVarCall = webhookEndpointListValidateBeforeCall(null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Returns a list of webhook endpoints + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 List of webhook endpoints -
0 Error -
+ */ + public okhttp3.Call webhookEndpointListAsync(final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = webhookEndpointListValidateBeforeCall(_callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } +} diff --git a/src/main/java/com/corbado/generated/invoker/ApiClient.java b/src/main/java/com/corbado/generated/invoker/ApiClient.java index 0f34ac9..b401f53 100644 --- a/src/main/java/com/corbado/generated/invoker/ApiClient.java +++ b/src/main/java/com/corbado/generated/invoker/ApiClient.java @@ -735,6 +735,31 @@ public List parameterToPairs(String collectionFormat, String name, Collect return params; } + /** + * Formats the specified free-form query parameters to a list of {@code Pair} objects. + * + * @param value The free-form query parameters. + * @return A list of {@code Pair} objects. + */ + public List freeFormParameterToPairs(Object value) { + List params = new ArrayList<>(); + + // preconditions + if (value == null || !(value instanceof Map )) { + return params; + } + + @SuppressWarnings("unchecked") + final Map valuesMap = (Map) value; + + for (Map.Entry entry : valuesMap.entrySet()) { + params.add(new Pair(entry.getKey(), parameterToString(entry.getValue()))); + } + + return params; + } + + /** * Formats the specified collection path parameter to a string value. * @@ -1173,10 +1198,6 @@ public Call buildCall(String baseUrl, String path, String method, List que * @throws com.corbado.generated.invoker.ApiException If fail to serialize the request body object */ public Request buildRequest(String baseUrl, String path, String method, List queryParams, List collectionQueryParams, Object body, Map headerParams, Map cookieParams, Map formParams, String[] authNames, ApiCallback callback) throws ApiException { - // aggregate queryParams (non-collection) and collectionQueryParams into allQueryParams - List allQueryParams = new ArrayList(queryParams); - allQueryParams.addAll(collectionQueryParams); - final String url = buildUrl(baseUrl, path, queryParams, collectionQueryParams); // prepare HTTP request body @@ -1204,10 +1225,12 @@ public Request buildRequest(String baseUrl, String path, String method, List updatedQueryParams = new ArrayList<>(queryParams); + // update parameters with authentication settings - updateParamsForAuth(authNames, allQueryParams, headerParams, cookieParams, requestBodyToString(reqBody), method, URI.create(url)); + updateParamsForAuth(authNames, updatedQueryParams, headerParams, cookieParams, requestBodyToString(reqBody), method, URI.create(url)); - final Request.Builder reqBuilder = new Request.Builder().url(url); + final Request.Builder reqBuilder = new Request.Builder().url(buildUrl(baseUrl, path, updatedQueryParams, collectionQueryParams)); processHeaderParams(headerParams, reqBuilder); processCookieParams(cookieParams, reqBuilder); diff --git a/src/main/java/com/corbado/generated/invoker/ApiException.java b/src/main/java/com/corbado/generated/invoker/ApiException.java index 5613511..84ce720 100644 --- a/src/main/java/com/corbado/generated/invoker/ApiException.java +++ b/src/main/java/com/corbado/generated/invoker/ApiException.java @@ -21,7 +21,7 @@ *

ApiException class.

*/ @SuppressWarnings("serial") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-13T12:08:31.183817564Z[Etc/UTC]", comments = "Generator version: 7.8.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") public class ApiException extends Exception { private static final long serialVersionUID = 1L; diff --git a/src/main/java/com/corbado/generated/invoker/Configuration.java b/src/main/java/com/corbado/generated/invoker/Configuration.java index c1074ad..79f48e4 100644 --- a/src/main/java/com/corbado/generated/invoker/Configuration.java +++ b/src/main/java/com/corbado/generated/invoker/Configuration.java @@ -13,7 +13,7 @@ package com.corbado.generated.invoker; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-13T12:08:31.183817564Z[Etc/UTC]", comments = "Generator version: 7.8.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") public class Configuration { public static final String VERSION = "1.0.0"; diff --git a/src/main/java/com/corbado/generated/invoker/JSON.java b/src/main/java/com/corbado/generated/invoker/JSON.java index de018af..11ccb02 100644 --- a/src/main/java/com/corbado/generated/invoker/JSON.java +++ b/src/main/java/com/corbado/generated/invoker/JSON.java @@ -93,6 +93,7 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapter(OffsetDateTime.class, offsetDateTimeTypeAdapter); gsonBuilder.registerTypeAdapter(LocalDate.class, localDateTypeAdapter); gsonBuilder.registerTypeAdapter(byte[].class, byteArrayAdapter); + gsonBuilder.registerTypeAdapterFactory(new com.corbado.generated.model.AaguidDetails.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.corbado.generated.model.AuthEvent.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.corbado.generated.model.AuthEventCreateReq.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.corbado.generated.model.Challenge.CustomTypeAdapterFactory()); @@ -105,6 +106,7 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new com.corbado.generated.model.ConnectTokenDataPasskeyAppend.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.corbado.generated.model.ConnectTokenDataPasskeyDelete.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.corbado.generated.model.ConnectTokenDataPasskeyList.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.corbado.generated.model.ConnectTokenDataPasskeyLogin.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.corbado.generated.model.ConnectTokenList.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.corbado.generated.model.ConnectTokenUpdateReq.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.corbado.generated.model.Credential.CustomTypeAdapterFactory()); @@ -153,6 +155,9 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new com.corbado.generated.model.User.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.corbado.generated.model.UserCreateReq.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.corbado.generated.model.UserUpdateReq.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.corbado.generated.model.WebhookEndpoint.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.corbado.generated.model.WebhookEndpointCreateReq.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.corbado.generated.model.WebhookEndpointList.CustomTypeAdapterFactory()); gson = gsonBuilder.create(); } diff --git a/src/main/java/com/corbado/generated/invoker/Pair.java b/src/main/java/com/corbado/generated/invoker/Pair.java index d7cb63c..5f2a82c 100644 --- a/src/main/java/com/corbado/generated/invoker/Pair.java +++ b/src/main/java/com/corbado/generated/invoker/Pair.java @@ -13,7 +13,7 @@ package com.corbado.generated.invoker; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-13T12:08:31.183817564Z[Etc/UTC]", comments = "Generator version: 7.8.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") public class Pair { private String name = ""; private String value = ""; diff --git a/src/main/java/com/corbado/generated/invoker/ServerConfiguration.java b/src/main/java/com/corbado/generated/invoker/ServerConfiguration.java index d5cf3ca..c1d5ce3 100644 --- a/src/main/java/com/corbado/generated/invoker/ServerConfiguration.java +++ b/src/main/java/com/corbado/generated/invoker/ServerConfiguration.java @@ -1,3 +1,16 @@ +/* + * Corbado Backend API + * # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@corbado.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package com.corbado.generated.invoker; import java.util.Map; @@ -5,7 +18,7 @@ /** * Representing a Server configuration. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-13T12:08:31.183817564Z[Etc/UTC]", comments = "Generator version: 7.8.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") public class ServerConfiguration { public String URL; public String description; diff --git a/src/main/java/com/corbado/generated/invoker/ServerVariable.java b/src/main/java/com/corbado/generated/invoker/ServerVariable.java index 5ac1cce..dbf829c 100644 --- a/src/main/java/com/corbado/generated/invoker/ServerVariable.java +++ b/src/main/java/com/corbado/generated/invoker/ServerVariable.java @@ -1,3 +1,16 @@ +/* + * Corbado Backend API + * # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@corbado.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package com.corbado.generated.invoker; import java.util.HashSet; @@ -5,7 +18,7 @@ /** * Representing a Server Variable for server URL template substitution. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-13T12:08:31.183817564Z[Etc/UTC]", comments = "Generator version: 7.8.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") public class ServerVariable { public String description; public String defaultValue; diff --git a/src/main/java/com/corbado/generated/invoker/StringUtil.java b/src/main/java/com/corbado/generated/invoker/StringUtil.java index c8b2323..b1e8f51 100644 --- a/src/main/java/com/corbado/generated/invoker/StringUtil.java +++ b/src/main/java/com/corbado/generated/invoker/StringUtil.java @@ -16,7 +16,7 @@ import java.util.Collection; import java.util.Iterator; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-13T12:08:31.183817564Z[Etc/UTC]", comments = "Generator version: 7.8.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") public class StringUtil { /** * Check if the given array contains the given value (with case-insensitive comparison). diff --git a/src/main/java/com/corbado/generated/invoker/auth/ApiKeyAuth.java b/src/main/java/com/corbado/generated/invoker/auth/ApiKeyAuth.java index 832d638..88ea60a 100644 --- a/src/main/java/com/corbado/generated/invoker/auth/ApiKeyAuth.java +++ b/src/main/java/com/corbado/generated/invoker/auth/ApiKeyAuth.java @@ -20,7 +20,7 @@ import java.util.Map; import java.util.List; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-13T12:08:31.183817564Z[Etc/UTC]", comments = "Generator version: 7.8.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") public class ApiKeyAuth implements Authentication { private final String location; private final String paramName; diff --git a/src/main/java/com/corbado/generated/invoker/auth/HttpBearerAuth.java b/src/main/java/com/corbado/generated/invoker/auth/HttpBearerAuth.java index e7b6f57..63cb33b 100644 --- a/src/main/java/com/corbado/generated/invoker/auth/HttpBearerAuth.java +++ b/src/main/java/com/corbado/generated/invoker/auth/HttpBearerAuth.java @@ -22,7 +22,7 @@ import java.util.Optional; import java.util.function.Supplier; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-13T12:08:31.183817564Z[Etc/UTC]", comments = "Generator version: 7.8.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") public class HttpBearerAuth implements Authentication { private final String scheme; private Supplier tokenSupplier; diff --git a/src/main/java/com/corbado/generated/model/AaguidDetails.java b/src/main/java/com/corbado/generated/model/AaguidDetails.java new file mode 100644 index 0000000..cd45c7d --- /dev/null +++ b/src/main/java/com/corbado/generated/model/AaguidDetails.java @@ -0,0 +1,276 @@ +/* + * Corbado Backend API + * # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@corbado.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.corbado.generated.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.corbado.generated.invoker.JSON; + +/** + * AaguidDetails + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") +public class AaguidDetails { + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; + + public static final String SERIALIZED_NAME_ICON_LIGHT = "iconLight"; + @SerializedName(SERIALIZED_NAME_ICON_LIGHT) + @javax.annotation.Nonnull + private String iconLight; + + public static final String SERIALIZED_NAME_ICON_DARK = "iconDark"; + @SerializedName(SERIALIZED_NAME_ICON_DARK) + @javax.annotation.Nonnull + private String iconDark; + + public AaguidDetails() { + } + + public AaguidDetails name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public AaguidDetails iconLight(@javax.annotation.Nonnull String iconLight) { + this.iconLight = iconLight; + return this; + } + + /** + * Get iconLight + * @return iconLight + */ + @javax.annotation.Nonnull + public String getIconLight() { + return iconLight; + } + + public void setIconLight(@javax.annotation.Nonnull String iconLight) { + this.iconLight = iconLight; + } + + + public AaguidDetails iconDark(@javax.annotation.Nonnull String iconDark) { + this.iconDark = iconDark; + return this; + } + + /** + * Get iconDark + * @return iconDark + */ + @javax.annotation.Nonnull + public String getIconDark() { + return iconDark; + } + + public void setIconDark(@javax.annotation.Nonnull String iconDark) { + this.iconDark = iconDark; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AaguidDetails aaguidDetails = (AaguidDetails) o; + return Objects.equals(this.name, aaguidDetails.name) && + Objects.equals(this.iconLight, aaguidDetails.iconLight) && + Objects.equals(this.iconDark, aaguidDetails.iconDark); + } + + @Override + public int hashCode() { + return Objects.hash(name, iconLight, iconDark); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AaguidDetails {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" iconLight: ").append(toIndentedString(iconLight)).append("\n"); + sb.append(" iconDark: ").append(toIndentedString(iconDark)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("name"); + openapiFields.add("iconLight"); + openapiFields.add("iconDark"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("name"); + openapiRequiredFields.add("iconLight"); + openapiRequiredFields.add("iconDark"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AaguidDetails + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AaguidDetails.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in AaguidDetails is not found in the empty JSON string", AaguidDetails.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!AaguidDetails.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AaguidDetails` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : AaguidDetails.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + if (!jsonObj.get("iconLight").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `iconLight` to be a primitive type in the JSON string but got `%s`", jsonObj.get("iconLight").toString())); + } + if (!jsonObj.get("iconDark").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `iconDark` to be a primitive type in the JSON string but got `%s`", jsonObj.get("iconDark").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AaguidDetails.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AaguidDetails' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AaguidDetails.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AaguidDetails value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public AaguidDetails read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AaguidDetails given an JSON string + * + * @param jsonString JSON string + * @return An instance of AaguidDetails + * @throws IOException if the JSON string is invalid with respect to AaguidDetails + */ + public static AaguidDetails fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AaguidDetails.class); + } + + /** + * Convert an instance of AaguidDetails to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/corbado/generated/model/AbstractOpenApiSchema.java b/src/main/java/com/corbado/generated/model/AbstractOpenApiSchema.java index 0b36fce..5c03cc7 100644 --- a/src/main/java/com/corbado/generated/model/AbstractOpenApiSchema.java +++ b/src/main/java/com/corbado/generated/model/AbstractOpenApiSchema.java @@ -21,7 +21,7 @@ /** * Abstract class for oneOf,anyOf schemas defined in OpenAPI spec */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-13T12:08:31.183817564Z[Etc/UTC]", comments = "Generator version: 7.8.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") public abstract class AbstractOpenApiSchema { // store the actual instance of the schema/object diff --git a/src/main/java/com/corbado/generated/model/AuthEvent.java b/src/main/java/com/corbado/generated/model/AuthEvent.java index ff10cd4..22465c6 100644 --- a/src/main/java/com/corbado/generated/model/AuthEvent.java +++ b/src/main/java/com/corbado/generated/model/AuthEvent.java @@ -40,7 +40,6 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; @@ -52,40 +51,47 @@ /** * AuthEvent */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-13T12:08:31.183817564Z[Etc/UTC]", comments = "Generator version: 7.8.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") public class AuthEvent { public static final String SERIALIZED_NAME_AUTH_EVENT_I_D = "authEventID"; @SerializedName(SERIALIZED_NAME_AUTH_EVENT_I_D) + @javax.annotation.Nonnull private String authEventID; public static final String SERIALIZED_NAME_USER_I_D = "userID"; @SerializedName(SERIALIZED_NAME_USER_I_D) + @javax.annotation.Nonnull private String userID; public static final String SERIALIZED_NAME_USERNAME = "username"; @SerializedName(SERIALIZED_NAME_USERNAME) + @javax.annotation.Nonnull private String username; public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) + @javax.annotation.Nonnull private AuthEventType eventType; public static final String SERIALIZED_NAME_METHOD = "method"; @SerializedName(SERIALIZED_NAME_METHOD) + @javax.annotation.Nonnull private AuthEventMethod method; public static final String SERIALIZED_NAME_CREATED = "created"; @SerializedName(SERIALIZED_NAME_CREATED) + @javax.annotation.Nonnull private String created; public static final String SERIALIZED_NAME_STATUS = "status"; @SerializedName(SERIALIZED_NAME_STATUS) + @javax.annotation.Nonnull private AuthEventStatus status; public AuthEvent() { } - public AuthEvent authEventID(String authEventID) { + public AuthEvent authEventID(@javax.annotation.Nonnull String authEventID) { this.authEventID = authEventID; return this; } @@ -99,12 +105,12 @@ public String getAuthEventID() { return authEventID; } - public void setAuthEventID(String authEventID) { + public void setAuthEventID(@javax.annotation.Nonnull String authEventID) { this.authEventID = authEventID; } - public AuthEvent userID(String userID) { + public AuthEvent userID(@javax.annotation.Nonnull String userID) { this.userID = userID; return this; } @@ -118,12 +124,12 @@ public String getUserID() { return userID; } - public void setUserID(String userID) { + public void setUserID(@javax.annotation.Nonnull String userID) { this.userID = userID; } - public AuthEvent username(String username) { + public AuthEvent username(@javax.annotation.Nonnull String username) { this.username = username; return this; } @@ -137,12 +143,12 @@ public String getUsername() { return username; } - public void setUsername(String username) { + public void setUsername(@javax.annotation.Nonnull String username) { this.username = username; } - public AuthEvent eventType(AuthEventType eventType) { + public AuthEvent eventType(@javax.annotation.Nonnull AuthEventType eventType) { this.eventType = eventType; return this; } @@ -156,12 +162,12 @@ public AuthEventType getEventType() { return eventType; } - public void setEventType(AuthEventType eventType) { + public void setEventType(@javax.annotation.Nonnull AuthEventType eventType) { this.eventType = eventType; } - public AuthEvent method(AuthEventMethod method) { + public AuthEvent method(@javax.annotation.Nonnull AuthEventMethod method) { this.method = method; return this; } @@ -175,12 +181,12 @@ public AuthEventMethod getMethod() { return method; } - public void setMethod(AuthEventMethod method) { + public void setMethod(@javax.annotation.Nonnull AuthEventMethod method) { this.method = method; } - public AuthEvent created(String created) { + public AuthEvent created(@javax.annotation.Nonnull String created) { this.created = created; return this; } @@ -194,12 +200,12 @@ public String getCreated() { return created; } - public void setCreated(String created) { + public void setCreated(@javax.annotation.Nonnull String created) { this.created = created; } - public AuthEvent status(AuthEventStatus status) { + public AuthEvent status(@javax.annotation.Nonnull AuthEventStatus status) { this.status = status; return this; } @@ -213,7 +219,7 @@ public AuthEventStatus getStatus() { return status; } - public void setStatus(AuthEventStatus status) { + public void setStatus(@javax.annotation.Nonnull AuthEventStatus status) { this.status = status; } diff --git a/src/main/java/com/corbado/generated/model/AuthEventCreateReq.java b/src/main/java/com/corbado/generated/model/AuthEventCreateReq.java index f3803b2..53ba4c3 100644 --- a/src/main/java/com/corbado/generated/model/AuthEventCreateReq.java +++ b/src/main/java/com/corbado/generated/model/AuthEventCreateReq.java @@ -41,7 +41,6 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; @@ -53,32 +52,37 @@ /** * AuthEventCreateReq */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-13T12:08:31.183817564Z[Etc/UTC]", comments = "Generator version: 7.8.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") public class AuthEventCreateReq { public static final String SERIALIZED_NAME_USERNAME = "username"; @SerializedName(SERIALIZED_NAME_USERNAME) + @javax.annotation.Nonnull private String username; public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) + @javax.annotation.Nonnull private AuthEventType eventType; public static final String SERIALIZED_NAME_METHOD = "method"; @SerializedName(SERIALIZED_NAME_METHOD) + @javax.annotation.Nonnull private AuthEventMethod method; public static final String SERIALIZED_NAME_STATUS = "status"; @SerializedName(SERIALIZED_NAME_STATUS) + @javax.annotation.Nonnull private AuthEventStatus status; public static final String SERIALIZED_NAME_CLIENT_INFORMATION = "clientInformation"; @SerializedName(SERIALIZED_NAME_CLIENT_INFORMATION) + @javax.annotation.Nonnull private ClientInformation clientInformation; public AuthEventCreateReq() { } - public AuthEventCreateReq username(String username) { + public AuthEventCreateReq username(@javax.annotation.Nonnull String username) { this.username = username; return this; } @@ -92,12 +96,12 @@ public String getUsername() { return username; } - public void setUsername(String username) { + public void setUsername(@javax.annotation.Nonnull String username) { this.username = username; } - public AuthEventCreateReq eventType(AuthEventType eventType) { + public AuthEventCreateReq eventType(@javax.annotation.Nonnull AuthEventType eventType) { this.eventType = eventType; return this; } @@ -111,12 +115,12 @@ public AuthEventType getEventType() { return eventType; } - public void setEventType(AuthEventType eventType) { + public void setEventType(@javax.annotation.Nonnull AuthEventType eventType) { this.eventType = eventType; } - public AuthEventCreateReq method(AuthEventMethod method) { + public AuthEventCreateReq method(@javax.annotation.Nonnull AuthEventMethod method) { this.method = method; return this; } @@ -130,12 +134,12 @@ public AuthEventMethod getMethod() { return method; } - public void setMethod(AuthEventMethod method) { + public void setMethod(@javax.annotation.Nonnull AuthEventMethod method) { this.method = method; } - public AuthEventCreateReq status(AuthEventStatus status) { + public AuthEventCreateReq status(@javax.annotation.Nonnull AuthEventStatus status) { this.status = status; return this; } @@ -149,12 +153,12 @@ public AuthEventStatus getStatus() { return status; } - public void setStatus(AuthEventStatus status) { + public void setStatus(@javax.annotation.Nonnull AuthEventStatus status) { this.status = status; } - public AuthEventCreateReq clientInformation(ClientInformation clientInformation) { + public AuthEventCreateReq clientInformation(@javax.annotation.Nonnull ClientInformation clientInformation) { this.clientInformation = clientInformation; return this; } @@ -168,7 +172,7 @@ public ClientInformation getClientInformation() { return clientInformation; } - public void setClientInformation(ClientInformation clientInformation) { + public void setClientInformation(@javax.annotation.Nonnull ClientInformation clientInformation) { this.clientInformation = clientInformation; } diff --git a/src/main/java/com/corbado/generated/model/Challenge.java b/src/main/java/com/corbado/generated/model/Challenge.java index 3924320..1ce0c7e 100644 --- a/src/main/java/com/corbado/generated/model/Challenge.java +++ b/src/main/java/com/corbado/generated/model/Challenge.java @@ -39,7 +39,6 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; @@ -51,32 +50,42 @@ /** * Challenge */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-13T12:08:31.183817564Z[Etc/UTC]", comments = "Generator version: 7.8.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") public class Challenge { public static final String SERIALIZED_NAME_CHALLENGE_I_D = "challengeID"; @SerializedName(SERIALIZED_NAME_CHALLENGE_I_D) + @javax.annotation.Nonnull private String challengeID; public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nonnull private ChallengeType type; public static final String SERIALIZED_NAME_IDENTIFIER_VALUE = "identifierValue"; @SerializedName(SERIALIZED_NAME_IDENTIFIER_VALUE) + @javax.annotation.Nonnull private String identifierValue; public static final String SERIALIZED_NAME_VALUE = "value"; @SerializedName(SERIALIZED_NAME_VALUE) + @javax.annotation.Nonnull private String value; + public static final String SERIALIZED_NAME_EXPIRES = "expires"; + @SerializedName(SERIALIZED_NAME_EXPIRES) + @javax.annotation.Nonnull + private Long expires; + public static final String SERIALIZED_NAME_STATUS = "status"; @SerializedName(SERIALIZED_NAME_STATUS) + @javax.annotation.Nonnull private ChallengeStatus status; public Challenge() { } - public Challenge challengeID(String challengeID) { + public Challenge challengeID(@javax.annotation.Nonnull String challengeID) { this.challengeID = challengeID; return this; } @@ -90,12 +99,12 @@ public String getChallengeID() { return challengeID; } - public void setChallengeID(String challengeID) { + public void setChallengeID(@javax.annotation.Nonnull String challengeID) { this.challengeID = challengeID; } - public Challenge type(ChallengeType type) { + public Challenge type(@javax.annotation.Nonnull ChallengeType type) { this.type = type; return this; } @@ -109,12 +118,12 @@ public ChallengeType getType() { return type; } - public void setType(ChallengeType type) { + public void setType(@javax.annotation.Nonnull ChallengeType type) { this.type = type; } - public Challenge identifierValue(String identifierValue) { + public Challenge identifierValue(@javax.annotation.Nonnull String identifierValue) { this.identifierValue = identifierValue; return this; } @@ -128,12 +137,12 @@ public String getIdentifierValue() { return identifierValue; } - public void setIdentifierValue(String identifierValue) { + public void setIdentifierValue(@javax.annotation.Nonnull String identifierValue) { this.identifierValue = identifierValue; } - public Challenge value(String value) { + public Challenge value(@javax.annotation.Nonnull String value) { this.value = value; return this; } @@ -147,12 +156,31 @@ public String getValue() { return value; } - public void setValue(String value) { + public void setValue(@javax.annotation.Nonnull String value) { this.value = value; } - public Challenge status(ChallengeStatus status) { + public Challenge expires(@javax.annotation.Nonnull Long expires) { + this.expires = expires; + return this; + } + + /** + * Get expires + * @return expires + */ + @javax.annotation.Nonnull + public Long getExpires() { + return expires; + } + + public void setExpires(@javax.annotation.Nonnull Long expires) { + this.expires = expires; + } + + + public Challenge status(@javax.annotation.Nonnull ChallengeStatus status) { this.status = status; return this; } @@ -166,7 +194,7 @@ public ChallengeStatus getStatus() { return status; } - public void setStatus(ChallengeStatus status) { + public void setStatus(@javax.annotation.Nonnull ChallengeStatus status) { this.status = status; } @@ -185,12 +213,13 @@ public boolean equals(Object o) { Objects.equals(this.type, challenge.type) && Objects.equals(this.identifierValue, challenge.identifierValue) && Objects.equals(this.value, challenge.value) && + Objects.equals(this.expires, challenge.expires) && Objects.equals(this.status, challenge.status); } @Override public int hashCode() { - return Objects.hash(challengeID, type, identifierValue, value, status); + return Objects.hash(challengeID, type, identifierValue, value, expires, status); } @Override @@ -201,6 +230,7 @@ public String toString() { sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" identifierValue: ").append(toIndentedString(identifierValue)).append("\n"); sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append(" expires: ").append(toIndentedString(expires)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append("}"); return sb.toString(); @@ -228,6 +258,7 @@ private String toIndentedString(Object o) { openapiFields.add("type"); openapiFields.add("identifierValue"); openapiFields.add("value"); + openapiFields.add("expires"); openapiFields.add("status"); // a set of required properties/fields (JSON key names) @@ -236,6 +267,7 @@ private String toIndentedString(Object o) { openapiRequiredFields.add("type"); openapiRequiredFields.add("identifierValue"); openapiRequiredFields.add("value"); + openapiRequiredFields.add("expires"); openapiRequiredFields.add("status"); } diff --git a/src/main/java/com/corbado/generated/model/ChallengeCreateReq.java b/src/main/java/com/corbado/generated/model/ChallengeCreateReq.java index 6435c40..1903eb1 100644 --- a/src/main/java/com/corbado/generated/model/ChallengeCreateReq.java +++ b/src/main/java/com/corbado/generated/model/ChallengeCreateReq.java @@ -39,7 +39,6 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; @@ -51,28 +50,37 @@ /** * ChallengeCreateReq */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-13T12:08:31.183817564Z[Etc/UTC]", comments = "Generator version: 7.8.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") public class ChallengeCreateReq { public static final String SERIALIZED_NAME_CHALLENGE_TYPE = "challengeType"; @SerializedName(SERIALIZED_NAME_CHALLENGE_TYPE) + @javax.annotation.Nonnull private ChallengeType challengeType; public static final String SERIALIZED_NAME_IDENTIFIER_VALUE = "identifierValue"; @SerializedName(SERIALIZED_NAME_IDENTIFIER_VALUE) + @javax.annotation.Nonnull private String identifierValue; public static final String SERIALIZED_NAME_CHALLENGE_METADATA = "challengeMetadata"; @SerializedName(SERIALIZED_NAME_CHALLENGE_METADATA) + @javax.annotation.Nullable private Object challengeMetadata; + public static final String SERIALIZED_NAME_LIFETIME_SECONDS = "lifetimeSeconds"; + @SerializedName(SERIALIZED_NAME_LIFETIME_SECONDS) + @javax.annotation.Nullable + private Integer lifetimeSeconds; + public static final String SERIALIZED_NAME_CLIENT_INFORMATION = "clientInformation"; @SerializedName(SERIALIZED_NAME_CLIENT_INFORMATION) + @javax.annotation.Nonnull private ClientInformation clientInformation; public ChallengeCreateReq() { } - public ChallengeCreateReq challengeType(ChallengeType challengeType) { + public ChallengeCreateReq challengeType(@javax.annotation.Nonnull ChallengeType challengeType) { this.challengeType = challengeType; return this; } @@ -86,12 +94,12 @@ public ChallengeType getChallengeType() { return challengeType; } - public void setChallengeType(ChallengeType challengeType) { + public void setChallengeType(@javax.annotation.Nonnull ChallengeType challengeType) { this.challengeType = challengeType; } - public ChallengeCreateReq identifierValue(String identifierValue) { + public ChallengeCreateReq identifierValue(@javax.annotation.Nonnull String identifierValue) { this.identifierValue = identifierValue; return this; } @@ -105,12 +113,12 @@ public String getIdentifierValue() { return identifierValue; } - public void setIdentifierValue(String identifierValue) { + public void setIdentifierValue(@javax.annotation.Nonnull String identifierValue) { this.identifierValue = identifierValue; } - public ChallengeCreateReq challengeMetadata(Object challengeMetadata) { + public ChallengeCreateReq challengeMetadata(@javax.annotation.Nullable Object challengeMetadata) { this.challengeMetadata = challengeMetadata; return this; } @@ -124,12 +132,31 @@ public Object getChallengeMetadata() { return challengeMetadata; } - public void setChallengeMetadata(Object challengeMetadata) { + public void setChallengeMetadata(@javax.annotation.Nullable Object challengeMetadata) { this.challengeMetadata = challengeMetadata; } - public ChallengeCreateReq clientInformation(ClientInformation clientInformation) { + public ChallengeCreateReq lifetimeSeconds(@javax.annotation.Nullable Integer lifetimeSeconds) { + this.lifetimeSeconds = lifetimeSeconds; + return this; + } + + /** + * Get lifetimeSeconds + * @return lifetimeSeconds + */ + @javax.annotation.Nullable + public Integer getLifetimeSeconds() { + return lifetimeSeconds; + } + + public void setLifetimeSeconds(@javax.annotation.Nullable Integer lifetimeSeconds) { + this.lifetimeSeconds = lifetimeSeconds; + } + + + public ChallengeCreateReq clientInformation(@javax.annotation.Nonnull ClientInformation clientInformation) { this.clientInformation = clientInformation; return this; } @@ -143,7 +170,7 @@ public ClientInformation getClientInformation() { return clientInformation; } - public void setClientInformation(ClientInformation clientInformation) { + public void setClientInformation(@javax.annotation.Nonnull ClientInformation clientInformation) { this.clientInformation = clientInformation; } @@ -161,12 +188,13 @@ public boolean equals(Object o) { return Objects.equals(this.challengeType, challengeCreateReq.challengeType) && Objects.equals(this.identifierValue, challengeCreateReq.identifierValue) && Objects.equals(this.challengeMetadata, challengeCreateReq.challengeMetadata) && + Objects.equals(this.lifetimeSeconds, challengeCreateReq.lifetimeSeconds) && Objects.equals(this.clientInformation, challengeCreateReq.clientInformation); } @Override public int hashCode() { - return Objects.hash(challengeType, identifierValue, challengeMetadata, clientInformation); + return Objects.hash(challengeType, identifierValue, challengeMetadata, lifetimeSeconds, clientInformation); } @Override @@ -176,6 +204,7 @@ public String toString() { sb.append(" challengeType: ").append(toIndentedString(challengeType)).append("\n"); sb.append(" identifierValue: ").append(toIndentedString(identifierValue)).append("\n"); sb.append(" challengeMetadata: ").append(toIndentedString(challengeMetadata)).append("\n"); + sb.append(" lifetimeSeconds: ").append(toIndentedString(lifetimeSeconds)).append("\n"); sb.append(" clientInformation: ").append(toIndentedString(clientInformation)).append("\n"); sb.append("}"); return sb.toString(); @@ -202,6 +231,7 @@ private String toIndentedString(Object o) { openapiFields.add("challengeType"); openapiFields.add("identifierValue"); openapiFields.add("challengeMetadata"); + openapiFields.add("lifetimeSeconds"); openapiFields.add("clientInformation"); // a set of required properties/fields (JSON key names) diff --git a/src/main/java/com/corbado/generated/model/ChallengeUpdateReq.java b/src/main/java/com/corbado/generated/model/ChallengeUpdateReq.java index af96ea0..a7a2b6e 100644 --- a/src/main/java/com/corbado/generated/model/ChallengeUpdateReq.java +++ b/src/main/java/com/corbado/generated/model/ChallengeUpdateReq.java @@ -37,7 +37,6 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; @@ -49,16 +48,17 @@ /** * ChallengeUpdateReq */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-13T12:08:31.183817564Z[Etc/UTC]", comments = "Generator version: 7.8.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") public class ChallengeUpdateReq { public static final String SERIALIZED_NAME_VALUE = "value"; @SerializedName(SERIALIZED_NAME_VALUE) + @javax.annotation.Nonnull private String value; public ChallengeUpdateReq() { } - public ChallengeUpdateReq value(String value) { + public ChallengeUpdateReq value(@javax.annotation.Nonnull String value) { this.value = value; return this; } @@ -72,7 +72,7 @@ public String getValue() { return value; } - public void setValue(String value) { + public void setValue(@javax.annotation.Nonnull String value) { this.value = value; } diff --git a/src/main/java/com/corbado/generated/model/ClientInformation.java b/src/main/java/com/corbado/generated/model/ClientInformation.java index fd04999..bb8049b 100644 --- a/src/main/java/com/corbado/generated/model/ClientInformation.java +++ b/src/main/java/com/corbado/generated/model/ClientInformation.java @@ -38,7 +38,6 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; @@ -50,44 +49,57 @@ /** * ClientInformation */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-13T12:08:31.183817564Z[Etc/UTC]", comments = "Generator version: 7.8.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") public class ClientInformation { public static final String SERIALIZED_NAME_REMOTE_ADDRESS = "remoteAddress"; @SerializedName(SERIALIZED_NAME_REMOTE_ADDRESS) + @javax.annotation.Nonnull private String remoteAddress; public static final String SERIALIZED_NAME_USER_AGENT = "userAgent"; @SerializedName(SERIALIZED_NAME_USER_AGENT) + @javax.annotation.Nonnull private String userAgent; public static final String SERIALIZED_NAME_CLIENT_ENV_HANDLE = "clientEnvHandle"; @SerializedName(SERIALIZED_NAME_CLIENT_ENV_HANDLE) + @javax.annotation.Nullable private String clientEnvHandle; public static final String SERIALIZED_NAME_JAVASCRIPT_FINGERPRINT = "javascriptFingerprint"; @SerializedName(SERIALIZED_NAME_JAVASCRIPT_FINGERPRINT) + @javax.annotation.Nullable private String javascriptFingerprint; public static final String SERIALIZED_NAME_JAVA_SCRIPT_HIGH_ENTROPY = "javaScriptHighEntropy"; @SerializedName(SERIALIZED_NAME_JAVA_SCRIPT_HIGH_ENTROPY) + @javax.annotation.Nullable private JavaScriptHighEntropy javaScriptHighEntropy; public static final String SERIALIZED_NAME_BLUETOOTH_AVAILABLE = "bluetoothAvailable"; @SerializedName(SERIALIZED_NAME_BLUETOOTH_AVAILABLE) + @javax.annotation.Nullable private Boolean bluetoothAvailable; public static final String SERIALIZED_NAME_PASSWORD_MANAGER_AVAILABLE = "passwordManagerAvailable"; @SerializedName(SERIALIZED_NAME_PASSWORD_MANAGER_AVAILABLE) + @javax.annotation.Nullable private Boolean passwordManagerAvailable; public static final String SERIALIZED_NAME_USER_VERIFYING_PLATFORM_AUTHENTICATOR_AVAILABLE = "userVerifyingPlatformAuthenticatorAvailable"; @SerializedName(SERIALIZED_NAME_USER_VERIFYING_PLATFORM_AUTHENTICATOR_AVAILABLE) + @javax.annotation.Nonnull private Boolean userVerifyingPlatformAuthenticatorAvailable; + public static final String SERIALIZED_NAME_CONDITIONAL_MEDIATION_AVAILABLE = "conditionalMediationAvailable"; + @SerializedName(SERIALIZED_NAME_CONDITIONAL_MEDIATION_AVAILABLE) + @javax.annotation.Nonnull + private Boolean conditionalMediationAvailable; + public ClientInformation() { } - public ClientInformation remoteAddress(String remoteAddress) { + public ClientInformation remoteAddress(@javax.annotation.Nonnull String remoteAddress) { this.remoteAddress = remoteAddress; return this; } @@ -101,12 +113,12 @@ public String getRemoteAddress() { return remoteAddress; } - public void setRemoteAddress(String remoteAddress) { + public void setRemoteAddress(@javax.annotation.Nonnull String remoteAddress) { this.remoteAddress = remoteAddress; } - public ClientInformation userAgent(String userAgent) { + public ClientInformation userAgent(@javax.annotation.Nonnull String userAgent) { this.userAgent = userAgent; return this; } @@ -120,12 +132,12 @@ public String getUserAgent() { return userAgent; } - public void setUserAgent(String userAgent) { + public void setUserAgent(@javax.annotation.Nonnull String userAgent) { this.userAgent = userAgent; } - public ClientInformation clientEnvHandle(String clientEnvHandle) { + public ClientInformation clientEnvHandle(@javax.annotation.Nullable String clientEnvHandle) { this.clientEnvHandle = clientEnvHandle; return this; } @@ -139,12 +151,12 @@ public String getClientEnvHandle() { return clientEnvHandle; } - public void setClientEnvHandle(String clientEnvHandle) { + public void setClientEnvHandle(@javax.annotation.Nullable String clientEnvHandle) { this.clientEnvHandle = clientEnvHandle; } - public ClientInformation javascriptFingerprint(String javascriptFingerprint) { + public ClientInformation javascriptFingerprint(@javax.annotation.Nullable String javascriptFingerprint) { this.javascriptFingerprint = javascriptFingerprint; return this; } @@ -158,12 +170,12 @@ public String getJavascriptFingerprint() { return javascriptFingerprint; } - public void setJavascriptFingerprint(String javascriptFingerprint) { + public void setJavascriptFingerprint(@javax.annotation.Nullable String javascriptFingerprint) { this.javascriptFingerprint = javascriptFingerprint; } - public ClientInformation javaScriptHighEntropy(JavaScriptHighEntropy javaScriptHighEntropy) { + public ClientInformation javaScriptHighEntropy(@javax.annotation.Nullable JavaScriptHighEntropy javaScriptHighEntropy) { this.javaScriptHighEntropy = javaScriptHighEntropy; return this; } @@ -177,12 +189,12 @@ public JavaScriptHighEntropy getJavaScriptHighEntropy() { return javaScriptHighEntropy; } - public void setJavaScriptHighEntropy(JavaScriptHighEntropy javaScriptHighEntropy) { + public void setJavaScriptHighEntropy(@javax.annotation.Nullable JavaScriptHighEntropy javaScriptHighEntropy) { this.javaScriptHighEntropy = javaScriptHighEntropy; } - public ClientInformation bluetoothAvailable(Boolean bluetoothAvailable) { + public ClientInformation bluetoothAvailable(@javax.annotation.Nullable Boolean bluetoothAvailable) { this.bluetoothAvailable = bluetoothAvailable; return this; } @@ -196,12 +208,12 @@ public Boolean getBluetoothAvailable() { return bluetoothAvailable; } - public void setBluetoothAvailable(Boolean bluetoothAvailable) { + public void setBluetoothAvailable(@javax.annotation.Nullable Boolean bluetoothAvailable) { this.bluetoothAvailable = bluetoothAvailable; } - public ClientInformation passwordManagerAvailable(Boolean passwordManagerAvailable) { + public ClientInformation passwordManagerAvailable(@javax.annotation.Nullable Boolean passwordManagerAvailable) { this.passwordManagerAvailable = passwordManagerAvailable; return this; } @@ -215,12 +227,12 @@ public Boolean getPasswordManagerAvailable() { return passwordManagerAvailable; } - public void setPasswordManagerAvailable(Boolean passwordManagerAvailable) { + public void setPasswordManagerAvailable(@javax.annotation.Nullable Boolean passwordManagerAvailable) { this.passwordManagerAvailable = passwordManagerAvailable; } - public ClientInformation userVerifyingPlatformAuthenticatorAvailable(Boolean userVerifyingPlatformAuthenticatorAvailable) { + public ClientInformation userVerifyingPlatformAuthenticatorAvailable(@javax.annotation.Nonnull Boolean userVerifyingPlatformAuthenticatorAvailable) { this.userVerifyingPlatformAuthenticatorAvailable = userVerifyingPlatformAuthenticatorAvailable; return this; } @@ -234,11 +246,30 @@ public Boolean getUserVerifyingPlatformAuthenticatorAvailable() { return userVerifyingPlatformAuthenticatorAvailable; } - public void setUserVerifyingPlatformAuthenticatorAvailable(Boolean userVerifyingPlatformAuthenticatorAvailable) { + public void setUserVerifyingPlatformAuthenticatorAvailable(@javax.annotation.Nonnull Boolean userVerifyingPlatformAuthenticatorAvailable) { this.userVerifyingPlatformAuthenticatorAvailable = userVerifyingPlatformAuthenticatorAvailable; } + public ClientInformation conditionalMediationAvailable(@javax.annotation.Nonnull Boolean conditionalMediationAvailable) { + this.conditionalMediationAvailable = conditionalMediationAvailable; + return this; + } + + /** + * Get conditionalMediationAvailable + * @return conditionalMediationAvailable + */ + @javax.annotation.Nonnull + public Boolean getConditionalMediationAvailable() { + return conditionalMediationAvailable; + } + + public void setConditionalMediationAvailable(@javax.annotation.Nonnull Boolean conditionalMediationAvailable) { + this.conditionalMediationAvailable = conditionalMediationAvailable; + } + + @Override public boolean equals(Object o) { @@ -256,12 +287,13 @@ public boolean equals(Object o) { Objects.equals(this.javaScriptHighEntropy, clientInformation.javaScriptHighEntropy) && Objects.equals(this.bluetoothAvailable, clientInformation.bluetoothAvailable) && Objects.equals(this.passwordManagerAvailable, clientInformation.passwordManagerAvailable) && - Objects.equals(this.userVerifyingPlatformAuthenticatorAvailable, clientInformation.userVerifyingPlatformAuthenticatorAvailable); + Objects.equals(this.userVerifyingPlatformAuthenticatorAvailable, clientInformation.userVerifyingPlatformAuthenticatorAvailable) && + Objects.equals(this.conditionalMediationAvailable, clientInformation.conditionalMediationAvailable); } @Override public int hashCode() { - return Objects.hash(remoteAddress, userAgent, clientEnvHandle, javascriptFingerprint, javaScriptHighEntropy, bluetoothAvailable, passwordManagerAvailable, userVerifyingPlatformAuthenticatorAvailable); + return Objects.hash(remoteAddress, userAgent, clientEnvHandle, javascriptFingerprint, javaScriptHighEntropy, bluetoothAvailable, passwordManagerAvailable, userVerifyingPlatformAuthenticatorAvailable, conditionalMediationAvailable); } @Override @@ -276,6 +308,7 @@ public String toString() { sb.append(" bluetoothAvailable: ").append(toIndentedString(bluetoothAvailable)).append("\n"); sb.append(" passwordManagerAvailable: ").append(toIndentedString(passwordManagerAvailable)).append("\n"); sb.append(" userVerifyingPlatformAuthenticatorAvailable: ").append(toIndentedString(userVerifyingPlatformAuthenticatorAvailable)).append("\n"); + sb.append(" conditionalMediationAvailable: ").append(toIndentedString(conditionalMediationAvailable)).append("\n"); sb.append("}"); return sb.toString(); } @@ -306,12 +339,14 @@ private String toIndentedString(Object o) { openapiFields.add("bluetoothAvailable"); openapiFields.add("passwordManagerAvailable"); openapiFields.add("userVerifyingPlatformAuthenticatorAvailable"); + openapiFields.add("conditionalMediationAvailable"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); openapiRequiredFields.add("remoteAddress"); openapiRequiredFields.add("userAgent"); openapiRequiredFields.add("userVerifyingPlatformAuthenticatorAvailable"); + openapiRequiredFields.add("conditionalMediationAvailable"); } /** diff --git a/src/main/java/com/corbado/generated/model/ConnectToken.java b/src/main/java/com/corbado/generated/model/ConnectToken.java index e30a3fa..d7f6250 100644 --- a/src/main/java/com/corbado/generated/model/ConnectToken.java +++ b/src/main/java/com/corbado/generated/model/ConnectToken.java @@ -40,7 +40,6 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; @@ -52,36 +51,42 @@ /** * ConnectToken */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-13T12:08:31.183817564Z[Etc/UTC]", comments = "Generator version: 7.8.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") public class ConnectToken { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull private String id; public static final String SERIALIZED_NAME_TOKEN_TYPE = "tokenType"; @SerializedName(SERIALIZED_NAME_TOKEN_TYPE) + @javax.annotation.Nonnull private ConnectTokenType tokenType; public static final String SERIALIZED_NAME_DATA = "data"; @SerializedName(SERIALIZED_NAME_DATA) + @javax.annotation.Nonnull private ConnectTokenData data; public static final String SERIALIZED_NAME_CONNECT_TOKEN_STATUS = "connectTokenStatus"; @SerializedName(SERIALIZED_NAME_CONNECT_TOKEN_STATUS) + @javax.annotation.Nonnull private ConnectTokenStatus connectTokenStatus; public static final String SERIALIZED_NAME_SECRET = "secret"; @SerializedName(SERIALIZED_NAME_SECRET) + @javax.annotation.Nullable private String secret; public static final String SERIALIZED_NAME_EXPIRES = "expires"; @SerializedName(SERIALIZED_NAME_EXPIRES) + @javax.annotation.Nonnull private Integer expires; public ConnectToken() { } - public ConnectToken id(String id) { + public ConnectToken id(@javax.annotation.Nonnull String id) { this.id = id; return this; } @@ -95,12 +100,12 @@ public String getId() { return id; } - public void setId(String id) { + public void setId(@javax.annotation.Nonnull String id) { this.id = id; } - public ConnectToken tokenType(ConnectTokenType tokenType) { + public ConnectToken tokenType(@javax.annotation.Nonnull ConnectTokenType tokenType) { this.tokenType = tokenType; return this; } @@ -114,12 +119,12 @@ public ConnectTokenType getTokenType() { return tokenType; } - public void setTokenType(ConnectTokenType tokenType) { + public void setTokenType(@javax.annotation.Nonnull ConnectTokenType tokenType) { this.tokenType = tokenType; } - public ConnectToken data(ConnectTokenData data) { + public ConnectToken data(@javax.annotation.Nonnull ConnectTokenData data) { this.data = data; return this; } @@ -133,12 +138,12 @@ public ConnectTokenData getData() { return data; } - public void setData(ConnectTokenData data) { + public void setData(@javax.annotation.Nonnull ConnectTokenData data) { this.data = data; } - public ConnectToken connectTokenStatus(ConnectTokenStatus connectTokenStatus) { + public ConnectToken connectTokenStatus(@javax.annotation.Nonnull ConnectTokenStatus connectTokenStatus) { this.connectTokenStatus = connectTokenStatus; return this; } @@ -152,12 +157,12 @@ public ConnectTokenStatus getConnectTokenStatus() { return connectTokenStatus; } - public void setConnectTokenStatus(ConnectTokenStatus connectTokenStatus) { + public void setConnectTokenStatus(@javax.annotation.Nonnull ConnectTokenStatus connectTokenStatus) { this.connectTokenStatus = connectTokenStatus; } - public ConnectToken secret(String secret) { + public ConnectToken secret(@javax.annotation.Nullable String secret) { this.secret = secret; return this; } @@ -171,12 +176,12 @@ public String getSecret() { return secret; } - public void setSecret(String secret) { + public void setSecret(@javax.annotation.Nullable String secret) { this.secret = secret; } - public ConnectToken expires(Integer expires) { + public ConnectToken expires(@javax.annotation.Nonnull Integer expires) { this.expires = expires; return this; } @@ -190,7 +195,7 @@ public Integer getExpires() { return expires; } - public void setExpires(Integer expires) { + public void setExpires(@javax.annotation.Nonnull Integer expires) { this.expires = expires; } diff --git a/src/main/java/com/corbado/generated/model/ConnectTokenCreateReq.java b/src/main/java/com/corbado/generated/model/ConnectTokenCreateReq.java index de3f3d3..d6d2d49 100644 --- a/src/main/java/com/corbado/generated/model/ConnectTokenCreateReq.java +++ b/src/main/java/com/corbado/generated/model/ConnectTokenCreateReq.java @@ -39,7 +39,6 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; @@ -51,24 +50,27 @@ /** * ConnectTokenCreateReq */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-13T12:08:31.183817564Z[Etc/UTC]", comments = "Generator version: 7.8.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") public class ConnectTokenCreateReq { public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nonnull private ConnectTokenType type; public static final String SERIALIZED_NAME_DATA = "data"; @SerializedName(SERIALIZED_NAME_DATA) + @javax.annotation.Nonnull private ConnectTokenData data; public static final String SERIALIZED_NAME_MAX_LIFETIME_IN_SECONDS = "maxLifetimeInSeconds"; @SerializedName(SERIALIZED_NAME_MAX_LIFETIME_IN_SECONDS) + @javax.annotation.Nullable private Integer maxLifetimeInSeconds; public ConnectTokenCreateReq() { } - public ConnectTokenCreateReq type(ConnectTokenType type) { + public ConnectTokenCreateReq type(@javax.annotation.Nonnull ConnectTokenType type) { this.type = type; return this; } @@ -82,12 +84,12 @@ public ConnectTokenType getType() { return type; } - public void setType(ConnectTokenType type) { + public void setType(@javax.annotation.Nonnull ConnectTokenType type) { this.type = type; } - public ConnectTokenCreateReq data(ConnectTokenData data) { + public ConnectTokenCreateReq data(@javax.annotation.Nonnull ConnectTokenData data) { this.data = data; return this; } @@ -101,12 +103,12 @@ public ConnectTokenData getData() { return data; } - public void setData(ConnectTokenData data) { + public void setData(@javax.annotation.Nonnull ConnectTokenData data) { this.data = data; } - public ConnectTokenCreateReq maxLifetimeInSeconds(Integer maxLifetimeInSeconds) { + public ConnectTokenCreateReq maxLifetimeInSeconds(@javax.annotation.Nullable Integer maxLifetimeInSeconds) { this.maxLifetimeInSeconds = maxLifetimeInSeconds; return this; } @@ -120,7 +122,7 @@ public Integer getMaxLifetimeInSeconds() { return maxLifetimeInSeconds; } - public void setMaxLifetimeInSeconds(Integer maxLifetimeInSeconds) { + public void setMaxLifetimeInSeconds(@javax.annotation.Nullable Integer maxLifetimeInSeconds) { this.maxLifetimeInSeconds = maxLifetimeInSeconds; } diff --git a/src/main/java/com/corbado/generated/model/ConnectTokenData.java b/src/main/java/com/corbado/generated/model/ConnectTokenData.java index 460d62e..e3af016 100644 --- a/src/main/java/com/corbado/generated/model/ConnectTokenData.java +++ b/src/main/java/com/corbado/generated/model/ConnectTokenData.java @@ -17,6 +17,7 @@ import com.corbado.generated.model.ConnectTokenDataPasskeyAppend; import com.corbado.generated.model.ConnectTokenDataPasskeyDelete; import com.corbado.generated.model.ConnectTokenDataPasskeyList; +import com.corbado.generated.model.ConnectTokenDataPasskeyLogin; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -60,7 +61,7 @@ import com.corbado.generated.invoker.JSON; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-13T12:08:31.183817564Z[Etc/UTC]", comments = "Generator version: 7.8.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") public class ConnectTokenData extends AbstractOpenApiSchema { private static final Logger log = Logger.getLogger(ConnectTokenData.class.getName()); @@ -75,6 +76,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { final TypeAdapter adapterConnectTokenDataPasskeyAppend = gson.getDelegateAdapter(this, TypeToken.get(ConnectTokenDataPasskeyAppend.class)); final TypeAdapter adapterConnectTokenDataPasskeyDelete = gson.getDelegateAdapter(this, TypeToken.get(ConnectTokenDataPasskeyDelete.class)); final TypeAdapter adapterConnectTokenDataPasskeyList = gson.getDelegateAdapter(this, TypeToken.get(ConnectTokenDataPasskeyList.class)); + final TypeAdapter adapterConnectTokenDataPasskeyLogin = gson.getDelegateAdapter(this, TypeToken.get(ConnectTokenDataPasskeyLogin.class)); return (TypeAdapter) new TypeAdapter() { @Override @@ -102,7 +104,13 @@ public void write(JsonWriter out, ConnectTokenData value) throws IOException { elementAdapter.write(out, element); return; } - throw new IOException("Failed to serialize as the type doesn't match oneOf schemas: ConnectTokenDataPasskeyAppend, ConnectTokenDataPasskeyDelete, ConnectTokenDataPasskeyList"); + // check if the actual instance is of the type `ConnectTokenDataPasskeyLogin` + if (value.getActualInstance() instanceof ConnectTokenDataPasskeyLogin) { + JsonElement element = adapterConnectTokenDataPasskeyLogin.toJsonTree((ConnectTokenDataPasskeyLogin)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + throw new IOException("Failed to serialize as the type doesn't match oneOf schemas: ConnectTokenDataPasskeyAppend, ConnectTokenDataPasskeyDelete, ConnectTokenDataPasskeyList, ConnectTokenDataPasskeyLogin"); } @Override @@ -150,6 +158,18 @@ public ConnectTokenData read(JsonReader in) throws IOException { errorMessages.add(String.format("Deserialization for ConnectTokenDataPasskeyList failed with `%s`.", e.getMessage())); log.log(Level.FINER, "Input data does not match schema 'ConnectTokenDataPasskeyList'", e); } + // deserialize ConnectTokenDataPasskeyLogin + try { + // validate the JSON object to see if any exception is thrown + ConnectTokenDataPasskeyLogin.validateJsonElement(jsonElement); + actualAdapter = adapterConnectTokenDataPasskeyLogin; + match++; + log.log(Level.FINER, "Input data matches schema 'ConnectTokenDataPasskeyLogin'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format("Deserialization for ConnectTokenDataPasskeyLogin failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'ConnectTokenDataPasskeyLogin'", e); + } if (match == 1) { ConnectTokenData ret = new ConnectTokenData(); @@ -179,6 +199,7 @@ public ConnectTokenData(Object o) { schemas.put("ConnectTokenDataPasskeyAppend", ConnectTokenDataPasskeyAppend.class); schemas.put("ConnectTokenDataPasskeyDelete", ConnectTokenDataPasskeyDelete.class); schemas.put("ConnectTokenDataPasskeyList", ConnectTokenDataPasskeyList.class); + schemas.put("ConnectTokenDataPasskeyLogin", ConnectTokenDataPasskeyLogin.class); } @Override @@ -189,7 +210,7 @@ public Map> getSchemas() { /** * Set the instance that matches the oneOf child schema, check * the instance parameter is valid against the oneOf child schemas: - * ConnectTokenDataPasskeyAppend, ConnectTokenDataPasskeyDelete, ConnectTokenDataPasskeyList + * ConnectTokenDataPasskeyAppend, ConnectTokenDataPasskeyDelete, ConnectTokenDataPasskeyList, ConnectTokenDataPasskeyLogin * * It could be an instance of the 'oneOf' schemas. */ @@ -210,14 +231,19 @@ public void setActualInstance(Object instance) { return; } - throw new RuntimeException("Invalid instance type. Must be ConnectTokenDataPasskeyAppend, ConnectTokenDataPasskeyDelete, ConnectTokenDataPasskeyList"); + if (instance instanceof ConnectTokenDataPasskeyLogin) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException("Invalid instance type. Must be ConnectTokenDataPasskeyAppend, ConnectTokenDataPasskeyDelete, ConnectTokenDataPasskeyList, ConnectTokenDataPasskeyLogin"); } /** * Get the actual instance, which can be the following: - * ConnectTokenDataPasskeyAppend, ConnectTokenDataPasskeyDelete, ConnectTokenDataPasskeyList + * ConnectTokenDataPasskeyAppend, ConnectTokenDataPasskeyDelete, ConnectTokenDataPasskeyList, ConnectTokenDataPasskeyLogin * - * @return The actual instance (ConnectTokenDataPasskeyAppend, ConnectTokenDataPasskeyDelete, ConnectTokenDataPasskeyList) + * @return The actual instance (ConnectTokenDataPasskeyAppend, ConnectTokenDataPasskeyDelete, ConnectTokenDataPasskeyList, ConnectTokenDataPasskeyLogin) */ @SuppressWarnings("unchecked") @Override @@ -235,6 +261,7 @@ public Object getActualInstance() { public ConnectTokenDataPasskeyAppend getConnectTokenDataPasskeyAppend() throws ClassCastException { return (ConnectTokenDataPasskeyAppend)super.getActualInstance(); } + /** * Get the actual instance of `ConnectTokenDataPasskeyDelete`. If the actual instance is not `ConnectTokenDataPasskeyDelete`, * the ClassCastException will be thrown. @@ -245,6 +272,7 @@ public ConnectTokenDataPasskeyAppend getConnectTokenDataPasskeyAppend() throws C public ConnectTokenDataPasskeyDelete getConnectTokenDataPasskeyDelete() throws ClassCastException { return (ConnectTokenDataPasskeyDelete)super.getActualInstance(); } + /** * Get the actual instance of `ConnectTokenDataPasskeyList`. If the actual instance is not `ConnectTokenDataPasskeyList`, * the ClassCastException will be thrown. @@ -256,6 +284,17 @@ public ConnectTokenDataPasskeyList getConnectTokenDataPasskeyList() throws Class return (ConnectTokenDataPasskeyList)super.getActualInstance(); } + /** + * Get the actual instance of `ConnectTokenDataPasskeyLogin`. If the actual instance is not `ConnectTokenDataPasskeyLogin`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `ConnectTokenDataPasskeyLogin` + * @throws ClassCastException if the instance is not `ConnectTokenDataPasskeyLogin` + */ + public ConnectTokenDataPasskeyLogin getConnectTokenDataPasskeyLogin() throws ClassCastException { + return (ConnectTokenDataPasskeyLogin)super.getActualInstance(); + } + /** * Validates the JSON Element and throws an exception if issues found * @@ -290,8 +329,16 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti errorMessages.add(String.format("Deserialization for ConnectTokenDataPasskeyList failed with `%s`.", e.getMessage())); // continue to the next one } + // validate the json string with ConnectTokenDataPasskeyLogin + try { + ConnectTokenDataPasskeyLogin.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add(String.format("Deserialization for ConnectTokenDataPasskeyLogin failed with `%s`.", e.getMessage())); + // continue to the next one + } if (validCount != 1) { - throw new IOException(String.format("The JSON string is invalid for ConnectTokenData with oneOf schemas: ConnectTokenDataPasskeyAppend, ConnectTokenDataPasskeyDelete, ConnectTokenDataPasskeyList. %d class(es) match the result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", validCount, errorMessages, jsonElement.toString())); + throw new IOException(String.format("The JSON string is invalid for ConnectTokenData with oneOf schemas: ConnectTokenDataPasskeyAppend, ConnectTokenDataPasskeyDelete, ConnectTokenDataPasskeyList, ConnectTokenDataPasskeyLogin. %d class(es) match the result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", validCount, errorMessages, jsonElement.toString())); } } diff --git a/src/main/java/com/corbado/generated/model/ConnectTokenDataPasskeyAppend.java b/src/main/java/com/corbado/generated/model/ConnectTokenDataPasskeyAppend.java index 65ede38..d52e6eb 100644 --- a/src/main/java/com/corbado/generated/model/ConnectTokenDataPasskeyAppend.java +++ b/src/main/java/com/corbado/generated/model/ConnectTokenDataPasskeyAppend.java @@ -37,7 +37,6 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; @@ -49,20 +48,22 @@ /** * ConnectTokenDataPasskeyAppend */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-13T12:08:31.183817564Z[Etc/UTC]", comments = "Generator version: 7.8.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") public class ConnectTokenDataPasskeyAppend { public static final String SERIALIZED_NAME_DISPLAY_NAME = "displayName"; @SerializedName(SERIALIZED_NAME_DISPLAY_NAME) + @javax.annotation.Nonnull private String displayName; public static final String SERIALIZED_NAME_IDENTIFIER = "identifier"; @SerializedName(SERIALIZED_NAME_IDENTIFIER) + @javax.annotation.Nonnull private String identifier; public ConnectTokenDataPasskeyAppend() { } - public ConnectTokenDataPasskeyAppend displayName(String displayName) { + public ConnectTokenDataPasskeyAppend displayName(@javax.annotation.Nonnull String displayName) { this.displayName = displayName; return this; } @@ -76,12 +77,12 @@ public String getDisplayName() { return displayName; } - public void setDisplayName(String displayName) { + public void setDisplayName(@javax.annotation.Nonnull String displayName) { this.displayName = displayName; } - public ConnectTokenDataPasskeyAppend identifier(String identifier) { + public ConnectTokenDataPasskeyAppend identifier(@javax.annotation.Nonnull String identifier) { this.identifier = identifier; return this; } @@ -95,7 +96,7 @@ public String getIdentifier() { return identifier; } - public void setIdentifier(String identifier) { + public void setIdentifier(@javax.annotation.Nonnull String identifier) { this.identifier = identifier; } diff --git a/src/main/java/com/corbado/generated/model/ConnectTokenDataPasskeyDelete.java b/src/main/java/com/corbado/generated/model/ConnectTokenDataPasskeyDelete.java index 14cc8e8..262ece1 100644 --- a/src/main/java/com/corbado/generated/model/ConnectTokenDataPasskeyDelete.java +++ b/src/main/java/com/corbado/generated/model/ConnectTokenDataPasskeyDelete.java @@ -37,7 +37,6 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; @@ -49,16 +48,17 @@ /** * ConnectTokenDataPasskeyDelete */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-13T12:08:31.183817564Z[Etc/UTC]", comments = "Generator version: 7.8.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") public class ConnectTokenDataPasskeyDelete { public static final String SERIALIZED_NAME_IDENTIFIER = "identifier"; @SerializedName(SERIALIZED_NAME_IDENTIFIER) + @javax.annotation.Nonnull private String identifier; public ConnectTokenDataPasskeyDelete() { } - public ConnectTokenDataPasskeyDelete identifier(String identifier) { + public ConnectTokenDataPasskeyDelete identifier(@javax.annotation.Nonnull String identifier) { this.identifier = identifier; return this; } @@ -72,7 +72,7 @@ public String getIdentifier() { return identifier; } - public void setIdentifier(String identifier) { + public void setIdentifier(@javax.annotation.Nonnull String identifier) { this.identifier = identifier; } diff --git a/src/main/java/com/corbado/generated/model/ConnectTokenDataPasskeyList.java b/src/main/java/com/corbado/generated/model/ConnectTokenDataPasskeyList.java index 9fe3b98..8b38235 100644 --- a/src/main/java/com/corbado/generated/model/ConnectTokenDataPasskeyList.java +++ b/src/main/java/com/corbado/generated/model/ConnectTokenDataPasskeyList.java @@ -37,7 +37,6 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; @@ -49,16 +48,17 @@ /** * ConnectTokenDataPasskeyList */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-13T12:08:31.183817564Z[Etc/UTC]", comments = "Generator version: 7.8.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") public class ConnectTokenDataPasskeyList { public static final String SERIALIZED_NAME_IDENTIFIER = "identifier"; @SerializedName(SERIALIZED_NAME_IDENTIFIER) + @javax.annotation.Nonnull private String identifier; public ConnectTokenDataPasskeyList() { } - public ConnectTokenDataPasskeyList identifier(String identifier) { + public ConnectTokenDataPasskeyList identifier(@javax.annotation.Nonnull String identifier) { this.identifier = identifier; return this; } @@ -72,7 +72,7 @@ public String getIdentifier() { return identifier; } - public void setIdentifier(String identifier) { + public void setIdentifier(@javax.annotation.Nonnull String identifier) { this.identifier = identifier; } diff --git a/src/main/java/com/corbado/generated/model/ConnectTokenDataPasskeyLogin.java b/src/main/java/com/corbado/generated/model/ConnectTokenDataPasskeyLogin.java new file mode 100644 index 0000000..74fe585 --- /dev/null +++ b/src/main/java/com/corbado/generated/model/ConnectTokenDataPasskeyLogin.java @@ -0,0 +1,214 @@ +/* + * Corbado Backend API + * # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@corbado.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.corbado.generated.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.corbado.generated.invoker.JSON; + +/** + * ConnectTokenDataPasskeyLogin + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") +public class ConnectTokenDataPasskeyLogin { + public static final String SERIALIZED_NAME_IDENTIFIER = "identifier"; + @SerializedName(SERIALIZED_NAME_IDENTIFIER) + @javax.annotation.Nonnull + private String identifier; + + public ConnectTokenDataPasskeyLogin() { + } + + public ConnectTokenDataPasskeyLogin identifier(@javax.annotation.Nonnull String identifier) { + this.identifier = identifier; + return this; + } + + /** + * Get identifier + * @return identifier + */ + @javax.annotation.Nonnull + public String getIdentifier() { + return identifier; + } + + public void setIdentifier(@javax.annotation.Nonnull String identifier) { + this.identifier = identifier; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ConnectTokenDataPasskeyLogin connectTokenDataPasskeyLogin = (ConnectTokenDataPasskeyLogin) o; + return Objects.equals(this.identifier, connectTokenDataPasskeyLogin.identifier); + } + + @Override + public int hashCode() { + return Objects.hash(identifier); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ConnectTokenDataPasskeyLogin {\n"); + sb.append(" identifier: ").append(toIndentedString(identifier)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("identifier"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("identifier"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ConnectTokenDataPasskeyLogin + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ConnectTokenDataPasskeyLogin.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ConnectTokenDataPasskeyLogin is not found in the empty JSON string", ConnectTokenDataPasskeyLogin.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ConnectTokenDataPasskeyLogin.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ConnectTokenDataPasskeyLogin` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ConnectTokenDataPasskeyLogin.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("identifier").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `identifier` to be a primitive type in the JSON string but got `%s`", jsonObj.get("identifier").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ConnectTokenDataPasskeyLogin.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ConnectTokenDataPasskeyLogin' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ConnectTokenDataPasskeyLogin.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ConnectTokenDataPasskeyLogin value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ConnectTokenDataPasskeyLogin read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ConnectTokenDataPasskeyLogin given an JSON string + * + * @param jsonString JSON string + * @return An instance of ConnectTokenDataPasskeyLogin + * @throws IOException if the JSON string is invalid with respect to ConnectTokenDataPasskeyLogin + */ + public static ConnectTokenDataPasskeyLogin fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ConnectTokenDataPasskeyLogin.class); + } + + /** + * Convert an instance of ConnectTokenDataPasskeyLogin to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/corbado/generated/model/ConnectTokenList.java b/src/main/java/com/corbado/generated/model/ConnectTokenList.java index ed033fb..e8e8b7c 100644 --- a/src/main/java/com/corbado/generated/model/ConnectTokenList.java +++ b/src/main/java/com/corbado/generated/model/ConnectTokenList.java @@ -41,7 +41,6 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; @@ -53,20 +52,22 @@ /** * ConnectTokenList */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-13T12:08:31.183817564Z[Etc/UTC]", comments = "Generator version: 7.8.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") public class ConnectTokenList { public static final String SERIALIZED_NAME_CONNECT_TOKENS = "connectTokens"; @SerializedName(SERIALIZED_NAME_CONNECT_TOKENS) + @javax.annotation.Nonnull private List connectTokens = new ArrayList<>(); public static final String SERIALIZED_NAME_PAGING = "paging"; @SerializedName(SERIALIZED_NAME_PAGING) + @javax.annotation.Nonnull private Paging paging; public ConnectTokenList() { } - public ConnectTokenList connectTokens(List connectTokens) { + public ConnectTokenList connectTokens(@javax.annotation.Nonnull List connectTokens) { this.connectTokens = connectTokens; return this; } @@ -88,12 +89,12 @@ public List getConnectTokens() { return connectTokens; } - public void setConnectTokens(List connectTokens) { + public void setConnectTokens(@javax.annotation.Nonnull List connectTokens) { this.connectTokens = connectTokens; } - public ConnectTokenList paging(Paging paging) { + public ConnectTokenList paging(@javax.annotation.Nonnull Paging paging) { this.paging = paging; return this; } @@ -107,7 +108,7 @@ public Paging getPaging() { return paging; } - public void setPaging(Paging paging) { + public void setPaging(@javax.annotation.Nonnull Paging paging) { this.paging = paging; } diff --git a/src/main/java/com/corbado/generated/model/ConnectTokenType.java b/src/main/java/com/corbado/generated/model/ConnectTokenType.java index 97cf6f8..a2bf2fd 100644 --- a/src/main/java/com/corbado/generated/model/ConnectTokenType.java +++ b/src/main/java/com/corbado/generated/model/ConnectTokenType.java @@ -33,7 +33,9 @@ public enum ConnectTokenType { DELETE("passkey-delete"), - LIST("passkey-list"); + LIST("passkey-list"), + + LOGIN("passkey-login"); private String value; diff --git a/src/main/java/com/corbado/generated/model/ConnectTokenUpdateReq.java b/src/main/java/com/corbado/generated/model/ConnectTokenUpdateReq.java index 45d4daa..275c26d 100644 --- a/src/main/java/com/corbado/generated/model/ConnectTokenUpdateReq.java +++ b/src/main/java/com/corbado/generated/model/ConnectTokenUpdateReq.java @@ -38,7 +38,6 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; @@ -50,16 +49,17 @@ /** * ConnectTokenUpdateReq */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-13T12:08:31.183817564Z[Etc/UTC]", comments = "Generator version: 7.8.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") public class ConnectTokenUpdateReq { public static final String SERIALIZED_NAME_STATUS = "status"; @SerializedName(SERIALIZED_NAME_STATUS) + @javax.annotation.Nonnull private ConnectTokenStatus status; public ConnectTokenUpdateReq() { } - public ConnectTokenUpdateReq status(ConnectTokenStatus status) { + public ConnectTokenUpdateReq status(@javax.annotation.Nonnull ConnectTokenStatus status) { this.status = status; return this; } @@ -73,7 +73,7 @@ public ConnectTokenStatus getStatus() { return status; } - public void setStatus(ConnectTokenStatus status) { + public void setStatus(@javax.annotation.Nonnull ConnectTokenStatus status) { this.status = status; } diff --git a/src/main/java/com/corbado/generated/model/Credential.java b/src/main/java/com/corbado/generated/model/Credential.java index 2752d29..42c41da 100644 --- a/src/main/java/com/corbado/generated/model/Credential.java +++ b/src/main/java/com/corbado/generated/model/Credential.java @@ -14,6 +14,7 @@ package com.corbado.generated.model; import java.util.Objects; +import com.corbado.generated.model.AaguidDetails; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -39,7 +40,6 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; @@ -51,18 +51,21 @@ /** * Credential */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-13T12:08:31.183817564Z[Etc/UTC]", comments = "Generator version: 7.8.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") public class Credential { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull private String id; public static final String SERIALIZED_NAME_CREDENTIAL_I_D = "credentialID"; @SerializedName(SERIALIZED_NAME_CREDENTIAL_I_D) + @javax.annotation.Nonnull private String credentialID; public static final String SERIALIZED_NAME_ATTESTATION_TYPE = "attestationType"; @SerializedName(SERIALIZED_NAME_ATTESTATION_TYPE) + @javax.annotation.Nonnull private String attestationType; /** @@ -127,34 +130,42 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti public static final String SERIALIZED_NAME_TRANSPORT = "transport"; @SerializedName(SERIALIZED_NAME_TRANSPORT) + @javax.annotation.Nonnull private List transport = new ArrayList<>(); public static final String SERIALIZED_NAME_BACKUP_ELIGIBLE = "backupEligible"; @SerializedName(SERIALIZED_NAME_BACKUP_ELIGIBLE) + @javax.annotation.Nonnull private Boolean backupEligible; public static final String SERIALIZED_NAME_BACKUP_STATE = "backupState"; @SerializedName(SERIALIZED_NAME_BACKUP_STATE) + @javax.annotation.Nonnull private Boolean backupState; public static final String SERIALIZED_NAME_AUTHENTICATOR_A_A_G_U_I_D = "authenticatorAAGUID"; @SerializedName(SERIALIZED_NAME_AUTHENTICATOR_A_A_G_U_I_D) + @javax.annotation.Nonnull private String authenticatorAAGUID; public static final String SERIALIZED_NAME_SOURCE_O_S = "sourceOS"; @SerializedName(SERIALIZED_NAME_SOURCE_O_S) + @javax.annotation.Nonnull private String sourceOS; public static final String SERIALIZED_NAME_SOURCE_BROWSER = "sourceBrowser"; @SerializedName(SERIALIZED_NAME_SOURCE_BROWSER) + @javax.annotation.Nonnull private String sourceBrowser; public static final String SERIALIZED_NAME_LAST_USED = "lastUsed"; @SerializedName(SERIALIZED_NAME_LAST_USED) + @javax.annotation.Nonnull private String lastUsed; public static final String SERIALIZED_NAME_CREATED = "created"; @SerializedName(SERIALIZED_NAME_CREATED) + @javax.annotation.Nonnull private String created; /** @@ -211,12 +222,18 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti public static final String SERIALIZED_NAME_STATUS = "status"; @SerializedName(SERIALIZED_NAME_STATUS) + @javax.annotation.Nonnull private StatusEnum status; + public static final String SERIALIZED_NAME_AAGUID_DETAILS = "aaguidDetails"; + @SerializedName(SERIALIZED_NAME_AAGUID_DETAILS) + @javax.annotation.Nonnull + private AaguidDetails aaguidDetails; + public Credential() { } - public Credential id(String id) { + public Credential id(@javax.annotation.Nonnull String id) { this.id = id; return this; } @@ -230,12 +247,12 @@ public String getId() { return id; } - public void setId(String id) { + public void setId(@javax.annotation.Nonnull String id) { this.id = id; } - public Credential credentialID(String credentialID) { + public Credential credentialID(@javax.annotation.Nonnull String credentialID) { this.credentialID = credentialID; return this; } @@ -249,12 +266,12 @@ public String getCredentialID() { return credentialID; } - public void setCredentialID(String credentialID) { + public void setCredentialID(@javax.annotation.Nonnull String credentialID) { this.credentialID = credentialID; } - public Credential attestationType(String attestationType) { + public Credential attestationType(@javax.annotation.Nonnull String attestationType) { this.attestationType = attestationType; return this; } @@ -268,12 +285,12 @@ public String getAttestationType() { return attestationType; } - public void setAttestationType(String attestationType) { + public void setAttestationType(@javax.annotation.Nonnull String attestationType) { this.attestationType = attestationType; } - public Credential transport(List transport) { + public Credential transport(@javax.annotation.Nonnull List transport) { this.transport = transport; return this; } @@ -295,12 +312,12 @@ public List getTransport() { return transport; } - public void setTransport(List transport) { + public void setTransport(@javax.annotation.Nonnull List transport) { this.transport = transport; } - public Credential backupEligible(Boolean backupEligible) { + public Credential backupEligible(@javax.annotation.Nonnull Boolean backupEligible) { this.backupEligible = backupEligible; return this; } @@ -314,12 +331,12 @@ public Boolean getBackupEligible() { return backupEligible; } - public void setBackupEligible(Boolean backupEligible) { + public void setBackupEligible(@javax.annotation.Nonnull Boolean backupEligible) { this.backupEligible = backupEligible; } - public Credential backupState(Boolean backupState) { + public Credential backupState(@javax.annotation.Nonnull Boolean backupState) { this.backupState = backupState; return this; } @@ -333,12 +350,12 @@ public Boolean getBackupState() { return backupState; } - public void setBackupState(Boolean backupState) { + public void setBackupState(@javax.annotation.Nonnull Boolean backupState) { this.backupState = backupState; } - public Credential authenticatorAAGUID(String authenticatorAAGUID) { + public Credential authenticatorAAGUID(@javax.annotation.Nonnull String authenticatorAAGUID) { this.authenticatorAAGUID = authenticatorAAGUID; return this; } @@ -352,12 +369,12 @@ public String getAuthenticatorAAGUID() { return authenticatorAAGUID; } - public void setAuthenticatorAAGUID(String authenticatorAAGUID) { + public void setAuthenticatorAAGUID(@javax.annotation.Nonnull String authenticatorAAGUID) { this.authenticatorAAGUID = authenticatorAAGUID; } - public Credential sourceOS(String sourceOS) { + public Credential sourceOS(@javax.annotation.Nonnull String sourceOS) { this.sourceOS = sourceOS; return this; } @@ -371,12 +388,12 @@ public String getSourceOS() { return sourceOS; } - public void setSourceOS(String sourceOS) { + public void setSourceOS(@javax.annotation.Nonnull String sourceOS) { this.sourceOS = sourceOS; } - public Credential sourceBrowser(String sourceBrowser) { + public Credential sourceBrowser(@javax.annotation.Nonnull String sourceBrowser) { this.sourceBrowser = sourceBrowser; return this; } @@ -390,12 +407,12 @@ public String getSourceBrowser() { return sourceBrowser; } - public void setSourceBrowser(String sourceBrowser) { + public void setSourceBrowser(@javax.annotation.Nonnull String sourceBrowser) { this.sourceBrowser = sourceBrowser; } - public Credential lastUsed(String lastUsed) { + public Credential lastUsed(@javax.annotation.Nonnull String lastUsed) { this.lastUsed = lastUsed; return this; } @@ -409,12 +426,12 @@ public String getLastUsed() { return lastUsed; } - public void setLastUsed(String lastUsed) { + public void setLastUsed(@javax.annotation.Nonnull String lastUsed) { this.lastUsed = lastUsed; } - public Credential created(String created) { + public Credential created(@javax.annotation.Nonnull String created) { this.created = created; return this; } @@ -428,12 +445,12 @@ public String getCreated() { return created; } - public void setCreated(String created) { + public void setCreated(@javax.annotation.Nonnull String created) { this.created = created; } - public Credential status(StatusEnum status) { + public Credential status(@javax.annotation.Nonnull StatusEnum status) { this.status = status; return this; } @@ -447,11 +464,30 @@ public StatusEnum getStatus() { return status; } - public void setStatus(StatusEnum status) { + public void setStatus(@javax.annotation.Nonnull StatusEnum status) { this.status = status; } + public Credential aaguidDetails(@javax.annotation.Nonnull AaguidDetails aaguidDetails) { + this.aaguidDetails = aaguidDetails; + return this; + } + + /** + * Get aaguidDetails + * @return aaguidDetails + */ + @javax.annotation.Nonnull + public AaguidDetails getAaguidDetails() { + return aaguidDetails; + } + + public void setAaguidDetails(@javax.annotation.Nonnull AaguidDetails aaguidDetails) { + this.aaguidDetails = aaguidDetails; + } + + @Override public boolean equals(Object o) { @@ -473,12 +509,13 @@ public boolean equals(Object o) { Objects.equals(this.sourceBrowser, credential.sourceBrowser) && Objects.equals(this.lastUsed, credential.lastUsed) && Objects.equals(this.created, credential.created) && - Objects.equals(this.status, credential.status); + Objects.equals(this.status, credential.status) && + Objects.equals(this.aaguidDetails, credential.aaguidDetails); } @Override public int hashCode() { - return Objects.hash(id, credentialID, attestationType, transport, backupEligible, backupState, authenticatorAAGUID, sourceOS, sourceBrowser, lastUsed, created, status); + return Objects.hash(id, credentialID, attestationType, transport, backupEligible, backupState, authenticatorAAGUID, sourceOS, sourceBrowser, lastUsed, created, status, aaguidDetails); } @Override @@ -497,6 +534,7 @@ public String toString() { sb.append(" lastUsed: ").append(toIndentedString(lastUsed)).append("\n"); sb.append(" created: ").append(toIndentedString(created)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" aaguidDetails: ").append(toIndentedString(aaguidDetails)).append("\n"); sb.append("}"); return sb.toString(); } @@ -531,6 +569,7 @@ private String toIndentedString(Object o) { openapiFields.add("lastUsed"); openapiFields.add("created"); openapiFields.add("status"); + openapiFields.add("aaguidDetails"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -546,6 +585,7 @@ private String toIndentedString(Object o) { openapiRequiredFields.add("lastUsed"); openapiRequiredFields.add("created"); openapiRequiredFields.add("status"); + openapiRequiredFields.add("aaguidDetails"); } /** @@ -611,6 +651,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } // validate the required field `status` StatusEnum.validateJsonElement(jsonObj.get("status")); + // validate the required field `aaguidDetails` + AaguidDetails.validateJsonElement(jsonObj.get("aaguidDetails")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/com/corbado/generated/model/CredentialList.java b/src/main/java/com/corbado/generated/model/CredentialList.java index 214b19c..d814ad4 100644 --- a/src/main/java/com/corbado/generated/model/CredentialList.java +++ b/src/main/java/com/corbado/generated/model/CredentialList.java @@ -41,7 +41,6 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; @@ -53,20 +52,22 @@ /** * CredentialList */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-13T12:08:31.183817564Z[Etc/UTC]", comments = "Generator version: 7.8.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") public class CredentialList { public static final String SERIALIZED_NAME_CREDENTIALS = "credentials"; @SerializedName(SERIALIZED_NAME_CREDENTIALS) + @javax.annotation.Nonnull private List credentials = new ArrayList<>(); public static final String SERIALIZED_NAME_PAGING = "paging"; @SerializedName(SERIALIZED_NAME_PAGING) + @javax.annotation.Nonnull private Paging paging; public CredentialList() { } - public CredentialList credentials(List credentials) { + public CredentialList credentials(@javax.annotation.Nonnull List credentials) { this.credentials = credentials; return this; } @@ -88,12 +89,12 @@ public List getCredentials() { return credentials; } - public void setCredentials(List credentials) { + public void setCredentials(@javax.annotation.Nonnull List credentials) { this.credentials = credentials; } - public CredentialList paging(Paging paging) { + public CredentialList paging(@javax.annotation.Nonnull Paging paging) { this.paging = paging; return this; } @@ -107,7 +108,7 @@ public Paging getPaging() { return paging; } - public void setPaging(Paging paging) { + public void setPaging(@javax.annotation.Nonnull Paging paging) { this.paging = paging; } diff --git a/src/main/java/com/corbado/generated/model/DecisionTag.java b/src/main/java/com/corbado/generated/model/DecisionTag.java index b52aac0..0372aa1 100644 --- a/src/main/java/com/corbado/generated/model/DecisionTag.java +++ b/src/main/java/com/corbado/generated/model/DecisionTag.java @@ -63,7 +63,9 @@ public enum DecisionTag { PROCESS_PK_LOGIN_INCOMPLETE("process-pk-login-incomplete"), - PROCESS_PK_LOGIN_CROSS_PLATFORM_COMPLETED("process-pk-login-cross-platform-completed"); + PROCESS_PK_LOGIN_CROSS_PLATFORM_COMPLETED("process-pk-login-cross-platform-completed"), + + DEVICE_LOCAL_PLATFORM_PASSKEY_EXPERIMENT("device-local-platform-passkey-experiment"); private String value; diff --git a/src/main/java/com/corbado/generated/model/DetectionTag.java b/src/main/java/com/corbado/generated/model/DetectionTag.java index e958e18..d0e6087 100644 --- a/src/main/java/com/corbado/generated/model/DetectionTag.java +++ b/src/main/java/com/corbado/generated/model/DetectionTag.java @@ -37,7 +37,6 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; @@ -49,7 +48,7 @@ /** * DetectionTag */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-13T12:08:31.183817564Z[Etc/UTC]", comments = "Generator version: 7.8.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") public class DetectionTag { /** * Gets or Sets category @@ -109,16 +108,18 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti public static final String SERIALIZED_NAME_CATEGORY = "category"; @SerializedName(SERIALIZED_NAME_CATEGORY) + @javax.annotation.Nonnull private CategoryEnum category; public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull private String name; public DetectionTag() { } - public DetectionTag category(CategoryEnum category) { + public DetectionTag category(@javax.annotation.Nonnull CategoryEnum category) { this.category = category; return this; } @@ -132,12 +133,12 @@ public CategoryEnum getCategory() { return category; } - public void setCategory(CategoryEnum category) { + public void setCategory(@javax.annotation.Nonnull CategoryEnum category) { this.category = category; } - public DetectionTag name(String name) { + public DetectionTag name(@javax.annotation.Nonnull String name) { this.name = name; return this; } @@ -151,7 +152,7 @@ public String getName() { return name; } - public void setName(String name) { + public void setName(@javax.annotation.Nonnull String name) { this.name = name; } diff --git a/src/main/java/com/corbado/generated/model/ErrorRsp.java b/src/main/java/com/corbado/generated/model/ErrorRsp.java index 59c25a1..1ea3f26 100644 --- a/src/main/java/com/corbado/generated/model/ErrorRsp.java +++ b/src/main/java/com/corbado/generated/model/ErrorRsp.java @@ -39,7 +39,6 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; @@ -51,44 +50,48 @@ /** * ErrorRsp */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-13T12:08:31.183817564Z[Etc/UTC]", comments = "Generator version: 7.8.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") public class ErrorRsp { public static final String SERIALIZED_NAME_HTTP_STATUS_CODE = "httpStatusCode"; @SerializedName(SERIALIZED_NAME_HTTP_STATUS_CODE) + @javax.annotation.Nonnull private Integer httpStatusCode; public static final String SERIALIZED_NAME_MESSAGE = "message"; @SerializedName(SERIALIZED_NAME_MESSAGE) + @javax.annotation.Nonnull private String message; public static final String SERIALIZED_NAME_REQUEST_DATA = "requestData"; @SerializedName(SERIALIZED_NAME_REQUEST_DATA) + @javax.annotation.Nonnull private RequestData requestData; public static final String SERIALIZED_NAME_RUNTIME = "runtime"; @SerializedName(SERIALIZED_NAME_RUNTIME) + @javax.annotation.Nonnull private Float runtime; public static final String SERIALIZED_NAME_DATA = "data"; @SerializedName(SERIALIZED_NAME_DATA) + @javax.annotation.Nullable private Object data; public static final String SERIALIZED_NAME_ERROR = "error"; @SerializedName(SERIALIZED_NAME_ERROR) + @javax.annotation.Nonnull private ErrorRspAllOfError error; public ErrorRsp() { } - public ErrorRsp httpStatusCode(Integer httpStatusCode) { + public ErrorRsp httpStatusCode(@javax.annotation.Nonnull Integer httpStatusCode) { this.httpStatusCode = httpStatusCode; return this; } /** * HTTP status code of operation - * minimum: 200 - * maximum: 599 * @return httpStatusCode */ @javax.annotation.Nonnull @@ -96,12 +99,12 @@ public Integer getHttpStatusCode() { return httpStatusCode; } - public void setHttpStatusCode(Integer httpStatusCode) { + public void setHttpStatusCode(@javax.annotation.Nonnull Integer httpStatusCode) { this.httpStatusCode = httpStatusCode; } - public ErrorRsp message(String message) { + public ErrorRsp message(@javax.annotation.Nonnull String message) { this.message = message; return this; } @@ -115,12 +118,12 @@ public String getMessage() { return message; } - public void setMessage(String message) { + public void setMessage(@javax.annotation.Nonnull String message) { this.message = message; } - public ErrorRsp requestData(RequestData requestData) { + public ErrorRsp requestData(@javax.annotation.Nonnull RequestData requestData) { this.requestData = requestData; return this; } @@ -134,12 +137,12 @@ public RequestData getRequestData() { return requestData; } - public void setRequestData(RequestData requestData) { + public void setRequestData(@javax.annotation.Nonnull RequestData requestData) { this.requestData = requestData; } - public ErrorRsp runtime(Float runtime) { + public ErrorRsp runtime(@javax.annotation.Nonnull Float runtime) { this.runtime = runtime; return this; } @@ -153,12 +156,12 @@ public Float getRuntime() { return runtime; } - public void setRuntime(Float runtime) { + public void setRuntime(@javax.annotation.Nonnull Float runtime) { this.runtime = runtime; } - public ErrorRsp data(Object data) { + public ErrorRsp data(@javax.annotation.Nullable Object data) { this.data = data; return this; } @@ -172,12 +175,12 @@ public Object getData() { return data; } - public void setData(Object data) { + public void setData(@javax.annotation.Nullable Object data) { this.data = data; } - public ErrorRsp error(ErrorRspAllOfError error) { + public ErrorRsp error(@javax.annotation.Nonnull ErrorRspAllOfError error) { this.error = error; return this; } @@ -191,7 +194,7 @@ public ErrorRspAllOfError getError() { return error; } - public void setError(ErrorRspAllOfError error) { + public void setError(@javax.annotation.Nonnull ErrorRspAllOfError error) { this.error = error; } diff --git a/src/main/java/com/corbado/generated/model/ErrorRspAllOfError.java b/src/main/java/com/corbado/generated/model/ErrorRspAllOfError.java index 4cc8f65..e534ba4 100644 --- a/src/main/java/com/corbado/generated/model/ErrorRspAllOfError.java +++ b/src/main/java/com/corbado/generated/model/ErrorRspAllOfError.java @@ -40,7 +40,6 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; @@ -52,28 +51,32 @@ /** * ErrorRspAllOfError */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-13T12:08:31.183817564Z[Etc/UTC]", comments = "Generator version: 7.8.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") public class ErrorRspAllOfError { public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nonnull private String type; public static final String SERIALIZED_NAME_DETAILS = "details"; @SerializedName(SERIALIZED_NAME_DETAILS) + @javax.annotation.Nullable private String details; public static final String SERIALIZED_NAME_VALIDATION = "validation"; @SerializedName(SERIALIZED_NAME_VALIDATION) + @javax.annotation.Nullable private List validation = new ArrayList<>(); public static final String SERIALIZED_NAME_LINKS = "links"; @SerializedName(SERIALIZED_NAME_LINKS) + @javax.annotation.Nullable private List links = new ArrayList<>(); public ErrorRspAllOfError() { } - public ErrorRspAllOfError type(String type) { + public ErrorRspAllOfError type(@javax.annotation.Nonnull String type) { this.type = type; return this; } @@ -87,12 +90,12 @@ public String getType() { return type; } - public void setType(String type) { + public void setType(@javax.annotation.Nonnull String type) { this.type = type; } - public ErrorRspAllOfError details(String details) { + public ErrorRspAllOfError details(@javax.annotation.Nullable String details) { this.details = details; return this; } @@ -106,12 +109,12 @@ public String getDetails() { return details; } - public void setDetails(String details) { + public void setDetails(@javax.annotation.Nullable String details) { this.details = details; } - public ErrorRspAllOfError validation(List validation) { + public ErrorRspAllOfError validation(@javax.annotation.Nullable List validation) { this.validation = validation; return this; } @@ -133,12 +136,12 @@ public List getValidation() { return validation; } - public void setValidation(List validation) { + public void setValidation(@javax.annotation.Nullable List validation) { this.validation = validation; } - public ErrorRspAllOfError links(List links) { + public ErrorRspAllOfError links(@javax.annotation.Nullable List links) { this.links = links; return this; } @@ -155,12 +158,12 @@ public ErrorRspAllOfError addLinksItem(String linksItem) { * Additional links to help understand the error * @return links */ - @javax.annotation.Nonnull + @javax.annotation.Nullable public List getLinks() { return links; } - public void setLinks(List links) { + public void setLinks(@javax.annotation.Nullable List links) { this.links = links; } @@ -224,7 +227,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); openapiRequiredFields.add("type"); - openapiRequiredFields.add("links"); } /** @@ -275,10 +277,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti }; } } - // ensure the required json array is present - if (jsonObj.get("links") == null) { - throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); - } else if (!jsonObj.get("links").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("links") != null && !jsonObj.get("links").isJsonNull() && !jsonObj.get("links").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `links` to be an array in the JSON string but got `%s`", jsonObj.get("links").toString())); } } diff --git a/src/main/java/com/corbado/generated/model/ErrorRspAllOfErrorValidation.java b/src/main/java/com/corbado/generated/model/ErrorRspAllOfErrorValidation.java index 8a8a509..978de1a 100644 --- a/src/main/java/com/corbado/generated/model/ErrorRspAllOfErrorValidation.java +++ b/src/main/java/com/corbado/generated/model/ErrorRspAllOfErrorValidation.java @@ -37,7 +37,6 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; @@ -49,20 +48,22 @@ /** * ErrorRspAllOfErrorValidation */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-13T12:08:31.183817564Z[Etc/UTC]", comments = "Generator version: 7.8.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") public class ErrorRspAllOfErrorValidation { public static final String SERIALIZED_NAME_FIELD = "field"; @SerializedName(SERIALIZED_NAME_FIELD) + @javax.annotation.Nonnull private String field; public static final String SERIALIZED_NAME_MESSAGE = "message"; @SerializedName(SERIALIZED_NAME_MESSAGE) + @javax.annotation.Nonnull private String message; public ErrorRspAllOfErrorValidation() { } - public ErrorRspAllOfErrorValidation field(String field) { + public ErrorRspAllOfErrorValidation field(@javax.annotation.Nonnull String field) { this.field = field; return this; } @@ -76,12 +77,12 @@ public String getField() { return field; } - public void setField(String field) { + public void setField(@javax.annotation.Nonnull String field) { this.field = field; } - public ErrorRspAllOfErrorValidation message(String message) { + public ErrorRspAllOfErrorValidation message(@javax.annotation.Nonnull String message) { this.message = message; return this; } @@ -95,7 +96,7 @@ public String getMessage() { return message; } - public void setMessage(String message) { + public void setMessage(@javax.annotation.Nonnull String message) { this.message = message; } diff --git a/src/main/java/com/corbado/generated/model/GenericRsp.java b/src/main/java/com/corbado/generated/model/GenericRsp.java index e748774..3213fb7 100644 --- a/src/main/java/com/corbado/generated/model/GenericRsp.java +++ b/src/main/java/com/corbado/generated/model/GenericRsp.java @@ -38,7 +38,6 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; @@ -50,36 +49,38 @@ /** * GenericRsp */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-13T12:08:31.183817564Z[Etc/UTC]", comments = "Generator version: 7.8.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") public class GenericRsp { public static final String SERIALIZED_NAME_HTTP_STATUS_CODE = "httpStatusCode"; @SerializedName(SERIALIZED_NAME_HTTP_STATUS_CODE) + @javax.annotation.Nonnull private Integer httpStatusCode; public static final String SERIALIZED_NAME_MESSAGE = "message"; @SerializedName(SERIALIZED_NAME_MESSAGE) + @javax.annotation.Nonnull private String message; public static final String SERIALIZED_NAME_REQUEST_DATA = "requestData"; @SerializedName(SERIALIZED_NAME_REQUEST_DATA) + @javax.annotation.Nonnull private RequestData requestData; public static final String SERIALIZED_NAME_RUNTIME = "runtime"; @SerializedName(SERIALIZED_NAME_RUNTIME) + @javax.annotation.Nonnull private Float runtime; public GenericRsp() { } - public GenericRsp httpStatusCode(Integer httpStatusCode) { + public GenericRsp httpStatusCode(@javax.annotation.Nonnull Integer httpStatusCode) { this.httpStatusCode = httpStatusCode; return this; } /** * HTTP status code of operation - * minimum: 200 - * maximum: 599 * @return httpStatusCode */ @javax.annotation.Nonnull @@ -87,12 +88,12 @@ public Integer getHttpStatusCode() { return httpStatusCode; } - public void setHttpStatusCode(Integer httpStatusCode) { + public void setHttpStatusCode(@javax.annotation.Nonnull Integer httpStatusCode) { this.httpStatusCode = httpStatusCode; } - public GenericRsp message(String message) { + public GenericRsp message(@javax.annotation.Nonnull String message) { this.message = message; return this; } @@ -106,12 +107,12 @@ public String getMessage() { return message; } - public void setMessage(String message) { + public void setMessage(@javax.annotation.Nonnull String message) { this.message = message; } - public GenericRsp requestData(RequestData requestData) { + public GenericRsp requestData(@javax.annotation.Nonnull RequestData requestData) { this.requestData = requestData; return this; } @@ -125,12 +126,12 @@ public RequestData getRequestData() { return requestData; } - public void setRequestData(RequestData requestData) { + public void setRequestData(@javax.annotation.Nonnull RequestData requestData) { this.requestData = requestData; } - public GenericRsp runtime(Float runtime) { + public GenericRsp runtime(@javax.annotation.Nonnull Float runtime) { this.runtime = runtime; return this; } @@ -144,7 +145,7 @@ public Float getRuntime() { return runtime; } - public void setRuntime(Float runtime) { + public void setRuntime(@javax.annotation.Nonnull Float runtime) { this.runtime = runtime; } diff --git a/src/main/java/com/corbado/generated/model/Identifier.java b/src/main/java/com/corbado/generated/model/Identifier.java index e83fd2f..0d8a519 100644 --- a/src/main/java/com/corbado/generated/model/Identifier.java +++ b/src/main/java/com/corbado/generated/model/Identifier.java @@ -39,7 +39,6 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; @@ -51,32 +50,37 @@ /** * Identifier */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-13T12:08:31.183817564Z[Etc/UTC]", comments = "Generator version: 7.8.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") public class Identifier { public static final String SERIALIZED_NAME_IDENTIFIER_I_D = "identifierID"; @SerializedName(SERIALIZED_NAME_IDENTIFIER_I_D) + @javax.annotation.Nonnull private String identifierID; public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nonnull private IdentifierType type; public static final String SERIALIZED_NAME_VALUE = "value"; @SerializedName(SERIALIZED_NAME_VALUE) + @javax.annotation.Nonnull private String value; public static final String SERIALIZED_NAME_STATUS = "status"; @SerializedName(SERIALIZED_NAME_STATUS) + @javax.annotation.Nonnull private IdentifierStatus status; public static final String SERIALIZED_NAME_USER_I_D = "userID"; @SerializedName(SERIALIZED_NAME_USER_I_D) + @javax.annotation.Nonnull private String userID; public Identifier() { } - public Identifier identifierID(String identifierID) { + public Identifier identifierID(@javax.annotation.Nonnull String identifierID) { this.identifierID = identifierID; return this; } @@ -90,12 +94,12 @@ public String getIdentifierID() { return identifierID; } - public void setIdentifierID(String identifierID) { + public void setIdentifierID(@javax.annotation.Nonnull String identifierID) { this.identifierID = identifierID; } - public Identifier type(IdentifierType type) { + public Identifier type(@javax.annotation.Nonnull IdentifierType type) { this.type = type; return this; } @@ -109,12 +113,12 @@ public IdentifierType getType() { return type; } - public void setType(IdentifierType type) { + public void setType(@javax.annotation.Nonnull IdentifierType type) { this.type = type; } - public Identifier value(String value) { + public Identifier value(@javax.annotation.Nonnull String value) { this.value = value; return this; } @@ -128,12 +132,12 @@ public String getValue() { return value; } - public void setValue(String value) { + public void setValue(@javax.annotation.Nonnull String value) { this.value = value; } - public Identifier status(IdentifierStatus status) { + public Identifier status(@javax.annotation.Nonnull IdentifierStatus status) { this.status = status; return this; } @@ -147,12 +151,12 @@ public IdentifierStatus getStatus() { return status; } - public void setStatus(IdentifierStatus status) { + public void setStatus(@javax.annotation.Nonnull IdentifierStatus status) { this.status = status; } - public Identifier userID(String userID) { + public Identifier userID(@javax.annotation.Nonnull String userID) { this.userID = userID; return this; } @@ -166,7 +170,7 @@ public String getUserID() { return userID; } - public void setUserID(String userID) { + public void setUserID(@javax.annotation.Nonnull String userID) { this.userID = userID; } diff --git a/src/main/java/com/corbado/generated/model/IdentifierCreateReq.java b/src/main/java/com/corbado/generated/model/IdentifierCreateReq.java index 7b9f256..95abece 100644 --- a/src/main/java/com/corbado/generated/model/IdentifierCreateReq.java +++ b/src/main/java/com/corbado/generated/model/IdentifierCreateReq.java @@ -39,7 +39,6 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; @@ -51,24 +50,27 @@ /** * IdentifierCreateReq */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-13T12:08:31.183817564Z[Etc/UTC]", comments = "Generator version: 7.8.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") public class IdentifierCreateReq { public static final String SERIALIZED_NAME_IDENTIFIER_TYPE = "identifierType"; @SerializedName(SERIALIZED_NAME_IDENTIFIER_TYPE) + @javax.annotation.Nonnull private IdentifierType identifierType; public static final String SERIALIZED_NAME_IDENTIFIER_VALUE = "identifierValue"; @SerializedName(SERIALIZED_NAME_IDENTIFIER_VALUE) + @javax.annotation.Nonnull private String identifierValue; public static final String SERIALIZED_NAME_STATUS = "status"; @SerializedName(SERIALIZED_NAME_STATUS) + @javax.annotation.Nonnull private IdentifierStatus status; public IdentifierCreateReq() { } - public IdentifierCreateReq identifierType(IdentifierType identifierType) { + public IdentifierCreateReq identifierType(@javax.annotation.Nonnull IdentifierType identifierType) { this.identifierType = identifierType; return this; } @@ -82,12 +84,12 @@ public IdentifierType getIdentifierType() { return identifierType; } - public void setIdentifierType(IdentifierType identifierType) { + public void setIdentifierType(@javax.annotation.Nonnull IdentifierType identifierType) { this.identifierType = identifierType; } - public IdentifierCreateReq identifierValue(String identifierValue) { + public IdentifierCreateReq identifierValue(@javax.annotation.Nonnull String identifierValue) { this.identifierValue = identifierValue; return this; } @@ -101,12 +103,12 @@ public String getIdentifierValue() { return identifierValue; } - public void setIdentifierValue(String identifierValue) { + public void setIdentifierValue(@javax.annotation.Nonnull String identifierValue) { this.identifierValue = identifierValue; } - public IdentifierCreateReq status(IdentifierStatus status) { + public IdentifierCreateReq status(@javax.annotation.Nonnull IdentifierStatus status) { this.status = status; return this; } @@ -120,7 +122,7 @@ public IdentifierStatus getStatus() { return status; } - public void setStatus(IdentifierStatus status) { + public void setStatus(@javax.annotation.Nonnull IdentifierStatus status) { this.status = status; } diff --git a/src/main/java/com/corbado/generated/model/IdentifierList.java b/src/main/java/com/corbado/generated/model/IdentifierList.java index d32d040..2a8cd6c 100644 --- a/src/main/java/com/corbado/generated/model/IdentifierList.java +++ b/src/main/java/com/corbado/generated/model/IdentifierList.java @@ -41,7 +41,6 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; @@ -53,20 +52,22 @@ /** * IdentifierList */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-13T12:08:31.183817564Z[Etc/UTC]", comments = "Generator version: 7.8.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") public class IdentifierList { public static final String SERIALIZED_NAME_IDENTIFIERS = "identifiers"; @SerializedName(SERIALIZED_NAME_IDENTIFIERS) + @javax.annotation.Nonnull private List identifiers = new ArrayList<>(); public static final String SERIALIZED_NAME_PAGING = "paging"; @SerializedName(SERIALIZED_NAME_PAGING) + @javax.annotation.Nonnull private Paging paging; public IdentifierList() { } - public IdentifierList identifiers(List identifiers) { + public IdentifierList identifiers(@javax.annotation.Nonnull List identifiers) { this.identifiers = identifiers; return this; } @@ -88,12 +89,12 @@ public List getIdentifiers() { return identifiers; } - public void setIdentifiers(List identifiers) { + public void setIdentifiers(@javax.annotation.Nonnull List identifiers) { this.identifiers = identifiers; } - public IdentifierList paging(Paging paging) { + public IdentifierList paging(@javax.annotation.Nonnull Paging paging) { this.paging = paging; return this; } @@ -107,7 +108,7 @@ public Paging getPaging() { return paging; } - public void setPaging(Paging paging) { + public void setPaging(@javax.annotation.Nonnull Paging paging) { this.paging = paging; } diff --git a/src/main/java/com/corbado/generated/model/IdentifierUpdateReq.java b/src/main/java/com/corbado/generated/model/IdentifierUpdateReq.java index 7ca6590..79466d1 100644 --- a/src/main/java/com/corbado/generated/model/IdentifierUpdateReq.java +++ b/src/main/java/com/corbado/generated/model/IdentifierUpdateReq.java @@ -38,7 +38,6 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; @@ -50,16 +49,17 @@ /** * IdentifierUpdateReq */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-13T12:08:31.183817564Z[Etc/UTC]", comments = "Generator version: 7.8.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") public class IdentifierUpdateReq { public static final String SERIALIZED_NAME_STATUS = "status"; @SerializedName(SERIALIZED_NAME_STATUS) + @javax.annotation.Nonnull private IdentifierStatus status; public IdentifierUpdateReq() { } - public IdentifierUpdateReq status(IdentifierStatus status) { + public IdentifierUpdateReq status(@javax.annotation.Nonnull IdentifierStatus status) { this.status = status; return this; } @@ -73,7 +73,7 @@ public IdentifierStatus getStatus() { return status; } - public void setStatus(IdentifierStatus status) { + public void setStatus(@javax.annotation.Nonnull IdentifierStatus status) { this.status = status; } diff --git a/src/main/java/com/corbado/generated/model/JavaScriptHighEntropy.java b/src/main/java/com/corbado/generated/model/JavaScriptHighEntropy.java index b434791..b84dd8c 100644 --- a/src/main/java/com/corbado/generated/model/JavaScriptHighEntropy.java +++ b/src/main/java/com/corbado/generated/model/JavaScriptHighEntropy.java @@ -37,7 +37,6 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; @@ -49,24 +48,27 @@ /** * JavaScriptHighEntropy */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-13T12:08:31.183817564Z[Etc/UTC]", comments = "Generator version: 7.8.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") public class JavaScriptHighEntropy { public static final String SERIALIZED_NAME_PLATFORM = "platform"; @SerializedName(SERIALIZED_NAME_PLATFORM) + @javax.annotation.Nonnull private String platform; public static final String SERIALIZED_NAME_PLATFORM_VERSION = "platformVersion"; @SerializedName(SERIALIZED_NAME_PLATFORM_VERSION) + @javax.annotation.Nonnull private String platformVersion; public static final String SERIALIZED_NAME_MOBILE = "mobile"; @SerializedName(SERIALIZED_NAME_MOBILE) + @javax.annotation.Nonnull private Boolean mobile; public JavaScriptHighEntropy() { } - public JavaScriptHighEntropy platform(String platform) { + public JavaScriptHighEntropy platform(@javax.annotation.Nonnull String platform) { this.platform = platform; return this; } @@ -80,12 +82,12 @@ public String getPlatform() { return platform; } - public void setPlatform(String platform) { + public void setPlatform(@javax.annotation.Nonnull String platform) { this.platform = platform; } - public JavaScriptHighEntropy platformVersion(String platformVersion) { + public JavaScriptHighEntropy platformVersion(@javax.annotation.Nonnull String platformVersion) { this.platformVersion = platformVersion; return this; } @@ -99,12 +101,12 @@ public String getPlatformVersion() { return platformVersion; } - public void setPlatformVersion(String platformVersion) { + public void setPlatformVersion(@javax.annotation.Nonnull String platformVersion) { this.platformVersion = platformVersion; } - public JavaScriptHighEntropy mobile(Boolean mobile) { + public JavaScriptHighEntropy mobile(@javax.annotation.Nonnull Boolean mobile) { this.mobile = mobile; return this; } @@ -118,7 +120,7 @@ public Boolean getMobile() { return mobile; } - public void setMobile(Boolean mobile) { + public void setMobile(@javax.annotation.Nonnull Boolean mobile) { this.mobile = mobile; } diff --git a/src/main/java/com/corbado/generated/model/LongSession.java b/src/main/java/com/corbado/generated/model/LongSession.java index e3672f8..b365d37 100644 --- a/src/main/java/com/corbado/generated/model/LongSession.java +++ b/src/main/java/com/corbado/generated/model/LongSession.java @@ -38,7 +38,6 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; @@ -50,32 +49,37 @@ /** * LongSession */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-13T12:08:31.183817564Z[Etc/UTC]", comments = "Generator version: 7.8.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") public class LongSession { public static final String SERIALIZED_NAME_LONG_SESSION_I_D = "longSessionID"; @SerializedName(SERIALIZED_NAME_LONG_SESSION_I_D) + @javax.annotation.Nonnull private String longSessionID; public static final String SERIALIZED_NAME_USER_I_D = "userID"; @SerializedName(SERIALIZED_NAME_USER_I_D) + @javax.annotation.Nonnull private String userID; public static final String SERIALIZED_NAME_IDENTIFIER_VALUE = "identifierValue"; @SerializedName(SERIALIZED_NAME_IDENTIFIER_VALUE) + @javax.annotation.Nonnull private String identifierValue; public static final String SERIALIZED_NAME_STATUS = "status"; @SerializedName(SERIALIZED_NAME_STATUS) + @javax.annotation.Nonnull private LongSessionStatus status; public static final String SERIALIZED_NAME_EXPIRES = "expires"; @SerializedName(SERIALIZED_NAME_EXPIRES) + @javax.annotation.Nonnull private String expires; public LongSession() { } - public LongSession longSessionID(String longSessionID) { + public LongSession longSessionID(@javax.annotation.Nonnull String longSessionID) { this.longSessionID = longSessionID; return this; } @@ -89,12 +93,12 @@ public String getLongSessionID() { return longSessionID; } - public void setLongSessionID(String longSessionID) { + public void setLongSessionID(@javax.annotation.Nonnull String longSessionID) { this.longSessionID = longSessionID; } - public LongSession userID(String userID) { + public LongSession userID(@javax.annotation.Nonnull String userID) { this.userID = userID; return this; } @@ -108,12 +112,12 @@ public String getUserID() { return userID; } - public void setUserID(String userID) { + public void setUserID(@javax.annotation.Nonnull String userID) { this.userID = userID; } - public LongSession identifierValue(String identifierValue) { + public LongSession identifierValue(@javax.annotation.Nonnull String identifierValue) { this.identifierValue = identifierValue; return this; } @@ -127,12 +131,12 @@ public String getIdentifierValue() { return identifierValue; } - public void setIdentifierValue(String identifierValue) { + public void setIdentifierValue(@javax.annotation.Nonnull String identifierValue) { this.identifierValue = identifierValue; } - public LongSession status(LongSessionStatus status) { + public LongSession status(@javax.annotation.Nonnull LongSessionStatus status) { this.status = status; return this; } @@ -146,12 +150,12 @@ public LongSessionStatus getStatus() { return status; } - public void setStatus(LongSessionStatus status) { + public void setStatus(@javax.annotation.Nonnull LongSessionStatus status) { this.status = status; } - public LongSession expires(String expires) { + public LongSession expires(@javax.annotation.Nonnull String expires) { this.expires = expires; return this; } @@ -165,7 +169,7 @@ public String getExpires() { return expires; } - public void setExpires(String expires) { + public void setExpires(@javax.annotation.Nonnull String expires) { this.expires = expires; } diff --git a/src/main/java/com/corbado/generated/model/LongSessionCreateReq.java b/src/main/java/com/corbado/generated/model/LongSessionCreateReq.java index 28f70a0..146e933 100644 --- a/src/main/java/com/corbado/generated/model/LongSessionCreateReq.java +++ b/src/main/java/com/corbado/generated/model/LongSessionCreateReq.java @@ -38,7 +38,6 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; @@ -50,20 +49,22 @@ /** * LongSessionCreateReq */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-13T12:08:31.183817564Z[Etc/UTC]", comments = "Generator version: 7.8.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") public class LongSessionCreateReq { public static final String SERIALIZED_NAME_APP_TYPE = "appType"; @SerializedName(SERIALIZED_NAME_APP_TYPE) + @javax.annotation.Nonnull private AppType appType; public static final String SERIALIZED_NAME_IDENTIFIER_VALUE = "identifierValue"; @SerializedName(SERIALIZED_NAME_IDENTIFIER_VALUE) + @javax.annotation.Nonnull private String identifierValue; public LongSessionCreateReq() { } - public LongSessionCreateReq appType(AppType appType) { + public LongSessionCreateReq appType(@javax.annotation.Nonnull AppType appType) { this.appType = appType; return this; } @@ -77,12 +78,12 @@ public AppType getAppType() { return appType; } - public void setAppType(AppType appType) { + public void setAppType(@javax.annotation.Nonnull AppType appType) { this.appType = appType; } - public LongSessionCreateReq identifierValue(String identifierValue) { + public LongSessionCreateReq identifierValue(@javax.annotation.Nonnull String identifierValue) { this.identifierValue = identifierValue; return this; } @@ -96,7 +97,7 @@ public String getIdentifierValue() { return identifierValue; } - public void setIdentifierValue(String identifierValue) { + public void setIdentifierValue(@javax.annotation.Nonnull String identifierValue) { this.identifierValue = identifierValue; } diff --git a/src/main/java/com/corbado/generated/model/LongSessionUpdateReq.java b/src/main/java/com/corbado/generated/model/LongSessionUpdateReq.java index 8ee786b..a9944eb 100644 --- a/src/main/java/com/corbado/generated/model/LongSessionUpdateReq.java +++ b/src/main/java/com/corbado/generated/model/LongSessionUpdateReq.java @@ -38,7 +38,6 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; @@ -50,16 +49,17 @@ /** * LongSessionUpdateReq */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-13T12:08:31.183817564Z[Etc/UTC]", comments = "Generator version: 7.8.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") public class LongSessionUpdateReq { public static final String SERIALIZED_NAME_STATUS = "status"; @SerializedName(SERIALIZED_NAME_STATUS) + @javax.annotation.Nonnull private LongSessionStatus status; public LongSessionUpdateReq() { } - public LongSessionUpdateReq status(LongSessionStatus status) { + public LongSessionUpdateReq status(@javax.annotation.Nonnull LongSessionStatus status) { this.status = status; return this; } @@ -73,7 +73,7 @@ public LongSessionStatus getStatus() { return status; } - public void setStatus(LongSessionStatus status) { + public void setStatus(@javax.annotation.Nonnull LongSessionStatus status) { this.status = status; } diff --git a/src/main/java/com/corbado/generated/model/Paging.java b/src/main/java/com/corbado/generated/model/Paging.java index 223a5e2..6ade1c7 100644 --- a/src/main/java/com/corbado/generated/model/Paging.java +++ b/src/main/java/com/corbado/generated/model/Paging.java @@ -37,7 +37,6 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; @@ -49,24 +48,27 @@ /** * Paging */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-13T12:08:31.183817564Z[Etc/UTC]", comments = "Generator version: 7.8.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") public class Paging { public static final String SERIALIZED_NAME_PAGE = "page"; @SerializedName(SERIALIZED_NAME_PAGE) + @javax.annotation.Nonnull private Integer page = 1; public static final String SERIALIZED_NAME_TOTAL_PAGES = "totalPages"; @SerializedName(SERIALIZED_NAME_TOTAL_PAGES) + @javax.annotation.Nonnull private Integer totalPages; public static final String SERIALIZED_NAME_TOTAL_ITEMS = "totalItems"; @SerializedName(SERIALIZED_NAME_TOTAL_ITEMS) + @javax.annotation.Nonnull private Integer totalItems; public Paging() { } - public Paging page(Integer page) { + public Paging page(@javax.annotation.Nonnull Integer page) { this.page = page; return this; } @@ -80,12 +82,12 @@ public Integer getPage() { return page; } - public void setPage(Integer page) { + public void setPage(@javax.annotation.Nonnull Integer page) { this.page = page; } - public Paging totalPages(Integer totalPages) { + public Paging totalPages(@javax.annotation.Nonnull Integer totalPages) { this.totalPages = totalPages; return this; } @@ -99,12 +101,12 @@ public Integer getTotalPages() { return totalPages; } - public void setTotalPages(Integer totalPages) { + public void setTotalPages(@javax.annotation.Nonnull Integer totalPages) { this.totalPages = totalPages; } - public Paging totalItems(Integer totalItems) { + public Paging totalItems(@javax.annotation.Nonnull Integer totalItems) { this.totalItems = totalItems; return this; } @@ -118,7 +120,7 @@ public Integer getTotalItems() { return totalItems; } - public void setTotalItems(Integer totalItems) { + public void setTotalItems(@javax.annotation.Nonnull Integer totalItems) { this.totalItems = totalItems; } diff --git a/src/main/java/com/corbado/generated/model/PasskeyAppendFinishReq.java b/src/main/java/com/corbado/generated/model/PasskeyAppendFinishReq.java index 93c935b..23e4f28 100644 --- a/src/main/java/com/corbado/generated/model/PasskeyAppendFinishReq.java +++ b/src/main/java/com/corbado/generated/model/PasskeyAppendFinishReq.java @@ -38,7 +38,6 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; @@ -50,32 +49,37 @@ /** * PasskeyAppendFinishReq */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-13T12:08:31.183817564Z[Etc/UTC]", comments = "Generator version: 7.8.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") public class PasskeyAppendFinishReq { public static final String SERIALIZED_NAME_USER_I_D = "userID"; @SerializedName(SERIALIZED_NAME_USER_I_D) + @javax.annotation.Nonnull private String userID; public static final String SERIALIZED_NAME_PROCESS_I_D = "processID"; @SerializedName(SERIALIZED_NAME_PROCESS_I_D) + @javax.annotation.Nonnull private String processID; public static final String SERIALIZED_NAME_ATTESTATION_RESPONSE = "attestationResponse"; @SerializedName(SERIALIZED_NAME_ATTESTATION_RESPONSE) + @javax.annotation.Nonnull private String attestationResponse; public static final String SERIALIZED_NAME_CLIENT_INFORMATION = "clientInformation"; @SerializedName(SERIALIZED_NAME_CLIENT_INFORMATION) + @javax.annotation.Nonnull private ClientInformation clientInformation; public static final String SERIALIZED_NAME_SEND_NOTIFICATION = "sendNotification"; @SerializedName(SERIALIZED_NAME_SEND_NOTIFICATION) + @javax.annotation.Nullable private Boolean sendNotification; public PasskeyAppendFinishReq() { } - public PasskeyAppendFinishReq userID(String userID) { + public PasskeyAppendFinishReq userID(@javax.annotation.Nonnull String userID) { this.userID = userID; return this; } @@ -89,12 +93,12 @@ public String getUserID() { return userID; } - public void setUserID(String userID) { + public void setUserID(@javax.annotation.Nonnull String userID) { this.userID = userID; } - public PasskeyAppendFinishReq processID(String processID) { + public PasskeyAppendFinishReq processID(@javax.annotation.Nonnull String processID) { this.processID = processID; return this; } @@ -108,12 +112,12 @@ public String getProcessID() { return processID; } - public void setProcessID(String processID) { + public void setProcessID(@javax.annotation.Nonnull String processID) { this.processID = processID; } - public PasskeyAppendFinishReq attestationResponse(String attestationResponse) { + public PasskeyAppendFinishReq attestationResponse(@javax.annotation.Nonnull String attestationResponse) { this.attestationResponse = attestationResponse; return this; } @@ -127,12 +131,12 @@ public String getAttestationResponse() { return attestationResponse; } - public void setAttestationResponse(String attestationResponse) { + public void setAttestationResponse(@javax.annotation.Nonnull String attestationResponse) { this.attestationResponse = attestationResponse; } - public PasskeyAppendFinishReq clientInformation(ClientInformation clientInformation) { + public PasskeyAppendFinishReq clientInformation(@javax.annotation.Nonnull ClientInformation clientInformation) { this.clientInformation = clientInformation; return this; } @@ -146,12 +150,12 @@ public ClientInformation getClientInformation() { return clientInformation; } - public void setClientInformation(ClientInformation clientInformation) { + public void setClientInformation(@javax.annotation.Nonnull ClientInformation clientInformation) { this.clientInformation = clientInformation; } - public PasskeyAppendFinishReq sendNotification(Boolean sendNotification) { + public PasskeyAppendFinishReq sendNotification(@javax.annotation.Nullable Boolean sendNotification) { this.sendNotification = sendNotification; return this; } @@ -165,7 +169,7 @@ public Boolean getSendNotification() { return sendNotification; } - public void setSendNotification(Boolean sendNotification) { + public void setSendNotification(@javax.annotation.Nullable Boolean sendNotification) { this.sendNotification = sendNotification; } diff --git a/src/main/java/com/corbado/generated/model/PasskeyAppendFinishRsp.java b/src/main/java/com/corbado/generated/model/PasskeyAppendFinishRsp.java index 81cd800..2eaa508 100644 --- a/src/main/java/com/corbado/generated/model/PasskeyAppendFinishRsp.java +++ b/src/main/java/com/corbado/generated/model/PasskeyAppendFinishRsp.java @@ -38,7 +38,6 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; @@ -50,16 +49,17 @@ /** * PasskeyAppendFinishRsp */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-13T12:08:31.183817564Z[Etc/UTC]", comments = "Generator version: 7.8.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") public class PasskeyAppendFinishRsp { public static final String SERIALIZED_NAME_PASSKEY_DATA = "passkeyData"; @SerializedName(SERIALIZED_NAME_PASSKEY_DATA) + @javax.annotation.Nonnull private PasskeyData passkeyData; public PasskeyAppendFinishRsp() { } - public PasskeyAppendFinishRsp passkeyData(PasskeyData passkeyData) { + public PasskeyAppendFinishRsp passkeyData(@javax.annotation.Nonnull PasskeyData passkeyData) { this.passkeyData = passkeyData; return this; } @@ -73,7 +73,7 @@ public PasskeyData getPasskeyData() { return passkeyData; } - public void setPasskeyData(PasskeyData passkeyData) { + public void setPasskeyData(@javax.annotation.Nonnull PasskeyData passkeyData) { this.passkeyData = passkeyData; } diff --git a/src/main/java/com/corbado/generated/model/PasskeyAppendStartReq.java b/src/main/java/com/corbado/generated/model/PasskeyAppendStartReq.java index 36d0820..14f6875 100644 --- a/src/main/java/com/corbado/generated/model/PasskeyAppendStartReq.java +++ b/src/main/java/com/corbado/generated/model/PasskeyAppendStartReq.java @@ -39,7 +39,6 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; @@ -51,32 +50,37 @@ /** * PasskeyAppendStartReq */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-13T12:08:31.183817564Z[Etc/UTC]", comments = "Generator version: 7.8.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") public class PasskeyAppendStartReq { public static final String SERIALIZED_NAME_USER_I_D = "userID"; @SerializedName(SERIALIZED_NAME_USER_I_D) + @javax.annotation.Nonnull private String userID; public static final String SERIALIZED_NAME_PROCESS_I_D = "processID"; @SerializedName(SERIALIZED_NAME_PROCESS_I_D) + @javax.annotation.Nonnull private String processID; public static final String SERIALIZED_NAME_USERNAME = "username"; @SerializedName(SERIALIZED_NAME_USERNAME) + @javax.annotation.Nonnull private String username; public static final String SERIALIZED_NAME_CLIENT_INFORMATION = "clientInformation"; @SerializedName(SERIALIZED_NAME_CLIENT_INFORMATION) + @javax.annotation.Nonnull private ClientInformation clientInformation; public static final String SERIALIZED_NAME_PASSKEY_INTEL_FLAGS = "passkeyIntelFlags"; @SerializedName(SERIALIZED_NAME_PASSKEY_INTEL_FLAGS) + @javax.annotation.Nonnull private PasskeyIntelFlags passkeyIntelFlags; public PasskeyAppendStartReq() { } - public PasskeyAppendStartReq userID(String userID) { + public PasskeyAppendStartReq userID(@javax.annotation.Nonnull String userID) { this.userID = userID; return this; } @@ -90,12 +94,12 @@ public String getUserID() { return userID; } - public void setUserID(String userID) { + public void setUserID(@javax.annotation.Nonnull String userID) { this.userID = userID; } - public PasskeyAppendStartReq processID(String processID) { + public PasskeyAppendStartReq processID(@javax.annotation.Nonnull String processID) { this.processID = processID; return this; } @@ -109,12 +113,12 @@ public String getProcessID() { return processID; } - public void setProcessID(String processID) { + public void setProcessID(@javax.annotation.Nonnull String processID) { this.processID = processID; } - public PasskeyAppendStartReq username(String username) { + public PasskeyAppendStartReq username(@javax.annotation.Nonnull String username) { this.username = username; return this; } @@ -128,12 +132,12 @@ public String getUsername() { return username; } - public void setUsername(String username) { + public void setUsername(@javax.annotation.Nonnull String username) { this.username = username; } - public PasskeyAppendStartReq clientInformation(ClientInformation clientInformation) { + public PasskeyAppendStartReq clientInformation(@javax.annotation.Nonnull ClientInformation clientInformation) { this.clientInformation = clientInformation; return this; } @@ -147,12 +151,12 @@ public ClientInformation getClientInformation() { return clientInformation; } - public void setClientInformation(ClientInformation clientInformation) { + public void setClientInformation(@javax.annotation.Nonnull ClientInformation clientInformation) { this.clientInformation = clientInformation; } - public PasskeyAppendStartReq passkeyIntelFlags(PasskeyIntelFlags passkeyIntelFlags) { + public PasskeyAppendStartReq passkeyIntelFlags(@javax.annotation.Nonnull PasskeyIntelFlags passkeyIntelFlags) { this.passkeyIntelFlags = passkeyIntelFlags; return this; } @@ -166,7 +170,7 @@ public PasskeyIntelFlags getPasskeyIntelFlags() { return passkeyIntelFlags; } - public void setPasskeyIntelFlags(PasskeyIntelFlags passkeyIntelFlags) { + public void setPasskeyIntelFlags(@javax.annotation.Nonnull PasskeyIntelFlags passkeyIntelFlags) { this.passkeyIntelFlags = passkeyIntelFlags; } diff --git a/src/main/java/com/corbado/generated/model/PasskeyAppendStartRsp.java b/src/main/java/com/corbado/generated/model/PasskeyAppendStartRsp.java index ea2025e..3d5e9c2 100644 --- a/src/main/java/com/corbado/generated/model/PasskeyAppendStartRsp.java +++ b/src/main/java/com/corbado/generated/model/PasskeyAppendStartRsp.java @@ -41,7 +41,6 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; @@ -53,28 +52,37 @@ /** * PasskeyAppendStartRsp */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-13T12:08:31.183817564Z[Etc/UTC]", comments = "Generator version: 7.8.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") public class PasskeyAppendStartRsp { public static final String SERIALIZED_NAME_APPEND_ALLOW = "appendAllow"; @SerializedName(SERIALIZED_NAME_APPEND_ALLOW) + @javax.annotation.Nonnull private Boolean appendAllow; public static final String SERIALIZED_NAME_DETECTION_TAGS = "detectionTags"; @SerializedName(SERIALIZED_NAME_DETECTION_TAGS) + @javax.annotation.Nonnull private List detectionTags = new ArrayList<>(); public static final String SERIALIZED_NAME_DECISION_TAG = "decisionTag"; @SerializedName(SERIALIZED_NAME_DECISION_TAG) + @javax.annotation.Nonnull private DecisionTag decisionTag; + public static final String SERIALIZED_NAME_CREDENTIAL_COUNT = "credentialCount"; + @SerializedName(SERIALIZED_NAME_CREDENTIAL_COUNT) + @javax.annotation.Nonnull + private Integer credentialCount; + public static final String SERIALIZED_NAME_ATTESTATION_OPTIONS = "attestationOptions"; @SerializedName(SERIALIZED_NAME_ATTESTATION_OPTIONS) + @javax.annotation.Nonnull private String attestationOptions; public PasskeyAppendStartRsp() { } - public PasskeyAppendStartRsp appendAllow(Boolean appendAllow) { + public PasskeyAppendStartRsp appendAllow(@javax.annotation.Nonnull Boolean appendAllow) { this.appendAllow = appendAllow; return this; } @@ -88,12 +96,12 @@ public Boolean getAppendAllow() { return appendAllow; } - public void setAppendAllow(Boolean appendAllow) { + public void setAppendAllow(@javax.annotation.Nonnull Boolean appendAllow) { this.appendAllow = appendAllow; } - public PasskeyAppendStartRsp detectionTags(List detectionTags) { + public PasskeyAppendStartRsp detectionTags(@javax.annotation.Nonnull List detectionTags) { this.detectionTags = detectionTags; return this; } @@ -115,12 +123,12 @@ public List getDetectionTags() { return detectionTags; } - public void setDetectionTags(List detectionTags) { + public void setDetectionTags(@javax.annotation.Nonnull List detectionTags) { this.detectionTags = detectionTags; } - public PasskeyAppendStartRsp decisionTag(DecisionTag decisionTag) { + public PasskeyAppendStartRsp decisionTag(@javax.annotation.Nonnull DecisionTag decisionTag) { this.decisionTag = decisionTag; return this; } @@ -134,12 +142,31 @@ public DecisionTag getDecisionTag() { return decisionTag; } - public void setDecisionTag(DecisionTag decisionTag) { + public void setDecisionTag(@javax.annotation.Nonnull DecisionTag decisionTag) { this.decisionTag = decisionTag; } - public PasskeyAppendStartRsp attestationOptions(String attestationOptions) { + public PasskeyAppendStartRsp credentialCount(@javax.annotation.Nonnull Integer credentialCount) { + this.credentialCount = credentialCount; + return this; + } + + /** + * Get credentialCount + * @return credentialCount + */ + @javax.annotation.Nonnull + public Integer getCredentialCount() { + return credentialCount; + } + + public void setCredentialCount(@javax.annotation.Nonnull Integer credentialCount) { + this.credentialCount = credentialCount; + } + + + public PasskeyAppendStartRsp attestationOptions(@javax.annotation.Nonnull String attestationOptions) { this.attestationOptions = attestationOptions; return this; } @@ -153,7 +180,7 @@ public String getAttestationOptions() { return attestationOptions; } - public void setAttestationOptions(String attestationOptions) { + public void setAttestationOptions(@javax.annotation.Nonnull String attestationOptions) { this.attestationOptions = attestationOptions; } @@ -171,12 +198,13 @@ public boolean equals(Object o) { return Objects.equals(this.appendAllow, passkeyAppendStartRsp.appendAllow) && Objects.equals(this.detectionTags, passkeyAppendStartRsp.detectionTags) && Objects.equals(this.decisionTag, passkeyAppendStartRsp.decisionTag) && + Objects.equals(this.credentialCount, passkeyAppendStartRsp.credentialCount) && Objects.equals(this.attestationOptions, passkeyAppendStartRsp.attestationOptions); } @Override public int hashCode() { - return Objects.hash(appendAllow, detectionTags, decisionTag, attestationOptions); + return Objects.hash(appendAllow, detectionTags, decisionTag, credentialCount, attestationOptions); } @Override @@ -186,6 +214,7 @@ public String toString() { sb.append(" appendAllow: ").append(toIndentedString(appendAllow)).append("\n"); sb.append(" detectionTags: ").append(toIndentedString(detectionTags)).append("\n"); sb.append(" decisionTag: ").append(toIndentedString(decisionTag)).append("\n"); + sb.append(" credentialCount: ").append(toIndentedString(credentialCount)).append("\n"); sb.append(" attestationOptions: ").append(toIndentedString(attestationOptions)).append("\n"); sb.append("}"); return sb.toString(); @@ -212,6 +241,7 @@ private String toIndentedString(Object o) { openapiFields.add("appendAllow"); openapiFields.add("detectionTags"); openapiFields.add("decisionTag"); + openapiFields.add("credentialCount"); openapiFields.add("attestationOptions"); // a set of required properties/fields (JSON key names) @@ -219,6 +249,7 @@ private String toIndentedString(Object o) { openapiRequiredFields.add("appendAllow"); openapiRequiredFields.add("detectionTags"); openapiRequiredFields.add("decisionTag"); + openapiRequiredFields.add("credentialCount"); openapiRequiredFields.add("attestationOptions"); } diff --git a/src/main/java/com/corbado/generated/model/PasskeyChallenge.java b/src/main/java/com/corbado/generated/model/PasskeyChallenge.java index 97780a6..83e7bf3 100644 --- a/src/main/java/com/corbado/generated/model/PasskeyChallenge.java +++ b/src/main/java/com/corbado/generated/model/PasskeyChallenge.java @@ -39,7 +39,6 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; @@ -51,36 +50,42 @@ /** * PasskeyChallenge */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-13T12:08:31.183817564Z[Etc/UTC]", comments = "Generator version: 7.8.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") public class PasskeyChallenge { public static final String SERIALIZED_NAME_CHALLENGE_I_D = "challengeID"; @SerializedName(SERIALIZED_NAME_CHALLENGE_I_D) + @javax.annotation.Nonnull private String challengeID; public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nonnull private PasskeyChallengeType type; public static final String SERIALIZED_NAME_VALUE = "value"; @SerializedName(SERIALIZED_NAME_VALUE) + @javax.annotation.Nonnull private String value; public static final String SERIALIZED_NAME_STATUS = "status"; @SerializedName(SERIALIZED_NAME_STATUS) + @javax.annotation.Nonnull private PasskeyChallengeStatus status; public static final String SERIALIZED_NAME_CREATED = "created"; @SerializedName(SERIALIZED_NAME_CREATED) + @javax.annotation.Nonnull private Long created; public static final String SERIALIZED_NAME_EXPIRES = "expires"; @SerializedName(SERIALIZED_NAME_EXPIRES) + @javax.annotation.Nonnull private Long expires; public PasskeyChallenge() { } - public PasskeyChallenge challengeID(String challengeID) { + public PasskeyChallenge challengeID(@javax.annotation.Nonnull String challengeID) { this.challengeID = challengeID; return this; } @@ -94,12 +99,12 @@ public String getChallengeID() { return challengeID; } - public void setChallengeID(String challengeID) { + public void setChallengeID(@javax.annotation.Nonnull String challengeID) { this.challengeID = challengeID; } - public PasskeyChallenge type(PasskeyChallengeType type) { + public PasskeyChallenge type(@javax.annotation.Nonnull PasskeyChallengeType type) { this.type = type; return this; } @@ -113,12 +118,12 @@ public PasskeyChallengeType getType() { return type; } - public void setType(PasskeyChallengeType type) { + public void setType(@javax.annotation.Nonnull PasskeyChallengeType type) { this.type = type; } - public PasskeyChallenge value(String value) { + public PasskeyChallenge value(@javax.annotation.Nonnull String value) { this.value = value; return this; } @@ -132,12 +137,12 @@ public String getValue() { return value; } - public void setValue(String value) { + public void setValue(@javax.annotation.Nonnull String value) { this.value = value; } - public PasskeyChallenge status(PasskeyChallengeStatus status) { + public PasskeyChallenge status(@javax.annotation.Nonnull PasskeyChallengeStatus status) { this.status = status; return this; } @@ -151,12 +156,12 @@ public PasskeyChallengeStatus getStatus() { return status; } - public void setStatus(PasskeyChallengeStatus status) { + public void setStatus(@javax.annotation.Nonnull PasskeyChallengeStatus status) { this.status = status; } - public PasskeyChallenge created(Long created) { + public PasskeyChallenge created(@javax.annotation.Nonnull Long created) { this.created = created; return this; } @@ -170,12 +175,12 @@ public Long getCreated() { return created; } - public void setCreated(Long created) { + public void setCreated(@javax.annotation.Nonnull Long created) { this.created = created; } - public PasskeyChallenge expires(Long expires) { + public PasskeyChallenge expires(@javax.annotation.Nonnull Long expires) { this.expires = expires; return this; } @@ -189,7 +194,7 @@ public Long getExpires() { return expires; } - public void setExpires(Long expires) { + public void setExpires(@javax.annotation.Nonnull Long expires) { this.expires = expires; } diff --git a/src/main/java/com/corbado/generated/model/PasskeyChallengeList.java b/src/main/java/com/corbado/generated/model/PasskeyChallengeList.java index a25864c..24b183a 100644 --- a/src/main/java/com/corbado/generated/model/PasskeyChallengeList.java +++ b/src/main/java/com/corbado/generated/model/PasskeyChallengeList.java @@ -41,7 +41,6 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; @@ -53,20 +52,22 @@ /** * PasskeyChallengeList */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-13T12:08:31.183817564Z[Etc/UTC]", comments = "Generator version: 7.8.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") public class PasskeyChallengeList { public static final String SERIALIZED_NAME_PASSKEY_CHALLENGES = "passkeyChallenges"; @SerializedName(SERIALIZED_NAME_PASSKEY_CHALLENGES) + @javax.annotation.Nonnull private List passkeyChallenges = new ArrayList<>(); public static final String SERIALIZED_NAME_PAGING = "paging"; @SerializedName(SERIALIZED_NAME_PAGING) + @javax.annotation.Nonnull private Paging paging; public PasskeyChallengeList() { } - public PasskeyChallengeList passkeyChallenges(List passkeyChallenges) { + public PasskeyChallengeList passkeyChallenges(@javax.annotation.Nonnull List passkeyChallenges) { this.passkeyChallenges = passkeyChallenges; return this; } @@ -88,12 +89,12 @@ public List getPasskeyChallenges() { return passkeyChallenges; } - public void setPasskeyChallenges(List passkeyChallenges) { + public void setPasskeyChallenges(@javax.annotation.Nonnull List passkeyChallenges) { this.passkeyChallenges = passkeyChallenges; } - public PasskeyChallengeList paging(Paging paging) { + public PasskeyChallengeList paging(@javax.annotation.Nonnull Paging paging) { this.paging = paging; return this; } @@ -107,7 +108,7 @@ public Paging getPaging() { return paging; } - public void setPaging(Paging paging) { + public void setPaging(@javax.annotation.Nonnull Paging paging) { this.paging = paging; } diff --git a/src/main/java/com/corbado/generated/model/PasskeyChallengeUpdateReq.java b/src/main/java/com/corbado/generated/model/PasskeyChallengeUpdateReq.java index 5193eb6..35b6f5c 100644 --- a/src/main/java/com/corbado/generated/model/PasskeyChallengeUpdateReq.java +++ b/src/main/java/com/corbado/generated/model/PasskeyChallengeUpdateReq.java @@ -38,7 +38,6 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; @@ -50,16 +49,17 @@ /** * PasskeyChallengeUpdateReq */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-13T12:08:31.183817564Z[Etc/UTC]", comments = "Generator version: 7.8.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") public class PasskeyChallengeUpdateReq { public static final String SERIALIZED_NAME_STATUS = "status"; @SerializedName(SERIALIZED_NAME_STATUS) + @javax.annotation.Nonnull private PasskeyChallengeStatus status; public PasskeyChallengeUpdateReq() { } - public PasskeyChallengeUpdateReq status(PasskeyChallengeStatus status) { + public PasskeyChallengeUpdateReq status(@javax.annotation.Nonnull PasskeyChallengeStatus status) { this.status = status; return this; } @@ -73,7 +73,7 @@ public PasskeyChallengeStatus getStatus() { return status; } - public void setStatus(PasskeyChallengeStatus status) { + public void setStatus(@javax.annotation.Nonnull PasskeyChallengeStatus status) { this.status = status; } diff --git a/src/main/java/com/corbado/generated/model/PasskeyData.java b/src/main/java/com/corbado/generated/model/PasskeyData.java index 22bfa5b..fbd66b3 100644 --- a/src/main/java/com/corbado/generated/model/PasskeyData.java +++ b/src/main/java/com/corbado/generated/model/PasskeyData.java @@ -14,6 +14,7 @@ package com.corbado.generated.model; import java.util.Objects; +import com.corbado.generated.model.AaguidDetails; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -37,7 +38,6 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; @@ -49,18 +49,21 @@ /** * PasskeyData */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-13T12:08:31.183817564Z[Etc/UTC]", comments = "Generator version: 7.8.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") public class PasskeyData { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull private String id; public static final String SERIALIZED_NAME_USER_I_D = "userID"; @SerializedName(SERIALIZED_NAME_USER_I_D) + @javax.annotation.Nonnull private String userID; public static final String SERIALIZED_NAME_USERNAME = "username"; @SerializedName(SERIALIZED_NAME_USERNAME) + @javax.annotation.Nonnull private String username; /** @@ -119,16 +122,23 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti public static final String SERIALIZED_NAME_CEREMONY_TYPE = "ceremonyType"; @SerializedName(SERIALIZED_NAME_CEREMONY_TYPE) + @javax.annotation.Nonnull private CeremonyTypeEnum ceremonyType; public static final String SERIALIZED_NAME_CHALLENGE_I_D = "challengeID"; @SerializedName(SERIALIZED_NAME_CHALLENGE_I_D) + @javax.annotation.Nonnull private String challengeID; + public static final String SERIALIZED_NAME_AAGUID_DETAILS = "aaguidDetails"; + @SerializedName(SERIALIZED_NAME_AAGUID_DETAILS) + @javax.annotation.Nonnull + private AaguidDetails aaguidDetails; + public PasskeyData() { } - public PasskeyData id(String id) { + public PasskeyData id(@javax.annotation.Nonnull String id) { this.id = id; return this; } @@ -142,12 +152,12 @@ public String getId() { return id; } - public void setId(String id) { + public void setId(@javax.annotation.Nonnull String id) { this.id = id; } - public PasskeyData userID(String userID) { + public PasskeyData userID(@javax.annotation.Nonnull String userID) { this.userID = userID; return this; } @@ -161,12 +171,12 @@ public String getUserID() { return userID; } - public void setUserID(String userID) { + public void setUserID(@javax.annotation.Nonnull String userID) { this.userID = userID; } - public PasskeyData username(String username) { + public PasskeyData username(@javax.annotation.Nonnull String username) { this.username = username; return this; } @@ -180,12 +190,12 @@ public String getUsername() { return username; } - public void setUsername(String username) { + public void setUsername(@javax.annotation.Nonnull String username) { this.username = username; } - public PasskeyData ceremonyType(CeremonyTypeEnum ceremonyType) { + public PasskeyData ceremonyType(@javax.annotation.Nonnull CeremonyTypeEnum ceremonyType) { this.ceremonyType = ceremonyType; return this; } @@ -199,12 +209,12 @@ public CeremonyTypeEnum getCeremonyType() { return ceremonyType; } - public void setCeremonyType(CeremonyTypeEnum ceremonyType) { + public void setCeremonyType(@javax.annotation.Nonnull CeremonyTypeEnum ceremonyType) { this.ceremonyType = ceremonyType; } - public PasskeyData challengeID(String challengeID) { + public PasskeyData challengeID(@javax.annotation.Nonnull String challengeID) { this.challengeID = challengeID; return this; } @@ -218,11 +228,30 @@ public String getChallengeID() { return challengeID; } - public void setChallengeID(String challengeID) { + public void setChallengeID(@javax.annotation.Nonnull String challengeID) { this.challengeID = challengeID; } + public PasskeyData aaguidDetails(@javax.annotation.Nonnull AaguidDetails aaguidDetails) { + this.aaguidDetails = aaguidDetails; + return this; + } + + /** + * Get aaguidDetails + * @return aaguidDetails + */ + @javax.annotation.Nonnull + public AaguidDetails getAaguidDetails() { + return aaguidDetails; + } + + public void setAaguidDetails(@javax.annotation.Nonnull AaguidDetails aaguidDetails) { + this.aaguidDetails = aaguidDetails; + } + + @Override public boolean equals(Object o) { @@ -237,12 +266,13 @@ public boolean equals(Object o) { Objects.equals(this.userID, passkeyData.userID) && Objects.equals(this.username, passkeyData.username) && Objects.equals(this.ceremonyType, passkeyData.ceremonyType) && - Objects.equals(this.challengeID, passkeyData.challengeID); + Objects.equals(this.challengeID, passkeyData.challengeID) && + Objects.equals(this.aaguidDetails, passkeyData.aaguidDetails); } @Override public int hashCode() { - return Objects.hash(id, userID, username, ceremonyType, challengeID); + return Objects.hash(id, userID, username, ceremonyType, challengeID, aaguidDetails); } @Override @@ -254,6 +284,7 @@ public String toString() { sb.append(" username: ").append(toIndentedString(username)).append("\n"); sb.append(" ceremonyType: ").append(toIndentedString(ceremonyType)).append("\n"); sb.append(" challengeID: ").append(toIndentedString(challengeID)).append("\n"); + sb.append(" aaguidDetails: ").append(toIndentedString(aaguidDetails)).append("\n"); sb.append("}"); return sb.toString(); } @@ -281,6 +312,7 @@ private String toIndentedString(Object o) { openapiFields.add("username"); openapiFields.add("ceremonyType"); openapiFields.add("challengeID"); + openapiFields.add("aaguidDetails"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -289,6 +321,7 @@ private String toIndentedString(Object o) { openapiRequiredFields.add("username"); openapiRequiredFields.add("ceremonyType"); openapiRequiredFields.add("challengeID"); + openapiRequiredFields.add("aaguidDetails"); } /** @@ -336,6 +369,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (!jsonObj.get("challengeID").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `challengeID` to be a primitive type in the JSON string but got `%s`", jsonObj.get("challengeID").toString())); } + // validate the required field `aaguidDetails` + AaguidDetails.validateJsonElement(jsonObj.get("aaguidDetails")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/com/corbado/generated/model/PasskeyEvent.java b/src/main/java/com/corbado/generated/model/PasskeyEvent.java index b8fb1a3..31d08f9 100644 --- a/src/main/java/com/corbado/generated/model/PasskeyEvent.java +++ b/src/main/java/com/corbado/generated/model/PasskeyEvent.java @@ -38,7 +38,6 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; @@ -50,44 +49,52 @@ /** * PasskeyEvent */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-13T12:08:31.183817564Z[Etc/UTC]", comments = "Generator version: 7.8.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") public class PasskeyEvent { public static final String SERIALIZED_NAME_PASSKEY_EVENT_I_D = "passkeyEventID"; @SerializedName(SERIALIZED_NAME_PASSKEY_EVENT_I_D) + @javax.annotation.Nonnull private String passkeyEventID; public static final String SERIALIZED_NAME_USER_I_D = "userID"; @SerializedName(SERIALIZED_NAME_USER_I_D) + @javax.annotation.Nonnull private String userID; public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) + @javax.annotation.Nonnull private PasskeyEventType eventType; public static final String SERIALIZED_NAME_CLIENT_ENV_I_D = "clientEnvID"; @SerializedName(SERIALIZED_NAME_CLIENT_ENV_I_D) + @javax.annotation.Nullable private String clientEnvID; public static final String SERIALIZED_NAME_PROCESS_I_D = "processID"; @SerializedName(SERIALIZED_NAME_PROCESS_I_D) + @javax.annotation.Nullable private String processID; public static final String SERIALIZED_NAME_CREDENTIAL_I_D = "credentialID"; @SerializedName(SERIALIZED_NAME_CREDENTIAL_I_D) + @javax.annotation.Nullable private String credentialID; public static final String SERIALIZED_NAME_EXPIRES = "expires"; @SerializedName(SERIALIZED_NAME_EXPIRES) + @javax.annotation.Nullable private Integer expires; public static final String SERIALIZED_NAME_CREATED = "created"; @SerializedName(SERIALIZED_NAME_CREATED) + @javax.annotation.Nonnull private String created; public PasskeyEvent() { } - public PasskeyEvent passkeyEventID(String passkeyEventID) { + public PasskeyEvent passkeyEventID(@javax.annotation.Nonnull String passkeyEventID) { this.passkeyEventID = passkeyEventID; return this; } @@ -101,12 +108,12 @@ public String getPasskeyEventID() { return passkeyEventID; } - public void setPasskeyEventID(String passkeyEventID) { + public void setPasskeyEventID(@javax.annotation.Nonnull String passkeyEventID) { this.passkeyEventID = passkeyEventID; } - public PasskeyEvent userID(String userID) { + public PasskeyEvent userID(@javax.annotation.Nonnull String userID) { this.userID = userID; return this; } @@ -120,12 +127,12 @@ public String getUserID() { return userID; } - public void setUserID(String userID) { + public void setUserID(@javax.annotation.Nonnull String userID) { this.userID = userID; } - public PasskeyEvent eventType(PasskeyEventType eventType) { + public PasskeyEvent eventType(@javax.annotation.Nonnull PasskeyEventType eventType) { this.eventType = eventType; return this; } @@ -139,12 +146,12 @@ public PasskeyEventType getEventType() { return eventType; } - public void setEventType(PasskeyEventType eventType) { + public void setEventType(@javax.annotation.Nonnull PasskeyEventType eventType) { this.eventType = eventType; } - public PasskeyEvent clientEnvID(String clientEnvID) { + public PasskeyEvent clientEnvID(@javax.annotation.Nullable String clientEnvID) { this.clientEnvID = clientEnvID; return this; } @@ -158,12 +165,12 @@ public String getClientEnvID() { return clientEnvID; } - public void setClientEnvID(String clientEnvID) { + public void setClientEnvID(@javax.annotation.Nullable String clientEnvID) { this.clientEnvID = clientEnvID; } - public PasskeyEvent processID(String processID) { + public PasskeyEvent processID(@javax.annotation.Nullable String processID) { this.processID = processID; return this; } @@ -177,12 +184,12 @@ public String getProcessID() { return processID; } - public void setProcessID(String processID) { + public void setProcessID(@javax.annotation.Nullable String processID) { this.processID = processID; } - public PasskeyEvent credentialID(String credentialID) { + public PasskeyEvent credentialID(@javax.annotation.Nullable String credentialID) { this.credentialID = credentialID; return this; } @@ -196,12 +203,12 @@ public String getCredentialID() { return credentialID; } - public void setCredentialID(String credentialID) { + public void setCredentialID(@javax.annotation.Nullable String credentialID) { this.credentialID = credentialID; } - public PasskeyEvent expires(Integer expires) { + public PasskeyEvent expires(@javax.annotation.Nullable Integer expires) { this.expires = expires; return this; } @@ -215,12 +222,12 @@ public Integer getExpires() { return expires; } - public void setExpires(Integer expires) { + public void setExpires(@javax.annotation.Nullable Integer expires) { this.expires = expires; } - public PasskeyEvent created(String created) { + public PasskeyEvent created(@javax.annotation.Nonnull String created) { this.created = created; return this; } @@ -234,7 +241,7 @@ public String getCreated() { return created; } - public void setCreated(String created) { + public void setCreated(@javax.annotation.Nonnull String created) { this.created = created; } diff --git a/src/main/java/com/corbado/generated/model/PasskeyEventCreateReq.java b/src/main/java/com/corbado/generated/model/PasskeyEventCreateReq.java index 68f4685..a2dcb34 100644 --- a/src/main/java/com/corbado/generated/model/PasskeyEventCreateReq.java +++ b/src/main/java/com/corbado/generated/model/PasskeyEventCreateReq.java @@ -38,7 +38,6 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; @@ -50,32 +49,42 @@ /** * PasskeyEventCreateReq */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-13T12:08:31.183817564Z[Etc/UTC]", comments = "Generator version: 7.8.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") public class PasskeyEventCreateReq { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) + @javax.annotation.Nonnull private PasskeyEventType eventType; public static final String SERIALIZED_NAME_EXPIRES = "expires"; @SerializedName(SERIALIZED_NAME_EXPIRES) + @javax.annotation.Nullable private Integer expires; public static final String SERIALIZED_NAME_PROCESS_I_D = "processID"; @SerializedName(SERIALIZED_NAME_PROCESS_I_D) + @javax.annotation.Nullable private String processID; public static final String SERIALIZED_NAME_CLIENT_ENV_I_D = "clientEnvID"; @SerializedName(SERIALIZED_NAME_CLIENT_ENV_I_D) + @javax.annotation.Nullable private String clientEnvID; public static final String SERIALIZED_NAME_CREDENTIAL_I_D = "credentialID"; @SerializedName(SERIALIZED_NAME_CREDENTIAL_I_D) + @javax.annotation.Nullable private String credentialID; + public static final String SERIALIZED_NAME_CHALLENGE = "challenge"; + @SerializedName(SERIALIZED_NAME_CHALLENGE) + @javax.annotation.Nullable + private String challenge; + public PasskeyEventCreateReq() { } - public PasskeyEventCreateReq eventType(PasskeyEventType eventType) { + public PasskeyEventCreateReq eventType(@javax.annotation.Nonnull PasskeyEventType eventType) { this.eventType = eventType; return this; } @@ -89,12 +98,12 @@ public PasskeyEventType getEventType() { return eventType; } - public void setEventType(PasskeyEventType eventType) { + public void setEventType(@javax.annotation.Nonnull PasskeyEventType eventType) { this.eventType = eventType; } - public PasskeyEventCreateReq expires(Integer expires) { + public PasskeyEventCreateReq expires(@javax.annotation.Nullable Integer expires) { this.expires = expires; return this; } @@ -108,12 +117,12 @@ public Integer getExpires() { return expires; } - public void setExpires(Integer expires) { + public void setExpires(@javax.annotation.Nullable Integer expires) { this.expires = expires; } - public PasskeyEventCreateReq processID(String processID) { + public PasskeyEventCreateReq processID(@javax.annotation.Nullable String processID) { this.processID = processID; return this; } @@ -127,12 +136,12 @@ public String getProcessID() { return processID; } - public void setProcessID(String processID) { + public void setProcessID(@javax.annotation.Nullable String processID) { this.processID = processID; } - public PasskeyEventCreateReq clientEnvID(String clientEnvID) { + public PasskeyEventCreateReq clientEnvID(@javax.annotation.Nullable String clientEnvID) { this.clientEnvID = clientEnvID; return this; } @@ -146,12 +155,12 @@ public String getClientEnvID() { return clientEnvID; } - public void setClientEnvID(String clientEnvID) { + public void setClientEnvID(@javax.annotation.Nullable String clientEnvID) { this.clientEnvID = clientEnvID; } - public PasskeyEventCreateReq credentialID(String credentialID) { + public PasskeyEventCreateReq credentialID(@javax.annotation.Nullable String credentialID) { this.credentialID = credentialID; return this; } @@ -165,11 +174,30 @@ public String getCredentialID() { return credentialID; } - public void setCredentialID(String credentialID) { + public void setCredentialID(@javax.annotation.Nullable String credentialID) { this.credentialID = credentialID; } + public PasskeyEventCreateReq challenge(@javax.annotation.Nullable String challenge) { + this.challenge = challenge; + return this; + } + + /** + * Get challenge + * @return challenge + */ + @javax.annotation.Nullable + public String getChallenge() { + return challenge; + } + + public void setChallenge(@javax.annotation.Nullable String challenge) { + this.challenge = challenge; + } + + @Override public boolean equals(Object o) { @@ -184,12 +212,13 @@ public boolean equals(Object o) { Objects.equals(this.expires, passkeyEventCreateReq.expires) && Objects.equals(this.processID, passkeyEventCreateReq.processID) && Objects.equals(this.clientEnvID, passkeyEventCreateReq.clientEnvID) && - Objects.equals(this.credentialID, passkeyEventCreateReq.credentialID); + Objects.equals(this.credentialID, passkeyEventCreateReq.credentialID) && + Objects.equals(this.challenge, passkeyEventCreateReq.challenge); } @Override public int hashCode() { - return Objects.hash(eventType, expires, processID, clientEnvID, credentialID); + return Objects.hash(eventType, expires, processID, clientEnvID, credentialID, challenge); } @Override @@ -201,6 +230,7 @@ public String toString() { sb.append(" processID: ").append(toIndentedString(processID)).append("\n"); sb.append(" clientEnvID: ").append(toIndentedString(clientEnvID)).append("\n"); sb.append(" credentialID: ").append(toIndentedString(credentialID)).append("\n"); + sb.append(" challenge: ").append(toIndentedString(challenge)).append("\n"); sb.append("}"); return sb.toString(); } @@ -228,6 +258,7 @@ private String toIndentedString(Object o) { openapiFields.add("processID"); openapiFields.add("clientEnvID"); openapiFields.add("credentialID"); + openapiFields.add("challenge"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -273,6 +304,9 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("credentialID") != null && !jsonObj.get("credentialID").isJsonNull()) && !jsonObj.get("credentialID").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `credentialID` to be a primitive type in the JSON string but got `%s`", jsonObj.get("credentialID").toString())); } + if ((jsonObj.get("challenge") != null && !jsonObj.get("challenge").isJsonNull()) && !jsonObj.get("challenge").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `challenge` to be a primitive type in the JSON string but got `%s`", jsonObj.get("challenge").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/com/corbado/generated/model/PasskeyEventList.java b/src/main/java/com/corbado/generated/model/PasskeyEventList.java index f7126f1..d39811f 100644 --- a/src/main/java/com/corbado/generated/model/PasskeyEventList.java +++ b/src/main/java/com/corbado/generated/model/PasskeyEventList.java @@ -41,7 +41,6 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; @@ -53,20 +52,22 @@ /** * PasskeyEventList */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-13T12:08:31.183817564Z[Etc/UTC]", comments = "Generator version: 7.8.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") public class PasskeyEventList { public static final String SERIALIZED_NAME_PASSKEY_EVENTS = "passkeyEvents"; @SerializedName(SERIALIZED_NAME_PASSKEY_EVENTS) + @javax.annotation.Nonnull private List passkeyEvents = new ArrayList<>(); public static final String SERIALIZED_NAME_PAGING = "paging"; @SerializedName(SERIALIZED_NAME_PAGING) + @javax.annotation.Nonnull private Paging paging; public PasskeyEventList() { } - public PasskeyEventList passkeyEvents(List passkeyEvents) { + public PasskeyEventList passkeyEvents(@javax.annotation.Nonnull List passkeyEvents) { this.passkeyEvents = passkeyEvents; return this; } @@ -88,12 +89,12 @@ public List getPasskeyEvents() { return passkeyEvents; } - public void setPasskeyEvents(List passkeyEvents) { + public void setPasskeyEvents(@javax.annotation.Nonnull List passkeyEvents) { this.passkeyEvents = passkeyEvents; } - public PasskeyEventList paging(Paging paging) { + public PasskeyEventList paging(@javax.annotation.Nonnull Paging paging) { this.paging = paging; return this; } @@ -107,7 +108,7 @@ public Paging getPaging() { return paging; } - public void setPaging(Paging paging) { + public void setPaging(@javax.annotation.Nonnull Paging paging) { this.paging = paging; } diff --git a/src/main/java/com/corbado/generated/model/PasskeyEventType.java b/src/main/java/com/corbado/generated/model/PasskeyEventType.java index 164dbe3..c597468 100644 --- a/src/main/java/com/corbado/generated/model/PasskeyEventType.java +++ b/src/main/java/com/corbado/generated/model/PasskeyEventType.java @@ -35,11 +35,19 @@ public enum PasskeyEventType { LOGIN_ERROR("login-error"), + LOGIN_ERROR_UNTYPED("login-error-untyped"), + LOGIN_ONE_TAP_SWITCH("login-one-tap-switch"), USER_APPEND_AFTER_CROSS_PLATFORM_BLACKLISTED("user-append-after-cross-platform-blacklisted"), - USER_APPEND_AFTER_LOGIN_ERROR_BLACKLISTED("user-append-after-login-error-blacklisted"); + USER_APPEND_AFTER_LOGIN_ERROR_BLACKLISTED("user-append-after-login-error-blacklisted"), + + APPEND_CREDENTIAL_EXISTS("append-credential-exists"), + + APPEND_EXPLICIT_ABORT("append-explicit-abort"), + + APPEND_ERROR("append-error"); private String value; diff --git a/src/main/java/com/corbado/generated/model/PasskeyIntelFlags.java b/src/main/java/com/corbado/generated/model/PasskeyIntelFlags.java index c1f3ed2..af5714a 100644 --- a/src/main/java/com/corbado/generated/model/PasskeyIntelFlags.java +++ b/src/main/java/com/corbado/generated/model/PasskeyIntelFlags.java @@ -37,7 +37,6 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; @@ -49,16 +48,17 @@ /** * PasskeyIntelFlags */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-13T12:08:31.183817564Z[Etc/UTC]", comments = "Generator version: 7.8.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") public class PasskeyIntelFlags { public static final String SERIALIZED_NAME_FORCE_PASSKEY_APPEND = "forcePasskeyAppend"; @SerializedName(SERIALIZED_NAME_FORCE_PASSKEY_APPEND) + @javax.annotation.Nonnull private Boolean forcePasskeyAppend; public PasskeyIntelFlags() { } - public PasskeyIntelFlags forcePasskeyAppend(Boolean forcePasskeyAppend) { + public PasskeyIntelFlags forcePasskeyAppend(@javax.annotation.Nonnull Boolean forcePasskeyAppend) { this.forcePasskeyAppend = forcePasskeyAppend; return this; } @@ -72,7 +72,7 @@ public Boolean getForcePasskeyAppend() { return forcePasskeyAppend; } - public void setForcePasskeyAppend(Boolean forcePasskeyAppend) { + public void setForcePasskeyAppend(@javax.annotation.Nonnull Boolean forcePasskeyAppend) { this.forcePasskeyAppend = forcePasskeyAppend; } diff --git a/src/main/java/com/corbado/generated/model/PasskeyLoginFinishReq.java b/src/main/java/com/corbado/generated/model/PasskeyLoginFinishReq.java index 3dc266d..084d465 100644 --- a/src/main/java/com/corbado/generated/model/PasskeyLoginFinishReq.java +++ b/src/main/java/com/corbado/generated/model/PasskeyLoginFinishReq.java @@ -38,7 +38,6 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; @@ -50,28 +49,32 @@ /** * PasskeyLoginFinishReq */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-13T12:08:31.183817564Z[Etc/UTC]", comments = "Generator version: 7.8.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") public class PasskeyLoginFinishReq { public static final String SERIALIZED_NAME_USER_I_D = "userID"; @SerializedName(SERIALIZED_NAME_USER_I_D) + @javax.annotation.Nonnull private String userID; public static final String SERIALIZED_NAME_ASSERTION_RESPONSE = "assertionResponse"; @SerializedName(SERIALIZED_NAME_ASSERTION_RESPONSE) + @javax.annotation.Nonnull private String assertionResponse; public static final String SERIALIZED_NAME_CLIENT_INFORMATION = "clientInformation"; @SerializedName(SERIALIZED_NAME_CLIENT_INFORMATION) + @javax.annotation.Nonnull private ClientInformation clientInformation; public static final String SERIALIZED_NAME_PROCESS_I_D = "processID"; @SerializedName(SERIALIZED_NAME_PROCESS_I_D) + @javax.annotation.Nonnull private String processID; public PasskeyLoginFinishReq() { } - public PasskeyLoginFinishReq userID(String userID) { + public PasskeyLoginFinishReq userID(@javax.annotation.Nonnull String userID) { this.userID = userID; return this; } @@ -85,12 +88,12 @@ public String getUserID() { return userID; } - public void setUserID(String userID) { + public void setUserID(@javax.annotation.Nonnull String userID) { this.userID = userID; } - public PasskeyLoginFinishReq assertionResponse(String assertionResponse) { + public PasskeyLoginFinishReq assertionResponse(@javax.annotation.Nonnull String assertionResponse) { this.assertionResponse = assertionResponse; return this; } @@ -104,12 +107,12 @@ public String getAssertionResponse() { return assertionResponse; } - public void setAssertionResponse(String assertionResponse) { + public void setAssertionResponse(@javax.annotation.Nonnull String assertionResponse) { this.assertionResponse = assertionResponse; } - public PasskeyLoginFinishReq clientInformation(ClientInformation clientInformation) { + public PasskeyLoginFinishReq clientInformation(@javax.annotation.Nonnull ClientInformation clientInformation) { this.clientInformation = clientInformation; return this; } @@ -123,12 +126,12 @@ public ClientInformation getClientInformation() { return clientInformation; } - public void setClientInformation(ClientInformation clientInformation) { + public void setClientInformation(@javax.annotation.Nonnull ClientInformation clientInformation) { this.clientInformation = clientInformation; } - public PasskeyLoginFinishReq processID(String processID) { + public PasskeyLoginFinishReq processID(@javax.annotation.Nonnull String processID) { this.processID = processID; return this; } @@ -142,7 +145,7 @@ public String getProcessID() { return processID; } - public void setProcessID(String processID) { + public void setProcessID(@javax.annotation.Nonnull String processID) { this.processID = processID; } diff --git a/src/main/java/com/corbado/generated/model/PasskeyLoginFinishRsp.java b/src/main/java/com/corbado/generated/model/PasskeyLoginFinishRsp.java index da682af..dac5e7e 100644 --- a/src/main/java/com/corbado/generated/model/PasskeyLoginFinishRsp.java +++ b/src/main/java/com/corbado/generated/model/PasskeyLoginFinishRsp.java @@ -38,7 +38,6 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; @@ -50,16 +49,17 @@ /** * PasskeyLoginFinishRsp */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-13T12:08:31.183817564Z[Etc/UTC]", comments = "Generator version: 7.8.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") public class PasskeyLoginFinishRsp { public static final String SERIALIZED_NAME_PASSKEY_DATA = "passkeyData"; @SerializedName(SERIALIZED_NAME_PASSKEY_DATA) + @javax.annotation.Nonnull private PasskeyData passkeyData; public PasskeyLoginFinishRsp() { } - public PasskeyLoginFinishRsp passkeyData(PasskeyData passkeyData) { + public PasskeyLoginFinishRsp passkeyData(@javax.annotation.Nonnull PasskeyData passkeyData) { this.passkeyData = passkeyData; return this; } @@ -73,7 +73,7 @@ public PasskeyData getPasskeyData() { return passkeyData; } - public void setPasskeyData(PasskeyData passkeyData) { + public void setPasskeyData(@javax.annotation.Nonnull PasskeyData passkeyData) { this.passkeyData = passkeyData; } diff --git a/src/main/java/com/corbado/generated/model/PasskeyLoginStartReq.java b/src/main/java/com/corbado/generated/model/PasskeyLoginStartReq.java index dec2ed6..47db659 100644 --- a/src/main/java/com/corbado/generated/model/PasskeyLoginStartReq.java +++ b/src/main/java/com/corbado/generated/model/PasskeyLoginStartReq.java @@ -39,7 +39,6 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; @@ -51,28 +50,32 @@ /** * PasskeyLoginStartReq */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-13T12:08:31.183817564Z[Etc/UTC]", comments = "Generator version: 7.8.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") public class PasskeyLoginStartReq { public static final String SERIALIZED_NAME_USER_I_D = "userID"; @SerializedName(SERIALIZED_NAME_USER_I_D) + @javax.annotation.Nonnull private String userID; public static final String SERIALIZED_NAME_CLIENT_INFORMATION = "clientInformation"; @SerializedName(SERIALIZED_NAME_CLIENT_INFORMATION) + @javax.annotation.Nonnull private ClientInformation clientInformation; public static final String SERIALIZED_NAME_CROSS_DEVICE_AUTHENTICATION_STRATEGY = "crossDeviceAuthenticationStrategy"; @SerializedName(SERIALIZED_NAME_CROSS_DEVICE_AUTHENTICATION_STRATEGY) + @javax.annotation.Nonnull private CrossDeviceAuthenticationStrategy crossDeviceAuthenticationStrategy; public static final String SERIALIZED_NAME_PROCESS_I_D = "processID"; @SerializedName(SERIALIZED_NAME_PROCESS_I_D) + @javax.annotation.Nonnull private String processID; public PasskeyLoginStartReq() { } - public PasskeyLoginStartReq userID(String userID) { + public PasskeyLoginStartReq userID(@javax.annotation.Nonnull String userID) { this.userID = userID; return this; } @@ -86,12 +89,12 @@ public String getUserID() { return userID; } - public void setUserID(String userID) { + public void setUserID(@javax.annotation.Nonnull String userID) { this.userID = userID; } - public PasskeyLoginStartReq clientInformation(ClientInformation clientInformation) { + public PasskeyLoginStartReq clientInformation(@javax.annotation.Nonnull ClientInformation clientInformation) { this.clientInformation = clientInformation; return this; } @@ -105,12 +108,12 @@ public ClientInformation getClientInformation() { return clientInformation; } - public void setClientInformation(ClientInformation clientInformation) { + public void setClientInformation(@javax.annotation.Nonnull ClientInformation clientInformation) { this.clientInformation = clientInformation; } - public PasskeyLoginStartReq crossDeviceAuthenticationStrategy(CrossDeviceAuthenticationStrategy crossDeviceAuthenticationStrategy) { + public PasskeyLoginStartReq crossDeviceAuthenticationStrategy(@javax.annotation.Nonnull CrossDeviceAuthenticationStrategy crossDeviceAuthenticationStrategy) { this.crossDeviceAuthenticationStrategy = crossDeviceAuthenticationStrategy; return this; } @@ -124,12 +127,12 @@ public CrossDeviceAuthenticationStrategy getCrossDeviceAuthenticationStrategy() return crossDeviceAuthenticationStrategy; } - public void setCrossDeviceAuthenticationStrategy(CrossDeviceAuthenticationStrategy crossDeviceAuthenticationStrategy) { + public void setCrossDeviceAuthenticationStrategy(@javax.annotation.Nonnull CrossDeviceAuthenticationStrategy crossDeviceAuthenticationStrategy) { this.crossDeviceAuthenticationStrategy = crossDeviceAuthenticationStrategy; } - public PasskeyLoginStartReq processID(String processID) { + public PasskeyLoginStartReq processID(@javax.annotation.Nonnull String processID) { this.processID = processID; return this; } @@ -143,7 +146,7 @@ public String getProcessID() { return processID; } - public void setProcessID(String processID) { + public void setProcessID(@javax.annotation.Nonnull String processID) { this.processID = processID; } diff --git a/src/main/java/com/corbado/generated/model/PasskeyLoginStartRsp.java b/src/main/java/com/corbado/generated/model/PasskeyLoginStartRsp.java index 6c9c90c..4853c53 100644 --- a/src/main/java/com/corbado/generated/model/PasskeyLoginStartRsp.java +++ b/src/main/java/com/corbado/generated/model/PasskeyLoginStartRsp.java @@ -41,7 +41,6 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; @@ -53,32 +52,42 @@ /** * PasskeyLoginStartRsp */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-13T12:08:31.183817564Z[Etc/UTC]", comments = "Generator version: 7.8.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") public class PasskeyLoginStartRsp { public static final String SERIALIZED_NAME_LOGIN_ALLOW = "loginAllow"; @SerializedName(SERIALIZED_NAME_LOGIN_ALLOW) + @javax.annotation.Nonnull private Boolean loginAllow; public static final String SERIALIZED_NAME_DETECTION_TAGS = "detectionTags"; @SerializedName(SERIALIZED_NAME_DETECTION_TAGS) + @javax.annotation.Nonnull private List detectionTags = new ArrayList<>(); public static final String SERIALIZED_NAME_DECISION_TAG = "decisionTag"; @SerializedName(SERIALIZED_NAME_DECISION_TAG) + @javax.annotation.Nonnull private DecisionTag decisionTag; + public static final String SERIALIZED_NAME_CREDENTIAL_COUNT = "credentialCount"; + @SerializedName(SERIALIZED_NAME_CREDENTIAL_COUNT) + @javax.annotation.Nonnull + private Integer credentialCount; + public static final String SERIALIZED_NAME_ASSERTION_OPTIONS = "assertionOptions"; @SerializedName(SERIALIZED_NAME_ASSERTION_OPTIONS) + @javax.annotation.Nonnull private String assertionOptions; public static final String SERIALIZED_NAME_IS_C_D_A_CANDIDATE = "isCDACandidate"; @SerializedName(SERIALIZED_NAME_IS_C_D_A_CANDIDATE) + @javax.annotation.Nonnull private Boolean isCDACandidate; public PasskeyLoginStartRsp() { } - public PasskeyLoginStartRsp loginAllow(Boolean loginAllow) { + public PasskeyLoginStartRsp loginAllow(@javax.annotation.Nonnull Boolean loginAllow) { this.loginAllow = loginAllow; return this; } @@ -92,12 +101,12 @@ public Boolean getLoginAllow() { return loginAllow; } - public void setLoginAllow(Boolean loginAllow) { + public void setLoginAllow(@javax.annotation.Nonnull Boolean loginAllow) { this.loginAllow = loginAllow; } - public PasskeyLoginStartRsp detectionTags(List detectionTags) { + public PasskeyLoginStartRsp detectionTags(@javax.annotation.Nonnull List detectionTags) { this.detectionTags = detectionTags; return this; } @@ -119,12 +128,12 @@ public List getDetectionTags() { return detectionTags; } - public void setDetectionTags(List detectionTags) { + public void setDetectionTags(@javax.annotation.Nonnull List detectionTags) { this.detectionTags = detectionTags; } - public PasskeyLoginStartRsp decisionTag(DecisionTag decisionTag) { + public PasskeyLoginStartRsp decisionTag(@javax.annotation.Nonnull DecisionTag decisionTag) { this.decisionTag = decisionTag; return this; } @@ -138,12 +147,31 @@ public DecisionTag getDecisionTag() { return decisionTag; } - public void setDecisionTag(DecisionTag decisionTag) { + public void setDecisionTag(@javax.annotation.Nonnull DecisionTag decisionTag) { this.decisionTag = decisionTag; } - public PasskeyLoginStartRsp assertionOptions(String assertionOptions) { + public PasskeyLoginStartRsp credentialCount(@javax.annotation.Nonnull Integer credentialCount) { + this.credentialCount = credentialCount; + return this; + } + + /** + * Get credentialCount + * @return credentialCount + */ + @javax.annotation.Nonnull + public Integer getCredentialCount() { + return credentialCount; + } + + public void setCredentialCount(@javax.annotation.Nonnull Integer credentialCount) { + this.credentialCount = credentialCount; + } + + + public PasskeyLoginStartRsp assertionOptions(@javax.annotation.Nonnull String assertionOptions) { this.assertionOptions = assertionOptions; return this; } @@ -157,12 +185,12 @@ public String getAssertionOptions() { return assertionOptions; } - public void setAssertionOptions(String assertionOptions) { + public void setAssertionOptions(@javax.annotation.Nonnull String assertionOptions) { this.assertionOptions = assertionOptions; } - public PasskeyLoginStartRsp isCDACandidate(Boolean isCDACandidate) { + public PasskeyLoginStartRsp isCDACandidate(@javax.annotation.Nonnull Boolean isCDACandidate) { this.isCDACandidate = isCDACandidate; return this; } @@ -176,7 +204,7 @@ public Boolean getIsCDACandidate() { return isCDACandidate; } - public void setIsCDACandidate(Boolean isCDACandidate) { + public void setIsCDACandidate(@javax.annotation.Nonnull Boolean isCDACandidate) { this.isCDACandidate = isCDACandidate; } @@ -194,13 +222,14 @@ public boolean equals(Object o) { return Objects.equals(this.loginAllow, passkeyLoginStartRsp.loginAllow) && Objects.equals(this.detectionTags, passkeyLoginStartRsp.detectionTags) && Objects.equals(this.decisionTag, passkeyLoginStartRsp.decisionTag) && + Objects.equals(this.credentialCount, passkeyLoginStartRsp.credentialCount) && Objects.equals(this.assertionOptions, passkeyLoginStartRsp.assertionOptions) && Objects.equals(this.isCDACandidate, passkeyLoginStartRsp.isCDACandidate); } @Override public int hashCode() { - return Objects.hash(loginAllow, detectionTags, decisionTag, assertionOptions, isCDACandidate); + return Objects.hash(loginAllow, detectionTags, decisionTag, credentialCount, assertionOptions, isCDACandidate); } @Override @@ -210,6 +239,7 @@ public String toString() { sb.append(" loginAllow: ").append(toIndentedString(loginAllow)).append("\n"); sb.append(" detectionTags: ").append(toIndentedString(detectionTags)).append("\n"); sb.append(" decisionTag: ").append(toIndentedString(decisionTag)).append("\n"); + sb.append(" credentialCount: ").append(toIndentedString(credentialCount)).append("\n"); sb.append(" assertionOptions: ").append(toIndentedString(assertionOptions)).append("\n"); sb.append(" isCDACandidate: ").append(toIndentedString(isCDACandidate)).append("\n"); sb.append("}"); @@ -237,6 +267,7 @@ private String toIndentedString(Object o) { openapiFields.add("loginAllow"); openapiFields.add("detectionTags"); openapiFields.add("decisionTag"); + openapiFields.add("credentialCount"); openapiFields.add("assertionOptions"); openapiFields.add("isCDACandidate"); @@ -245,6 +276,7 @@ private String toIndentedString(Object o) { openapiRequiredFields.add("loginAllow"); openapiRequiredFields.add("detectionTags"); openapiRequiredFields.add("decisionTag"); + openapiRequiredFields.add("credentialCount"); openapiRequiredFields.add("assertionOptions"); openapiRequiredFields.add("isCDACandidate"); } diff --git a/src/main/java/com/corbado/generated/model/PasskeyMediationFinishReq.java b/src/main/java/com/corbado/generated/model/PasskeyMediationFinishReq.java index 6a20401..c748eb1 100644 --- a/src/main/java/com/corbado/generated/model/PasskeyMediationFinishReq.java +++ b/src/main/java/com/corbado/generated/model/PasskeyMediationFinishReq.java @@ -38,7 +38,6 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; @@ -50,24 +49,27 @@ /** * PasskeyMediationFinishReq */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-13T12:08:31.183817564Z[Etc/UTC]", comments = "Generator version: 7.8.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") public class PasskeyMediationFinishReq { public static final String SERIALIZED_NAME_ASSERTION_RESPONSE = "assertionResponse"; @SerializedName(SERIALIZED_NAME_ASSERTION_RESPONSE) + @javax.annotation.Nonnull private String assertionResponse; public static final String SERIALIZED_NAME_CLIENT_INFORMATION = "clientInformation"; @SerializedName(SERIALIZED_NAME_CLIENT_INFORMATION) + @javax.annotation.Nonnull private ClientInformation clientInformation; public static final String SERIALIZED_NAME_PROCESS_I_D = "processID"; @SerializedName(SERIALIZED_NAME_PROCESS_I_D) + @javax.annotation.Nonnull private String processID; public PasskeyMediationFinishReq() { } - public PasskeyMediationFinishReq assertionResponse(String assertionResponse) { + public PasskeyMediationFinishReq assertionResponse(@javax.annotation.Nonnull String assertionResponse) { this.assertionResponse = assertionResponse; return this; } @@ -81,12 +83,12 @@ public String getAssertionResponse() { return assertionResponse; } - public void setAssertionResponse(String assertionResponse) { + public void setAssertionResponse(@javax.annotation.Nonnull String assertionResponse) { this.assertionResponse = assertionResponse; } - public PasskeyMediationFinishReq clientInformation(ClientInformation clientInformation) { + public PasskeyMediationFinishReq clientInformation(@javax.annotation.Nonnull ClientInformation clientInformation) { this.clientInformation = clientInformation; return this; } @@ -100,12 +102,12 @@ public ClientInformation getClientInformation() { return clientInformation; } - public void setClientInformation(ClientInformation clientInformation) { + public void setClientInformation(@javax.annotation.Nonnull ClientInformation clientInformation) { this.clientInformation = clientInformation; } - public PasskeyMediationFinishReq processID(String processID) { + public PasskeyMediationFinishReq processID(@javax.annotation.Nonnull String processID) { this.processID = processID; return this; } @@ -119,7 +121,7 @@ public String getProcessID() { return processID; } - public void setProcessID(String processID) { + public void setProcessID(@javax.annotation.Nonnull String processID) { this.processID = processID; } diff --git a/src/main/java/com/corbado/generated/model/PasskeyMediationFinishRsp.java b/src/main/java/com/corbado/generated/model/PasskeyMediationFinishRsp.java index 72043b4..d42ce87 100644 --- a/src/main/java/com/corbado/generated/model/PasskeyMediationFinishRsp.java +++ b/src/main/java/com/corbado/generated/model/PasskeyMediationFinishRsp.java @@ -38,7 +38,6 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; @@ -50,16 +49,17 @@ /** * PasskeyMediationFinishRsp */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-13T12:08:31.183817564Z[Etc/UTC]", comments = "Generator version: 7.8.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") public class PasskeyMediationFinishRsp { public static final String SERIALIZED_NAME_PASSKEY_DATA = "passkeyData"; @SerializedName(SERIALIZED_NAME_PASSKEY_DATA) + @javax.annotation.Nonnull private PasskeyData passkeyData; public PasskeyMediationFinishRsp() { } - public PasskeyMediationFinishRsp passkeyData(PasskeyData passkeyData) { + public PasskeyMediationFinishRsp passkeyData(@javax.annotation.Nonnull PasskeyData passkeyData) { this.passkeyData = passkeyData; return this; } @@ -73,7 +73,7 @@ public PasskeyData getPasskeyData() { return passkeyData; } - public void setPasskeyData(PasskeyData passkeyData) { + public void setPasskeyData(@javax.annotation.Nonnull PasskeyData passkeyData) { this.passkeyData = passkeyData; } diff --git a/src/main/java/com/corbado/generated/model/PasskeyMediationStartReq.java b/src/main/java/com/corbado/generated/model/PasskeyMediationStartReq.java index dc96f30..8f3a5f1 100644 --- a/src/main/java/com/corbado/generated/model/PasskeyMediationStartReq.java +++ b/src/main/java/com/corbado/generated/model/PasskeyMediationStartReq.java @@ -38,7 +38,6 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; @@ -50,16 +49,17 @@ /** * PasskeyMediationStartReq */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-13T12:08:31.183817564Z[Etc/UTC]", comments = "Generator version: 7.8.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") public class PasskeyMediationStartReq { public static final String SERIALIZED_NAME_CLIENT_INFORMATION = "clientInformation"; @SerializedName(SERIALIZED_NAME_CLIENT_INFORMATION) + @javax.annotation.Nonnull private ClientInformation clientInformation; public PasskeyMediationStartReq() { } - public PasskeyMediationStartReq clientInformation(ClientInformation clientInformation) { + public PasskeyMediationStartReq clientInformation(@javax.annotation.Nonnull ClientInformation clientInformation) { this.clientInformation = clientInformation; return this; } @@ -73,7 +73,7 @@ public ClientInformation getClientInformation() { return clientInformation; } - public void setClientInformation(ClientInformation clientInformation) { + public void setClientInformation(@javax.annotation.Nonnull ClientInformation clientInformation) { this.clientInformation = clientInformation; } diff --git a/src/main/java/com/corbado/generated/model/PasskeyMediationStartRsp.java b/src/main/java/com/corbado/generated/model/PasskeyMediationStartRsp.java index 0886171..28d7cdb 100644 --- a/src/main/java/com/corbado/generated/model/PasskeyMediationStartRsp.java +++ b/src/main/java/com/corbado/generated/model/PasskeyMediationStartRsp.java @@ -37,7 +37,6 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; @@ -49,20 +48,22 @@ /** * PasskeyMediationStartRsp */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-13T12:08:31.183817564Z[Etc/UTC]", comments = "Generator version: 7.8.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") public class PasskeyMediationStartRsp { public static final String SERIALIZED_NAME_LOGIN_ALLOW = "loginAllow"; @SerializedName(SERIALIZED_NAME_LOGIN_ALLOW) + @javax.annotation.Nonnull private Boolean loginAllow; public static final String SERIALIZED_NAME_ASSERTION_OPTIONS = "assertionOptions"; @SerializedName(SERIALIZED_NAME_ASSERTION_OPTIONS) + @javax.annotation.Nonnull private String assertionOptions; public PasskeyMediationStartRsp() { } - public PasskeyMediationStartRsp loginAllow(Boolean loginAllow) { + public PasskeyMediationStartRsp loginAllow(@javax.annotation.Nonnull Boolean loginAllow) { this.loginAllow = loginAllow; return this; } @@ -76,12 +77,12 @@ public Boolean getLoginAllow() { return loginAllow; } - public void setLoginAllow(Boolean loginAllow) { + public void setLoginAllow(@javax.annotation.Nonnull Boolean loginAllow) { this.loginAllow = loginAllow; } - public PasskeyMediationStartRsp assertionOptions(String assertionOptions) { + public PasskeyMediationStartRsp assertionOptions(@javax.annotation.Nonnull String assertionOptions) { this.assertionOptions = assertionOptions; return this; } @@ -95,7 +96,7 @@ public String getAssertionOptions() { return assertionOptions; } - public void setAssertionOptions(String assertionOptions) { + public void setAssertionOptions(@javax.annotation.Nonnull String assertionOptions) { this.assertionOptions = assertionOptions; } diff --git a/src/main/java/com/corbado/generated/model/ProjectConfigUpdateCnameReq.java b/src/main/java/com/corbado/generated/model/ProjectConfigUpdateCnameReq.java index 305aa7d..62cfa12 100644 --- a/src/main/java/com/corbado/generated/model/ProjectConfigUpdateCnameReq.java +++ b/src/main/java/com/corbado/generated/model/ProjectConfigUpdateCnameReq.java @@ -37,7 +37,6 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; @@ -49,16 +48,17 @@ /** * ProjectConfigUpdateCnameReq */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-13T12:08:31.183817564Z[Etc/UTC]", comments = "Generator version: 7.8.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") public class ProjectConfigUpdateCnameReq { public static final String SERIALIZED_NAME_CNAME = "cname"; @SerializedName(SERIALIZED_NAME_CNAME) + @javax.annotation.Nonnull private String cname; public ProjectConfigUpdateCnameReq() { } - public ProjectConfigUpdateCnameReq cname(String cname) { + public ProjectConfigUpdateCnameReq cname(@javax.annotation.Nonnull String cname) { this.cname = cname; return this; } @@ -72,7 +72,7 @@ public String getCname() { return cname; } - public void setCname(String cname) { + public void setCname(@javax.annotation.Nonnull String cname) { this.cname = cname; } diff --git a/src/main/java/com/corbado/generated/model/RequestData.java b/src/main/java/com/corbado/generated/model/RequestData.java index 907c522..9f08758 100644 --- a/src/main/java/com/corbado/generated/model/RequestData.java +++ b/src/main/java/com/corbado/generated/model/RequestData.java @@ -37,7 +37,6 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; @@ -49,20 +48,22 @@ /** * Data about the request itself, can be used for debugging */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-13T12:08:31.183817564Z[Etc/UTC]", comments = "Generator version: 7.8.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") public class RequestData { public static final String SERIALIZED_NAME_REQUEST_I_D = "requestID"; @SerializedName(SERIALIZED_NAME_REQUEST_I_D) + @javax.annotation.Nonnull private String requestID; public static final String SERIALIZED_NAME_LINK = "link"; @SerializedName(SERIALIZED_NAME_LINK) + @javax.annotation.Nullable private String link; public RequestData() { } - public RequestData requestID(String requestID) { + public RequestData requestID(@javax.annotation.Nonnull String requestID) { this.requestID = requestID; return this; } @@ -76,12 +77,12 @@ public String getRequestID() { return requestID; } - public void setRequestID(String requestID) { + public void setRequestID(@javax.annotation.Nonnull String requestID) { this.requestID = requestID; } - public RequestData link(String link) { + public RequestData link(@javax.annotation.Nullable String link) { this.link = link; return this; } @@ -90,12 +91,12 @@ public RequestData link(String link) { * Link to dashboard with details about request * @return link */ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getLink() { return link; } - public void setLink(String link) { + public void setLink(@javax.annotation.Nullable String link) { this.link = link; } @@ -153,7 +154,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); openapiRequiredFields.add("requestID"); - openapiRequiredFields.add("link"); } /** @@ -187,7 +187,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (!jsonObj.get("requestID").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `requestID` to be a primitive type in the JSON string but got `%s`", jsonObj.get("requestID").toString())); } - if (!jsonObj.get("link").isJsonPrimitive()) { + if ((jsonObj.get("link") != null && !jsonObj.get("link").isJsonNull()) && !jsonObj.get("link").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `link` to be a primitive type in the JSON string but got `%s`", jsonObj.get("link").toString())); } } diff --git a/src/main/java/com/corbado/generated/model/ShortSession.java b/src/main/java/com/corbado/generated/model/ShortSession.java index abbdf37..1211dd8 100644 --- a/src/main/java/com/corbado/generated/model/ShortSession.java +++ b/src/main/java/com/corbado/generated/model/ShortSession.java @@ -37,7 +37,6 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; @@ -49,16 +48,17 @@ /** * ShortSession */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-13T12:08:31.183817564Z[Etc/UTC]", comments = "Generator version: 7.8.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") public class ShortSession { public static final String SERIALIZED_NAME_VALUE = "value"; @SerializedName(SERIALIZED_NAME_VALUE) + @javax.annotation.Nonnull private String value; public ShortSession() { } - public ShortSession value(String value) { + public ShortSession value(@javax.annotation.Nonnull String value) { this.value = value; return this; } @@ -72,7 +72,7 @@ public String getValue() { return value; } - public void setValue(String value) { + public void setValue(@javax.annotation.Nonnull String value) { this.value = value; } diff --git a/src/main/java/com/corbado/generated/model/ShortSessionCreateReq.java b/src/main/java/com/corbado/generated/model/ShortSessionCreateReq.java index 3accf4e..1e93635 100644 --- a/src/main/java/com/corbado/generated/model/ShortSessionCreateReq.java +++ b/src/main/java/com/corbado/generated/model/ShortSessionCreateReq.java @@ -38,7 +38,6 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; @@ -50,20 +49,22 @@ /** * ShortSessionCreateReq */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-13T12:08:31.183817564Z[Etc/UTC]", comments = "Generator version: 7.8.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") public class ShortSessionCreateReq { public static final String SERIALIZED_NAME_APP_TYPE = "appType"; @SerializedName(SERIALIZED_NAME_APP_TYPE) + @javax.annotation.Nonnull private AppType appType; public static final String SERIALIZED_NAME_ISSUER = "issuer"; @SerializedName(SERIALIZED_NAME_ISSUER) + @javax.annotation.Nonnull private String issuer; public ShortSessionCreateReq() { } - public ShortSessionCreateReq appType(AppType appType) { + public ShortSessionCreateReq appType(@javax.annotation.Nonnull AppType appType) { this.appType = appType; return this; } @@ -77,12 +78,12 @@ public AppType getAppType() { return appType; } - public void setAppType(AppType appType) { + public void setAppType(@javax.annotation.Nonnull AppType appType) { this.appType = appType; } - public ShortSessionCreateReq issuer(String issuer) { + public ShortSessionCreateReq issuer(@javax.annotation.Nonnull String issuer) { this.issuer = issuer; return this; } @@ -96,7 +97,7 @@ public String getIssuer() { return issuer; } - public void setIssuer(String issuer) { + public void setIssuer(@javax.annotation.Nonnull String issuer) { this.issuer = issuer; } diff --git a/src/main/java/com/corbado/generated/model/SocialAccount.java b/src/main/java/com/corbado/generated/model/SocialAccount.java index fcad5ea..53162f1 100644 --- a/src/main/java/com/corbado/generated/model/SocialAccount.java +++ b/src/main/java/com/corbado/generated/model/SocialAccount.java @@ -37,7 +37,6 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; @@ -49,40 +48,47 @@ /** * SocialAccount */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-13T12:08:31.183817564Z[Etc/UTC]", comments = "Generator version: 7.8.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") public class SocialAccount { public static final String SERIALIZED_NAME_SOCIAL_ACCOUNT_I_D = "socialAccountID"; @SerializedName(SERIALIZED_NAME_SOCIAL_ACCOUNT_I_D) + @javax.annotation.Nonnull private String socialAccountID; public static final String SERIALIZED_NAME_PROVIDER_TYPE = "providerType"; @SerializedName(SERIALIZED_NAME_PROVIDER_TYPE) + @javax.annotation.Nonnull private String providerType; public static final String SERIALIZED_NAME_IDENTIFIER_VALUE = "identifierValue"; @SerializedName(SERIALIZED_NAME_IDENTIFIER_VALUE) + @javax.annotation.Nonnull private String identifierValue; public static final String SERIALIZED_NAME_USER_I_D = "userID"; @SerializedName(SERIALIZED_NAME_USER_I_D) + @javax.annotation.Nonnull private String userID; public static final String SERIALIZED_NAME_FOREIGN_I_D = "foreignID"; @SerializedName(SERIALIZED_NAME_FOREIGN_I_D) + @javax.annotation.Nonnull private String foreignID; public static final String SERIALIZED_NAME_AVATAR_U_R_L = "avatarURL"; @SerializedName(SERIALIZED_NAME_AVATAR_U_R_L) + @javax.annotation.Nonnull private String avatarURL; public static final String SERIALIZED_NAME_FULL_NAME = "fullName"; @SerializedName(SERIALIZED_NAME_FULL_NAME) + @javax.annotation.Nonnull private String fullName; public SocialAccount() { } - public SocialAccount socialAccountID(String socialAccountID) { + public SocialAccount socialAccountID(@javax.annotation.Nonnull String socialAccountID) { this.socialAccountID = socialAccountID; return this; } @@ -96,12 +102,12 @@ public String getSocialAccountID() { return socialAccountID; } - public void setSocialAccountID(String socialAccountID) { + public void setSocialAccountID(@javax.annotation.Nonnull String socialAccountID) { this.socialAccountID = socialAccountID; } - public SocialAccount providerType(String providerType) { + public SocialAccount providerType(@javax.annotation.Nonnull String providerType) { this.providerType = providerType; return this; } @@ -115,12 +121,12 @@ public String getProviderType() { return providerType; } - public void setProviderType(String providerType) { + public void setProviderType(@javax.annotation.Nonnull String providerType) { this.providerType = providerType; } - public SocialAccount identifierValue(String identifierValue) { + public SocialAccount identifierValue(@javax.annotation.Nonnull String identifierValue) { this.identifierValue = identifierValue; return this; } @@ -134,12 +140,12 @@ public String getIdentifierValue() { return identifierValue; } - public void setIdentifierValue(String identifierValue) { + public void setIdentifierValue(@javax.annotation.Nonnull String identifierValue) { this.identifierValue = identifierValue; } - public SocialAccount userID(String userID) { + public SocialAccount userID(@javax.annotation.Nonnull String userID) { this.userID = userID; return this; } @@ -153,12 +159,12 @@ public String getUserID() { return userID; } - public void setUserID(String userID) { + public void setUserID(@javax.annotation.Nonnull String userID) { this.userID = userID; } - public SocialAccount foreignID(String foreignID) { + public SocialAccount foreignID(@javax.annotation.Nonnull String foreignID) { this.foreignID = foreignID; return this; } @@ -172,12 +178,12 @@ public String getForeignID() { return foreignID; } - public void setForeignID(String foreignID) { + public void setForeignID(@javax.annotation.Nonnull String foreignID) { this.foreignID = foreignID; } - public SocialAccount avatarURL(String avatarURL) { + public SocialAccount avatarURL(@javax.annotation.Nonnull String avatarURL) { this.avatarURL = avatarURL; return this; } @@ -191,12 +197,12 @@ public String getAvatarURL() { return avatarURL; } - public void setAvatarURL(String avatarURL) { + public void setAvatarURL(@javax.annotation.Nonnull String avatarURL) { this.avatarURL = avatarURL; } - public SocialAccount fullName(String fullName) { + public SocialAccount fullName(@javax.annotation.Nonnull String fullName) { this.fullName = fullName; return this; } @@ -210,7 +216,7 @@ public String getFullName() { return fullName; } - public void setFullName(String fullName) { + public void setFullName(@javax.annotation.Nonnull String fullName) { this.fullName = fullName; } diff --git a/src/main/java/com/corbado/generated/model/SocialAccountCreateReq.java b/src/main/java/com/corbado/generated/model/SocialAccountCreateReq.java index 22ce26a..3687a7e 100644 --- a/src/main/java/com/corbado/generated/model/SocialAccountCreateReq.java +++ b/src/main/java/com/corbado/generated/model/SocialAccountCreateReq.java @@ -38,7 +38,6 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; @@ -50,32 +49,37 @@ /** * SocialAccountCreateReq */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-13T12:08:31.183817564Z[Etc/UTC]", comments = "Generator version: 7.8.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") public class SocialAccountCreateReq { public static final String SERIALIZED_NAME_PROVIDER_TYPE = "providerType"; @SerializedName(SERIALIZED_NAME_PROVIDER_TYPE) + @javax.annotation.Nonnull private SocialProviderType providerType; public static final String SERIALIZED_NAME_IDENTIFIER_VALUE = "identifierValue"; @SerializedName(SERIALIZED_NAME_IDENTIFIER_VALUE) + @javax.annotation.Nonnull private String identifierValue; public static final String SERIALIZED_NAME_FOREIGN_I_D = "foreignID"; @SerializedName(SERIALIZED_NAME_FOREIGN_I_D) + @javax.annotation.Nonnull private String foreignID; public static final String SERIALIZED_NAME_AVATAR_U_R_L = "avatarURL"; @SerializedName(SERIALIZED_NAME_AVATAR_U_R_L) + @javax.annotation.Nonnull private String avatarURL; public static final String SERIALIZED_NAME_FULL_NAME = "fullName"; @SerializedName(SERIALIZED_NAME_FULL_NAME) + @javax.annotation.Nonnull private String fullName; public SocialAccountCreateReq() { } - public SocialAccountCreateReq providerType(SocialProviderType providerType) { + public SocialAccountCreateReq providerType(@javax.annotation.Nonnull SocialProviderType providerType) { this.providerType = providerType; return this; } @@ -89,12 +93,12 @@ public SocialProviderType getProviderType() { return providerType; } - public void setProviderType(SocialProviderType providerType) { + public void setProviderType(@javax.annotation.Nonnull SocialProviderType providerType) { this.providerType = providerType; } - public SocialAccountCreateReq identifierValue(String identifierValue) { + public SocialAccountCreateReq identifierValue(@javax.annotation.Nonnull String identifierValue) { this.identifierValue = identifierValue; return this; } @@ -108,12 +112,12 @@ public String getIdentifierValue() { return identifierValue; } - public void setIdentifierValue(String identifierValue) { + public void setIdentifierValue(@javax.annotation.Nonnull String identifierValue) { this.identifierValue = identifierValue; } - public SocialAccountCreateReq foreignID(String foreignID) { + public SocialAccountCreateReq foreignID(@javax.annotation.Nonnull String foreignID) { this.foreignID = foreignID; return this; } @@ -127,12 +131,12 @@ public String getForeignID() { return foreignID; } - public void setForeignID(String foreignID) { + public void setForeignID(@javax.annotation.Nonnull String foreignID) { this.foreignID = foreignID; } - public SocialAccountCreateReq avatarURL(String avatarURL) { + public SocialAccountCreateReq avatarURL(@javax.annotation.Nonnull String avatarURL) { this.avatarURL = avatarURL; return this; } @@ -146,12 +150,12 @@ public String getAvatarURL() { return avatarURL; } - public void setAvatarURL(String avatarURL) { + public void setAvatarURL(@javax.annotation.Nonnull String avatarURL) { this.avatarURL = avatarURL; } - public SocialAccountCreateReq fullName(String fullName) { + public SocialAccountCreateReq fullName(@javax.annotation.Nonnull String fullName) { this.fullName = fullName; return this; } @@ -165,7 +169,7 @@ public String getFullName() { return fullName; } - public void setFullName(String fullName) { + public void setFullName(@javax.annotation.Nonnull String fullName) { this.fullName = fullName; } diff --git a/src/main/java/com/corbado/generated/model/SocialAccountList.java b/src/main/java/com/corbado/generated/model/SocialAccountList.java index 1b9f92e..edb8542 100644 --- a/src/main/java/com/corbado/generated/model/SocialAccountList.java +++ b/src/main/java/com/corbado/generated/model/SocialAccountList.java @@ -41,7 +41,6 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; @@ -53,20 +52,22 @@ /** * SocialAccountList */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-13T12:08:31.183817564Z[Etc/UTC]", comments = "Generator version: 7.8.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") public class SocialAccountList { public static final String SERIALIZED_NAME_SOCIAL_ACCOUNTS = "socialAccounts"; @SerializedName(SERIALIZED_NAME_SOCIAL_ACCOUNTS) + @javax.annotation.Nonnull private List socialAccounts = new ArrayList<>(); public static final String SERIALIZED_NAME_PAGING = "paging"; @SerializedName(SERIALIZED_NAME_PAGING) + @javax.annotation.Nonnull private Paging paging; public SocialAccountList() { } - public SocialAccountList socialAccounts(List socialAccounts) { + public SocialAccountList socialAccounts(@javax.annotation.Nonnull List socialAccounts) { this.socialAccounts = socialAccounts; return this; } @@ -88,12 +89,12 @@ public List getSocialAccounts() { return socialAccounts; } - public void setSocialAccounts(List socialAccounts) { + public void setSocialAccounts(@javax.annotation.Nonnull List socialAccounts) { this.socialAccounts = socialAccounts; } - public SocialAccountList paging(Paging paging) { + public SocialAccountList paging(@javax.annotation.Nonnull Paging paging) { this.paging = paging; return this; } @@ -107,7 +108,7 @@ public Paging getPaging() { return paging; } - public void setPaging(Paging paging) { + public void setPaging(@javax.annotation.Nonnull Paging paging) { this.paging = paging; } diff --git a/src/main/java/com/corbado/generated/model/User.java b/src/main/java/com/corbado/generated/model/User.java index f8ac423..8f47706 100644 --- a/src/main/java/com/corbado/generated/model/User.java +++ b/src/main/java/com/corbado/generated/model/User.java @@ -38,7 +38,6 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; @@ -50,28 +49,32 @@ /** * User */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-13T12:08:31.183817564Z[Etc/UTC]", comments = "Generator version: 7.8.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") public class User { public static final String SERIALIZED_NAME_USER_I_D = "userID"; @SerializedName(SERIALIZED_NAME_USER_I_D) + @javax.annotation.Nonnull private String userID; public static final String SERIALIZED_NAME_FULL_NAME = "fullName"; @SerializedName(SERIALIZED_NAME_FULL_NAME) + @javax.annotation.Nullable private String fullName; public static final String SERIALIZED_NAME_STATUS = "status"; @SerializedName(SERIALIZED_NAME_STATUS) + @javax.annotation.Nonnull private UserStatus status; public static final String SERIALIZED_NAME_EXPLICIT_WEBAUTHN_I_D = "explicitWebauthnID"; @SerializedName(SERIALIZED_NAME_EXPLICIT_WEBAUTHN_I_D) + @javax.annotation.Nullable private String explicitWebauthnID; public User() { } - public User userID(String userID) { + public User userID(@javax.annotation.Nonnull String userID) { this.userID = userID; return this; } @@ -85,12 +88,12 @@ public String getUserID() { return userID; } - public void setUserID(String userID) { + public void setUserID(@javax.annotation.Nonnull String userID) { this.userID = userID; } - public User fullName(String fullName) { + public User fullName(@javax.annotation.Nullable String fullName) { this.fullName = fullName; return this; } @@ -104,12 +107,12 @@ public String getFullName() { return fullName; } - public void setFullName(String fullName) { + public void setFullName(@javax.annotation.Nullable String fullName) { this.fullName = fullName; } - public User status(UserStatus status) { + public User status(@javax.annotation.Nonnull UserStatus status) { this.status = status; return this; } @@ -123,12 +126,12 @@ public UserStatus getStatus() { return status; } - public void setStatus(UserStatus status) { + public void setStatus(@javax.annotation.Nonnull UserStatus status) { this.status = status; } - public User explicitWebauthnID(String explicitWebauthnID) { + public User explicitWebauthnID(@javax.annotation.Nullable String explicitWebauthnID) { this.explicitWebauthnID = explicitWebauthnID; return this; } @@ -142,7 +145,7 @@ public String getExplicitWebauthnID() { return explicitWebauthnID; } - public void setExplicitWebauthnID(String explicitWebauthnID) { + public void setExplicitWebauthnID(@javax.annotation.Nullable String explicitWebauthnID) { this.explicitWebauthnID = explicitWebauthnID; } diff --git a/src/main/java/com/corbado/generated/model/UserCreateReq.java b/src/main/java/com/corbado/generated/model/UserCreateReq.java index 8ffa903..dba006c 100644 --- a/src/main/java/com/corbado/generated/model/UserCreateReq.java +++ b/src/main/java/com/corbado/generated/model/UserCreateReq.java @@ -38,7 +38,6 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; @@ -50,24 +49,27 @@ /** * UserCreateReq */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-13T12:08:31.183817564Z[Etc/UTC]", comments = "Generator version: 7.8.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") public class UserCreateReq { public static final String SERIALIZED_NAME_FULL_NAME = "fullName"; @SerializedName(SERIALIZED_NAME_FULL_NAME) + @javax.annotation.Nullable private String fullName; public static final String SERIALIZED_NAME_STATUS = "status"; @SerializedName(SERIALIZED_NAME_STATUS) + @javax.annotation.Nonnull private UserStatus status; public static final String SERIALIZED_NAME_EXPLICIT_WEBAUTHN_I_D = "explicitWebauthnID"; @SerializedName(SERIALIZED_NAME_EXPLICIT_WEBAUTHN_I_D) + @javax.annotation.Nullable private String explicitWebauthnID; public UserCreateReq() { } - public UserCreateReq fullName(String fullName) { + public UserCreateReq fullName(@javax.annotation.Nullable String fullName) { this.fullName = fullName; return this; } @@ -81,12 +83,12 @@ public String getFullName() { return fullName; } - public void setFullName(String fullName) { + public void setFullName(@javax.annotation.Nullable String fullName) { this.fullName = fullName; } - public UserCreateReq status(UserStatus status) { + public UserCreateReq status(@javax.annotation.Nonnull UserStatus status) { this.status = status; return this; } @@ -100,12 +102,12 @@ public UserStatus getStatus() { return status; } - public void setStatus(UserStatus status) { + public void setStatus(@javax.annotation.Nonnull UserStatus status) { this.status = status; } - public UserCreateReq explicitWebauthnID(String explicitWebauthnID) { + public UserCreateReq explicitWebauthnID(@javax.annotation.Nullable String explicitWebauthnID) { this.explicitWebauthnID = explicitWebauthnID; return this; } @@ -119,7 +121,7 @@ public String getExplicitWebauthnID() { return explicitWebauthnID; } - public void setExplicitWebauthnID(String explicitWebauthnID) { + public void setExplicitWebauthnID(@javax.annotation.Nullable String explicitWebauthnID) { this.explicitWebauthnID = explicitWebauthnID; } diff --git a/src/main/java/com/corbado/generated/model/UserUpdateReq.java b/src/main/java/com/corbado/generated/model/UserUpdateReq.java index a9caf55..e3a25c3 100644 --- a/src/main/java/com/corbado/generated/model/UserUpdateReq.java +++ b/src/main/java/com/corbado/generated/model/UserUpdateReq.java @@ -38,7 +38,6 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; @@ -50,20 +49,22 @@ /** * UserUpdateReq */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-13T12:08:31.183817564Z[Etc/UTC]", comments = "Generator version: 7.8.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") public class UserUpdateReq { public static final String SERIALIZED_NAME_FULL_NAME = "fullName"; @SerializedName(SERIALIZED_NAME_FULL_NAME) + @javax.annotation.Nullable private String fullName; public static final String SERIALIZED_NAME_STATUS = "status"; @SerializedName(SERIALIZED_NAME_STATUS) + @javax.annotation.Nullable private UserStatus status; public UserUpdateReq() { } - public UserUpdateReq fullName(String fullName) { + public UserUpdateReq fullName(@javax.annotation.Nullable String fullName) { this.fullName = fullName; return this; } @@ -77,12 +78,12 @@ public String getFullName() { return fullName; } - public void setFullName(String fullName) { + public void setFullName(@javax.annotation.Nullable String fullName) { this.fullName = fullName; } - public UserUpdateReq status(UserStatus status) { + public UserUpdateReq status(@javax.annotation.Nullable UserStatus status) { this.status = status; return this; } @@ -96,7 +97,7 @@ public UserStatus getStatus() { return status; } - public void setStatus(UserStatus status) { + public void setStatus(@javax.annotation.Nullable UserStatus status) { this.status = status; } diff --git a/src/main/java/com/corbado/generated/model/WebhookEndpoint.java b/src/main/java/com/corbado/generated/model/WebhookEndpoint.java new file mode 100644 index 0000000..96e31e4 --- /dev/null +++ b/src/main/java/com/corbado/generated/model/WebhookEndpoint.java @@ -0,0 +1,380 @@ +/* + * Corbado Backend API + * # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@corbado.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.corbado.generated.model; + +import java.util.Objects; +import com.corbado.generated.model.WebhookEventType; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.corbado.generated.invoker.JSON; + +/** + * WebhookEndpoint + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") +public class WebhookEndpoint { + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull + private String id; + + public static final String SERIALIZED_NAME_URL = "url"; + @SerializedName(SERIALIZED_NAME_URL) + @javax.annotation.Nonnull + private String url; + + public static final String SERIALIZED_NAME_CUSTOM_HEADERS = "customHeaders"; + @SerializedName(SERIALIZED_NAME_CUSTOM_HEADERS) + @javax.annotation.Nonnull + private Object customHeaders; + + public static final String SERIALIZED_NAME_SUBSCRIBED_EVENTS = "subscribedEvents"; + @SerializedName(SERIALIZED_NAME_SUBSCRIBED_EVENTS) + @javax.annotation.Nonnull + private List subscribedEvents = new ArrayList<>(); + + public static final String SERIALIZED_NAME_CREATED = "created"; + @SerializedName(SERIALIZED_NAME_CREATED) + @javax.annotation.Nonnull + private String created; + + public static final String SERIALIZED_NAME_UPDATED = "updated"; + @SerializedName(SERIALIZED_NAME_UPDATED) + @javax.annotation.Nonnull + private String updated; + + public WebhookEndpoint() { + } + + public WebhookEndpoint id(@javax.annotation.Nonnull String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nonnull String id) { + this.id = id; + } + + + public WebhookEndpoint url(@javax.annotation.Nonnull String url) { + this.url = url; + return this; + } + + /** + * Get url + * @return url + */ + @javax.annotation.Nonnull + public String getUrl() { + return url; + } + + public void setUrl(@javax.annotation.Nonnull String url) { + this.url = url; + } + + + public WebhookEndpoint customHeaders(@javax.annotation.Nonnull Object customHeaders) { + this.customHeaders = customHeaders; + return this; + } + + /** + * Get customHeaders + * @return customHeaders + */ + @javax.annotation.Nonnull + public Object getCustomHeaders() { + return customHeaders; + } + + public void setCustomHeaders(@javax.annotation.Nonnull Object customHeaders) { + this.customHeaders = customHeaders; + } + + + public WebhookEndpoint subscribedEvents(@javax.annotation.Nonnull List subscribedEvents) { + this.subscribedEvents = subscribedEvents; + return this; + } + + public WebhookEndpoint addSubscribedEventsItem(WebhookEventType subscribedEventsItem) { + if (this.subscribedEvents == null) { + this.subscribedEvents = new ArrayList<>(); + } + this.subscribedEvents.add(subscribedEventsItem); + return this; + } + + /** + * Get subscribedEvents + * @return subscribedEvents + */ + @javax.annotation.Nonnull + public List getSubscribedEvents() { + return subscribedEvents; + } + + public void setSubscribedEvents(@javax.annotation.Nonnull List subscribedEvents) { + this.subscribedEvents = subscribedEvents; + } + + + public WebhookEndpoint created(@javax.annotation.Nonnull String created) { + this.created = created; + return this; + } + + /** + * Get created + * @return created + */ + @javax.annotation.Nonnull + public String getCreated() { + return created; + } + + public void setCreated(@javax.annotation.Nonnull String created) { + this.created = created; + } + + + public WebhookEndpoint updated(@javax.annotation.Nonnull String updated) { + this.updated = updated; + return this; + } + + /** + * Get updated + * @return updated + */ + @javax.annotation.Nonnull + public String getUpdated() { + return updated; + } + + public void setUpdated(@javax.annotation.Nonnull String updated) { + this.updated = updated; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + WebhookEndpoint webhookEndpoint = (WebhookEndpoint) o; + return Objects.equals(this.id, webhookEndpoint.id) && + Objects.equals(this.url, webhookEndpoint.url) && + Objects.equals(this.customHeaders, webhookEndpoint.customHeaders) && + Objects.equals(this.subscribedEvents, webhookEndpoint.subscribedEvents) && + Objects.equals(this.created, webhookEndpoint.created) && + Objects.equals(this.updated, webhookEndpoint.updated); + } + + @Override + public int hashCode() { + return Objects.hash(id, url, customHeaders, subscribedEvents, created, updated); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class WebhookEndpoint {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" url: ").append(toIndentedString(url)).append("\n"); + sb.append(" customHeaders: ").append(toIndentedString(customHeaders)).append("\n"); + sb.append(" subscribedEvents: ").append(toIndentedString(subscribedEvents)).append("\n"); + sb.append(" created: ").append(toIndentedString(created)).append("\n"); + sb.append(" updated: ").append(toIndentedString(updated)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("url"); + openapiFields.add("customHeaders"); + openapiFields.add("subscribedEvents"); + openapiFields.add("created"); + openapiFields.add("updated"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("id"); + openapiRequiredFields.add("url"); + openapiRequiredFields.add("customHeaders"); + openapiRequiredFields.add("subscribedEvents"); + openapiRequiredFields.add("created"); + openapiRequiredFields.add("updated"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to WebhookEndpoint + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!WebhookEndpoint.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in WebhookEndpoint is not found in the empty JSON string", WebhookEndpoint.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!WebhookEndpoint.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `WebhookEndpoint` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : WebhookEndpoint.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + if (!jsonObj.get("url").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("url").toString())); + } + // ensure the required json array is present + if (jsonObj.get("subscribedEvents") == null) { + throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); + } else if (!jsonObj.get("subscribedEvents").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `subscribedEvents` to be an array in the JSON string but got `%s`", jsonObj.get("subscribedEvents").toString())); + } + if (!jsonObj.get("created").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `created` to be a primitive type in the JSON string but got `%s`", jsonObj.get("created").toString())); + } + if (!jsonObj.get("updated").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `updated` to be a primitive type in the JSON string but got `%s`", jsonObj.get("updated").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!WebhookEndpoint.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'WebhookEndpoint' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(WebhookEndpoint.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, WebhookEndpoint value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public WebhookEndpoint read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of WebhookEndpoint given an JSON string + * + * @param jsonString JSON string + * @return An instance of WebhookEndpoint + * @throws IOException if the JSON string is invalid with respect to WebhookEndpoint + */ + public static WebhookEndpoint fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, WebhookEndpoint.class); + } + + /** + * Convert an instance of WebhookEndpoint to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/corbado/generated/model/WebhookEndpointCreateReq.java b/src/main/java/com/corbado/generated/model/WebhookEndpointCreateReq.java new file mode 100644 index 0000000..8e5e925 --- /dev/null +++ b/src/main/java/com/corbado/generated/model/WebhookEndpointCreateReq.java @@ -0,0 +1,287 @@ +/* + * Corbado Backend API + * # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@corbado.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.corbado.generated.model; + +import java.util.Objects; +import com.corbado.generated.model.WebhookEventType; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.corbado.generated.invoker.JSON; + +/** + * WebhookEndpointCreateReq + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") +public class WebhookEndpointCreateReq { + public static final String SERIALIZED_NAME_URL = "url"; + @SerializedName(SERIALIZED_NAME_URL) + @javax.annotation.Nonnull + private String url; + + public static final String SERIALIZED_NAME_SUBSCRIBED_EVENTS = "subscribedEvents"; + @SerializedName(SERIALIZED_NAME_SUBSCRIBED_EVENTS) + @javax.annotation.Nonnull + private List subscribedEvents = new ArrayList<>(); + + public static final String SERIALIZED_NAME_CUSTOM_HEADERS = "customHeaders"; + @SerializedName(SERIALIZED_NAME_CUSTOM_HEADERS) + @javax.annotation.Nonnull + private Object customHeaders; + + public WebhookEndpointCreateReq() { + } + + public WebhookEndpointCreateReq url(@javax.annotation.Nonnull String url) { + this.url = url; + return this; + } + + /** + * Get url + * @return url + */ + @javax.annotation.Nonnull + public String getUrl() { + return url; + } + + public void setUrl(@javax.annotation.Nonnull String url) { + this.url = url; + } + + + public WebhookEndpointCreateReq subscribedEvents(@javax.annotation.Nonnull List subscribedEvents) { + this.subscribedEvents = subscribedEvents; + return this; + } + + public WebhookEndpointCreateReq addSubscribedEventsItem(WebhookEventType subscribedEventsItem) { + if (this.subscribedEvents == null) { + this.subscribedEvents = new ArrayList<>(); + } + this.subscribedEvents.add(subscribedEventsItem); + return this; + } + + /** + * Get subscribedEvents + * @return subscribedEvents + */ + @javax.annotation.Nonnull + public List getSubscribedEvents() { + return subscribedEvents; + } + + public void setSubscribedEvents(@javax.annotation.Nonnull List subscribedEvents) { + this.subscribedEvents = subscribedEvents; + } + + + public WebhookEndpointCreateReq customHeaders(@javax.annotation.Nonnull Object customHeaders) { + this.customHeaders = customHeaders; + return this; + } + + /** + * Get customHeaders + * @return customHeaders + */ + @javax.annotation.Nonnull + public Object getCustomHeaders() { + return customHeaders; + } + + public void setCustomHeaders(@javax.annotation.Nonnull Object customHeaders) { + this.customHeaders = customHeaders; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + WebhookEndpointCreateReq webhookEndpointCreateReq = (WebhookEndpointCreateReq) o; + return Objects.equals(this.url, webhookEndpointCreateReq.url) && + Objects.equals(this.subscribedEvents, webhookEndpointCreateReq.subscribedEvents) && + Objects.equals(this.customHeaders, webhookEndpointCreateReq.customHeaders); + } + + @Override + public int hashCode() { + return Objects.hash(url, subscribedEvents, customHeaders); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class WebhookEndpointCreateReq {\n"); + sb.append(" url: ").append(toIndentedString(url)).append("\n"); + sb.append(" subscribedEvents: ").append(toIndentedString(subscribedEvents)).append("\n"); + sb.append(" customHeaders: ").append(toIndentedString(customHeaders)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("url"); + openapiFields.add("subscribedEvents"); + openapiFields.add("customHeaders"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("url"); + openapiRequiredFields.add("subscribedEvents"); + openapiRequiredFields.add("customHeaders"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to WebhookEndpointCreateReq + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!WebhookEndpointCreateReq.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in WebhookEndpointCreateReq is not found in the empty JSON string", WebhookEndpointCreateReq.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!WebhookEndpointCreateReq.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `WebhookEndpointCreateReq` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : WebhookEndpointCreateReq.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("url").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("url").toString())); + } + // ensure the required json array is present + if (jsonObj.get("subscribedEvents") == null) { + throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); + } else if (!jsonObj.get("subscribedEvents").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `subscribedEvents` to be an array in the JSON string but got `%s`", jsonObj.get("subscribedEvents").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!WebhookEndpointCreateReq.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'WebhookEndpointCreateReq' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(WebhookEndpointCreateReq.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, WebhookEndpointCreateReq value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public WebhookEndpointCreateReq read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of WebhookEndpointCreateReq given an JSON string + * + * @param jsonString JSON string + * @return An instance of WebhookEndpointCreateReq + * @throws IOException if the JSON string is invalid with respect to WebhookEndpointCreateReq + */ + public static WebhookEndpointCreateReq fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, WebhookEndpointCreateReq.class); + } + + /** + * Convert an instance of WebhookEndpointCreateReq to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/corbado/generated/model/WebhookEndpointList.java b/src/main/java/com/corbado/generated/model/WebhookEndpointList.java new file mode 100644 index 0000000..ce9d2e6 --- /dev/null +++ b/src/main/java/com/corbado/generated/model/WebhookEndpointList.java @@ -0,0 +1,232 @@ +/* + * Corbado Backend API + * # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@corbado.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.corbado.generated.model; + +import java.util.Objects; +import com.corbado.generated.model.WebhookEndpoint; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.corbado.generated.invoker.JSON; + +/** + * WebhookEndpointList + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") +public class WebhookEndpointList { + public static final String SERIALIZED_NAME_WEBHOOK_ENDPOINTS = "webhookEndpoints"; + @SerializedName(SERIALIZED_NAME_WEBHOOK_ENDPOINTS) + @javax.annotation.Nonnull + private List webhookEndpoints = new ArrayList<>(); + + public WebhookEndpointList() { + } + + public WebhookEndpointList webhookEndpoints(@javax.annotation.Nonnull List webhookEndpoints) { + this.webhookEndpoints = webhookEndpoints; + return this; + } + + public WebhookEndpointList addWebhookEndpointsItem(WebhookEndpoint webhookEndpointsItem) { + if (this.webhookEndpoints == null) { + this.webhookEndpoints = new ArrayList<>(); + } + this.webhookEndpoints.add(webhookEndpointsItem); + return this; + } + + /** + * Get webhookEndpoints + * @return webhookEndpoints + */ + @javax.annotation.Nonnull + public List getWebhookEndpoints() { + return webhookEndpoints; + } + + public void setWebhookEndpoints(@javax.annotation.Nonnull List webhookEndpoints) { + this.webhookEndpoints = webhookEndpoints; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + WebhookEndpointList webhookEndpointList = (WebhookEndpointList) o; + return Objects.equals(this.webhookEndpoints, webhookEndpointList.webhookEndpoints); + } + + @Override + public int hashCode() { + return Objects.hash(webhookEndpoints); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class WebhookEndpointList {\n"); + sb.append(" webhookEndpoints: ").append(toIndentedString(webhookEndpoints)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("webhookEndpoints"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("webhookEndpoints"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to WebhookEndpointList + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!WebhookEndpointList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in WebhookEndpointList is not found in the empty JSON string", WebhookEndpointList.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!WebhookEndpointList.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `WebhookEndpointList` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : WebhookEndpointList.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the json data is an array + if (!jsonObj.get("webhookEndpoints").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `webhookEndpoints` to be an array in the JSON string but got `%s`", jsonObj.get("webhookEndpoints").toString())); + } + + JsonArray jsonArraywebhookEndpoints = jsonObj.getAsJsonArray("webhookEndpoints"); + // validate the required field `webhookEndpoints` (array) + for (int i = 0; i < jsonArraywebhookEndpoints.size(); i++) { + WebhookEndpoint.validateJsonElement(jsonArraywebhookEndpoints.get(i)); + }; + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!WebhookEndpointList.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'WebhookEndpointList' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(WebhookEndpointList.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, WebhookEndpointList value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public WebhookEndpointList read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of WebhookEndpointList given an JSON string + * + * @param jsonString JSON string + * @return An instance of WebhookEndpointList + * @throws IOException if the JSON string is invalid with respect to WebhookEndpointList + */ + public static WebhookEndpointList fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, WebhookEndpointList.class); + } + + /** + * Convert an instance of WebhookEndpointList to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/corbado/generated/model/WebhookEventType.java b/src/main/java/com/corbado/generated/model/WebhookEventType.java new file mode 100644 index 0000000..9556525 --- /dev/null +++ b/src/main/java/com/corbado/generated/model/WebhookEventType.java @@ -0,0 +1,80 @@ +/* + * Corbado Backend API + * # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@corbado.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.corbado.generated.model; + +import java.util.Objects; +import com.google.gson.annotations.SerializedName; + +import java.io.IOException; +import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; + +/** + * Gets or Sets webhookEventType + */ +@JsonAdapter(WebhookEventType.Adapter.class) +public enum WebhookEventType { + + PASSKEY_LOGIN_COMPLETED("passkey-login.completed"), + + PASSKEY_CREATED("passkey.created"), + + PASSKEY_DELETED("passkey.deleted"); + + private String value; + + WebhookEventType(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static WebhookEventType fromValue(String value) { + for (WebhookEventType b : WebhookEventType.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final WebhookEventType enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public WebhookEventType read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return WebhookEventType.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + WebhookEventType.fromValue(value); + } +} + From 33fc47ac59f4e05ab4b3bbfa6ba620b8209be089 Mon Sep 17 00:00:00 2001 From: Aleksandr Balakirev Date: Sun, 15 Dec 2024 14:53:01 +0100 Subject: [PATCH 17/28] Fix RSA key name for session service test --- src/test/java/com/corbado/unit/SessionServiceTest.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/test/java/com/corbado/unit/SessionServiceTest.java b/src/test/java/com/corbado/unit/SessionServiceTest.java index 6856020..fd22167 100644 --- a/src/test/java/com/corbado/unit/SessionServiceTest.java +++ b/src/test/java/com/corbado/unit/SessionServiceTest.java @@ -63,7 +63,7 @@ public class SessionServiceTest { private static final String PRIVATE_KEY_PATH = "src/test/java/com/corbado/unit/data/rsakey.pem"; private static final String INVALID_PRIVATE_KEY_PATH = - "src/test/java/com/corbado/unit/data/invalidRsakey.pem"; + "src/test/java/com/corbado/unit/data/invalidRsaKey.pem"; /** The Constant JWKS_PATH. */ private static final String JWKS_PATH = "src/test/java/com/corbado/unit/data/jwks.json"; @@ -252,12 +252,16 @@ static List provideJwts() throws InvalidKeySpecException, NoSuchAlgori + "pvaG4gRG9lIiwiYWRtaW4iOnRydWV9.dyt0CoTl4WoVjAHI9Q_CwSKhl6d_9rhM3NrXuJttkao"; testData.add( new Object[] { - jwtWithWrongAlgorithm, TokenValidationException.class, ValidationErrorType.CODE_INVALID_TOKEN + jwtWithWrongAlgorithm, + TokenValidationException.class, + ValidationErrorType.CODE_INVALID_TOKEN }); // Empty JWT testData.add( - new Object[] {"", TokenValidationException.class, ValidationErrorType.CODE_EMPTY_SESSION_TOKEN}); + new Object[] { + "", TokenValidationException.class, ValidationErrorType.CODE_EMPTY_SESSION_TOKEN + }); // Not before (nbf) in future testData.add( new Object[] { From 9a1694cfc24e12789abb09c59fded5fb4c772a1f Mon Sep 17 00:00:00 2001 From: Aleksandr Balakirev Date: Sun, 15 Dec 2024 15:02:18 +0100 Subject: [PATCH 18/28] Change CORBADO_FRONTEND_API from secret to variable in ci workflow --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a433f38..5c43921 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -100,7 +100,7 @@ jobs: env: CORBADO_PROJECT_ID: ${{ secrets.CORBADO_PROJECT_ID }} CORBADO_API_SECRET: ${{ secrets.CORBADO_API_SECRET }} - CORBADO_FRONTEND_API: ${{ secrets.CORBADO_FRONTEND_API }} + CORBADO_FRONTEND_API: ${{ vars.CORBADO_FRONTEND_API }} CORBADO_BACKEND_API: ${{ vars.CORBADO_BACKEND_API }} run: mvn --batch-mode --update-snapshots verify -DskipInstall From d0a077cffa8b7897c12d278756e45c6e68754a30 Mon Sep 17 00:00:00 2001 From: Aleksandr Balakirev Date: Sun, 15 Dec 2024 15:20:46 +0100 Subject: [PATCH 19/28] Adjust ci workflow to ignore certain files and commit types --- .github/workflows/ci.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5c43921..cccf78f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,6 +12,10 @@ on: - development tags: - 'v[0-9]+.[0-9]+.[0-9]+*' + paths-ignore: + - '**/*.md' # Ignore markdown files + - '**/LICENSE' + - 'scripts/**' pull_request: branches: - main @@ -20,9 +24,11 @@ on: - 'sdk-release/**' - 'feature/**' - development + jobs: build: + if: "!startsWith(github.event.head_commit.message, 'style:') && !startsWith(github.event.head_commit.message, 'docs:')" #do not run workflow on style or documentation changes name: Build runs-on: ubuntu-latest @@ -63,6 +69,7 @@ jobs: path: target/ test: + if: "!startsWith(github.event.head_commit.message, 'style:') && !startsWith(github.event.head_commit.message, 'docs:')" #do not run workflow on style or documentation changes name: Test runs-on: ubuntu-latest needs: build # Ensure build job runs before this one From 207559b659b82a3945e702c6dd35b66eda1f7433 Mon Sep 17 00:00:00 2001 From: Aleksandr Balakirev <55588266+alexbalakirev@users.noreply.github.com> Date: Sun, 15 Dec 2024 15:22:45 +0100 Subject: [PATCH 20/28] Fix alignment in ci.yml --- .github/workflows/ci.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cccf78f..a8f9c4e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,10 +12,10 @@ on: - development tags: - 'v[0-9]+.[0-9]+.[0-9]+*' - paths-ignore: - - '**/*.md' # Ignore markdown files - - '**/LICENSE' - - 'scripts/**' + paths-ignore: + - '**/*.md' # Ignore markdown files + - '**/LICENSE' + - 'scripts/**' pull_request: branches: - main @@ -28,7 +28,7 @@ on: jobs: build: - if: "!startsWith(github.event.head_commit.message, 'style:') && !startsWith(github.event.head_commit.message, 'docs:')" #do not run workflow on style or documentation changes + if: "!startsWith(github.event.head_commit.message, 'style:') && !startsWith(github.event.head_commit.message, 'docs:')" #do not run workflow on style or documentation changes name: Build runs-on: ubuntu-latest @@ -69,7 +69,7 @@ jobs: path: target/ test: - if: "!startsWith(github.event.head_commit.message, 'style:') && !startsWith(github.event.head_commit.message, 'docs:')" #do not run workflow on style or documentation changes + if: "!startsWith(github.event.head_commit.message, 'style:') && !startsWith(github.event.head_commit.message, 'docs:')" #do not run workflow on style or documentation changes name: Test runs-on: ubuntu-latest needs: build # Ensure build job runs before this one From 137f65fe195bf8b08bba34cd6b40a427addd3135 Mon Sep 17 00:00:00 2001 From: Aleksandr Balakirev Date: Sun, 15 Dec 2024 15:33:21 +0100 Subject: [PATCH 21/28] style: format IdentifierService --- .../corbado/services/IdentifierService.java | 22 ++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/src/main/java/com/corbado/services/IdentifierService.java b/src/main/java/com/corbado/services/IdentifierService.java index fb163db..c70f23c 100644 --- a/src/main/java/com/corbado/services/IdentifierService.java +++ b/src/main/java/com/corbado/services/IdentifierService.java @@ -37,7 +37,7 @@ public IdentifierService(final IdentifiersApi client) { * Create a new login identifier. * * @param userID ID of user (required) - * @param identifierCreateReq + * @param identifierCreateReq Identifier create request * @return Identifier * @throws CorbadoServerException If fail to call the API, e.g. server error or cannot deserialize * the response body @@ -47,24 +47,26 @@ public Identifier create( throws CorbadoServerException { Objects.requireNonNull( identifierCreateReq.getIdentifierType(), - "Required field 'IdentifierCreateReq.identifierType' in 'identifierCreateReq' cannot be null\""); + "Required field 'IdentifierCreateReq.identifierType' in" + + " 'identifierCreateReq' cannot be null\""); Objects.requireNonNull( identifierCreateReq.getIdentifierValue(), - "Required field 'IdentifierCreateReq.identifierValue' in 'identifierCreateReq' cannot be null\""); + "Required field 'IdentifierCreateReq.identifierValue' in" + + " 'identifierCreateReq' cannot be null\""); Objects.requireNonNull( identifierCreateReq.getStatus(), "Required field 'IdentifierCreateReq.status' in 'identifierCreateReq' cannot be null\""); try { - return client.identifierCreate(userID, identifierCreateReq); - // client.identifierList(userID, null, null, null) + return this.client.identifierCreate(userID, identifierCreateReq); + // client.identifierList(userID, null, null, null) } catch (final ApiException e) { throw new CorbadoServerException(e); } } /** - * Returns a list of matching identifiers + * Returns a list of matching identifiers. * * @param sort Field sorting (optional) * @param filter Field filtering (optional) @@ -81,14 +83,14 @@ public IdentifierList list( @Nullable final Integer pageSize) throws CorbadoServerException { try { - return client.identifierList(sort, filter, page, pageSize); + return this.client.identifierList(sort, filter, page, pageSize); } catch (final ApiException e) { throw new CorbadoServerException(e); } } /** - * Returns a list of matching identifiers + * Returns a list of matching identifiers. * * @param page Page number (optional, default to 1) * @param pageSize Number of items per page (optional, default to 10) @@ -259,7 +261,7 @@ public Identifier updateStatus( @NonNull final IdentifierUpdateReq identifierUpdateReq) throws CorbadoServerException { try { - return client.identifierUpdate(userID, identifierID, identifierUpdateReq); + return this.client.identifierUpdate(userID, identifierID, identifierUpdateReq); } catch (final ApiException e) { throw new CorbadoServerException(e); } @@ -293,7 +295,7 @@ public Identifier updateStatus( public void delete(@NonNull final String userID, @NonNull final String identifierID) throws CorbadoServerException { try { - client.identifierDelete(userID, identifierID); + this.client.identifierDelete(userID, identifierID); } catch (final ApiException e) { throw new CorbadoServerException(e); } From 012736a7895aa3ed81e67646adf599e5d30c49a3 Mon Sep 17 00:00:00 2001 From: Aleksandr Balakirev Date: Sun, 15 Dec 2024 15:40:00 +0100 Subject: [PATCH 22/28] style: fix import ordering and other minor checkstyle issues --- .../exceptions/CorbadoServerException.java | 6 +- src/main/java/com/corbado/sdk/Config.java | 4 +- .../com/corbado/services/SessionService.java | 16 ++-- .../com/corbado/services/UserService.java | 7 +- .../integration/IdentifierServiceIT.java | 7 +- .../corbado/integration/UserServiceIT.java | 9 ++- .../com/corbado/unit/SessionServiceTest.java | 76 ++++--------------- src/test/java/com/corbado/util/TestUtils.java | 7 +- 8 files changed, 39 insertions(+), 93 deletions(-) diff --git a/src/main/java/com/corbado/exceptions/CorbadoServerException.java b/src/main/java/com/corbado/exceptions/CorbadoServerException.java index 734e352..048fea3 100644 --- a/src/main/java/com/corbado/exceptions/CorbadoServerException.java +++ b/src/main/java/com/corbado/exceptions/CorbadoServerException.java @@ -1,12 +1,10 @@ package com.corbado.exceptions; +import com.corbado.generated.invoker.ApiException; +import com.google.gson.Gson; import java.util.Collections; import java.util.List; import java.util.Optional; - -import com.corbado.generated.invoker.ApiException; -import com.google.gson.Gson; - import lombok.AllArgsConstructor; import lombok.Data; import lombok.Getter; diff --git a/src/main/java/com/corbado/sdk/Config.java b/src/main/java/com/corbado/sdk/Config.java index 2786e96..300f716 100644 --- a/src/main/java/com/corbado/sdk/Config.java +++ b/src/main/java/com/corbado/sdk/Config.java @@ -2,14 +2,12 @@ import java.net.MalformedURLException; import java.net.URL; - -import org.apache.commons.lang3.StringUtils; - import lombok.Builder; import lombok.Getter; import lombok.NonNull; import lombok.Setter; import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; /** * Configuration class for setting up project parameters. diff --git a/src/main/java/com/corbado/services/SessionService.java b/src/main/java/com/corbado/services/SessionService.java index 554e623..79fea50 100644 --- a/src/main/java/com/corbado/services/SessionService.java +++ b/src/main/java/com/corbado/services/SessionService.java @@ -1,12 +1,5 @@ package com.corbado.services; -import java.net.MalformedURLException; -import java.net.URL; -import java.security.interfaces.RSAPublicKey; -import java.util.concurrent.TimeUnit; - -import org.apache.commons.lang3.StringUtils; - import com.auth0.jwk.InvalidPublicKeyException; import com.auth0.jwk.Jwk; import com.auth0.jwk.JwkException; @@ -26,10 +19,14 @@ import com.corbado.exceptions.TokenValidationException; import com.corbado.sdk.Config; import com.corbado.utils.ValidationUtils; - +import java.net.MalformedURLException; +import java.net.URL; +import java.security.interfaces.RSAPublicKey; +import java.util.concurrent.TimeUnit; import lombok.Getter; import lombok.NonNull; import lombok.Setter; +import org.apache.commons.lang3.StringUtils; /** * This class provides functionality for managing sessions, including validation and retrieval of @@ -148,7 +145,8 @@ public UserEntity validateToken(final String sessionToken) throws TokenValidatio final JWTVerifier verifier = JWT.require(algorithm).build(); decodedJwt = verifier.verify(sessionToken); } catch (final InvalidPublicKeyException e) { - throw new TokenValidationException(ValidationErrorType.CODE_INVALID_PUBLIC_KEY, e.getMessage(), e); + throw new TokenValidationException( + ValidationErrorType.CODE_INVALID_PUBLIC_KEY, e.getMessage(), e); } catch (final TokenExpiredException e) { throw new TokenValidationException(ValidationErrorType.CODE_JWT_EXPIRED, e.getMessage(), e); diff --git a/src/main/java/com/corbado/services/UserService.java b/src/main/java/com/corbado/services/UserService.java index ae6ea30..dee5024 100644 --- a/src/main/java/com/corbado/services/UserService.java +++ b/src/main/java/com/corbado/services/UserService.java @@ -1,9 +1,5 @@ package com.corbado.services; -import java.util.Objects; - -import javax.annotation.Nullable; - import com.corbado.entities.UserEntity; import com.corbado.exceptions.CorbadoServerException; import com.corbado.generated.api.UsersApi; @@ -11,7 +7,8 @@ import com.corbado.generated.model.UserCreateReq; import com.corbado.generated.model.UserStatus; import com.corbado.services.base.ApiService; - +import java.util.Objects; +import javax.annotation.Nullable; import lombok.NonNull; /** Service for managing users. */ diff --git a/src/test/java/com/corbado/integration/IdentifierServiceIT.java b/src/test/java/com/corbado/integration/IdentifierServiceIT.java index f4f5c27..17b1ef3 100644 --- a/src/test/java/com/corbado/integration/IdentifierServiceIT.java +++ b/src/test/java/com/corbado/integration/IdentifierServiceIT.java @@ -6,6 +6,7 @@ import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertThrows; import static org.junit.jupiter.api.Assertions.assertTrue; + import com.corbado.base.AbstractSdkTest; import com.corbado.exceptions.CorbadoServerException; import com.corbado.exceptions.StandardException; @@ -18,9 +19,9 @@ import com.corbado.services.IdentifierService; import com.corbado.util.TestUtils; import java.util.List; +import lombok.extern.slf4j.Slf4j; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; -import lombok.extern.slf4j.Slf4j; /** The Class UserServiceIT. */ @Slf4j @@ -61,7 +62,7 @@ private void assertValidationErrorEquals( * Sets the up class. * * @throws StandardException the standard exception - * @throws CorbadoServerException + * @throws CorbadoServerException the server side error */ @BeforeAll public void setUpClass() throws StandardException, CorbadoServerException { @@ -220,7 +221,7 @@ void test_updateIdentifier_ExpectSuccess() /** * Test list all emails by user id expect success. * - * @throws CorbadoServerException + * @throws CorbadoServerException the server side error */ @Test void test_listAllEmailsByUserId_expectSuccess() throws CorbadoServerException { diff --git a/src/test/java/com/corbado/integration/UserServiceIT.java b/src/test/java/com/corbado/integration/UserServiceIT.java index 989ef09..ebd046a 100644 --- a/src/test/java/com/corbado/integration/UserServiceIT.java +++ b/src/test/java/com/corbado/integration/UserServiceIT.java @@ -3,6 +3,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertThrows; + import com.corbado.base.AbstractSdkTest; import com.corbado.entities.UserEntity; import com.corbado.exceptions.CorbadoServerException; @@ -36,9 +37,9 @@ void test_InstantiateSdk_ExpectNotNull() { } /** - * Test case for user creation with validation error. * + * Test case for user creation with validation error. * - * @throws CorbadoServerException + * @throws CorbadoServerException the standard exception */ @Test void test_UserCreateBlankName_ExpectSuccess() throws CorbadoServerException { @@ -72,7 +73,7 @@ void test_UserGet_ExpectNotFound() { assertThrows( CorbadoServerException.class, () -> { - final UserEntity ret = this.fixture.get("usr-1234567890"); + this.fixture.get("usr-1234567890"); }); assertNotNull(e); assertEquals(400, e.getHttpStatusCode()); @@ -113,7 +114,7 @@ void test_Delete_ExpectUserWillNotBeFound() throws CorbadoServerException, Stand assertThrows( CorbadoServerException.class, () -> { - final UserEntity ret = this.fixture.get(user.getUserID()); + this.fixture.get(user.getUserID()); }); assertNotNull(e); assertEquals(400, e.getHttpStatusCode()); diff --git a/src/test/java/com/corbado/unit/SessionServiceTest.java b/src/test/java/com/corbado/unit/SessionServiceTest.java index fd22167..64572f1 100644 --- a/src/test/java/com/corbado/unit/SessionServiceTest.java +++ b/src/test/java/com/corbado/unit/SessionServiceTest.java @@ -6,6 +6,22 @@ import static org.junit.jupiter.api.Assertions.assertThrows; import static org.mockito.ArgumentMatchers.anyString; +import com.auth0.jwk.Jwk; +import com.auth0.jwk.JwkException; +import com.auth0.jwk.JwkProvider; +import com.auth0.jwt.JWT; +import com.auth0.jwt.algorithms.Algorithm; +import com.auth0.jwt.exceptions.IncorrectClaimException; +import com.auth0.jwt.exceptions.JWTVerificationException; +import com.corbado.entities.UserEntity; +import com.corbado.enums.exception.ValidationErrorType; +import com.corbado.exceptions.StandardException; +import com.corbado.exceptions.TokenValidationException; +import com.corbado.services.SessionService; +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonObject; +import com.google.gson.JsonSyntaxException; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.IOException; @@ -24,7 +40,6 @@ import java.util.List; import java.util.Map; import java.util.stream.Stream; - import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; @@ -36,23 +51,6 @@ import org.mockito.Mockito; import org.mockito.junit.jupiter.MockitoExtension; -import com.auth0.jwk.Jwk; -import com.auth0.jwk.JwkException; -import com.auth0.jwk.JwkProvider; -import com.auth0.jwt.JWT; -import com.auth0.jwt.algorithms.Algorithm; -import com.auth0.jwt.exceptions.IncorrectClaimException; -import com.auth0.jwt.exceptions.JWTVerificationException; -import com.corbado.entities.UserEntity; -import com.corbado.enums.exception.ValidationErrorType; -import com.corbado.exceptions.StandardException; -import com.corbado.exceptions.TokenValidationException; -import com.corbado.services.SessionService; -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonObject; -import com.google.gson.JsonSyntaxException; - /** Unit Test for session service. */ @ExtendWith(MockitoExtension.class) public class SessionServiceTest { @@ -205,11 +203,6 @@ void test_getCurrentUser( assertEquals(TEST_NAME, validationResult.getFullName()); assertEquals(TEST_USER_ID, validationResult.getUserID()); } - /** - * Inits the parameters test data. - * - * @return the stream - */ } // ------------------ Test data --------------------- // @@ -227,13 +220,6 @@ static Stream initParametersTestData() { new Object[] {"", "2", false}, // Test empty jwks_uri new Object[] {"s", "", false}); - /** - * Provide jwts. - * - * @return the list - * @throws InvalidKeySpecException the invalid key spec exception - * @throws NoSuchAlgorithmException the no such algorithm exception - */ } /** @@ -366,15 +352,6 @@ static List provideJwts() throws InvalidKeySpecException, NoSuchAlgori }); return testData; - /** - * Read private key. - * - * @param privateKeyPath the private key path - * @return the RSA private key - * @throws IOException Signals that an I/O exception has occurred. - * @throws NoSuchAlgorithmException the no such algorithm exception - * @throws InvalidKeySpecException the invalid key spec exception - */ } // ------------------ Utility functions--------------------- // @@ -402,16 +379,6 @@ private static RSAPrivateKey readPrivateKey(final String privateKeyPath) final KeyFactory keyFactory = KeyFactory.getInstance("RSA"); final PKCS8EncodedKeySpec keySpec = new PKCS8EncodedKeySpec(encoded); return (RSAPrivateKey) keyFactory.generatePrivate(keySpec); - /** - * Generate jwt. - * - * @param iss the iss - * @param exp the exp - * @param nbf the nbf - * @return the string - * @throws InvalidKeySpecException the invalid key spec exception - * @throws NoSuchAlgorithmException the no such algorithm exception - */ } /** @@ -440,11 +407,6 @@ private static String generateJwt( .withClaim("email", TEST_EMAIL) .withClaim("phone_number", TEST_PHONE_NUMBER) .sign(algorithm); - /** - * Creates the session service. - * - * @return the session service - */ } /** @@ -458,12 +420,6 @@ private static SessionService createSessionService() { 10, false, TEST_PROJECT_ID); // URLs do not matter, url access is mocked - /** - * Read jwks. - * - * @return the json array - * @throws FileNotFoundException the file not found exception - */ } /** diff --git a/src/test/java/com/corbado/util/TestUtils.java b/src/test/java/com/corbado/util/TestUtils.java index 7d01cee..1d6e4e4 100644 --- a/src/test/java/com/corbado/util/TestUtils.java +++ b/src/test/java/com/corbado/util/TestUtils.java @@ -1,9 +1,5 @@ package com.corbado.util; -import java.util.Random; - -import org.apache.commons.lang3.StringUtils; - import com.corbado.entities.UserEntity; import com.corbado.exceptions.CorbadoServerException; import com.corbado.exceptions.StandardException; @@ -11,8 +7,9 @@ import com.corbado.generated.model.UserStatus; import com.corbado.sdk.Config; import com.corbado.sdk.CorbadoSdk; - import io.github.cdimascio.dotenv.Dotenv; +import java.util.Random; +import org.apache.commons.lang3.StringUtils; /** The Class TestUtils. */ public class TestUtils { From 4ec2a1d640208afdd51e82490fb1788f48f598f0 Mon Sep 17 00:00:00 2001 From: Aleksandr Balakirev Date: Sun, 15 Dec 2024 15:42:08 +0100 Subject: [PATCH 23/28] Bump SDK version to 2.0.0b (beta version) --- README.md | 4 ++-- VERSION | 2 +- pom.xml | 2 +- src/main/java/com/corbado/sdk/CorbadoSdk.java | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 858db77..c2f27b7 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ You can find the latest SDK version at [central repository](https://repo1.maven. Add this dependency to your project's build file: ```groovy -implementation "com.corbado:corbado-java:2.0.0" +implementation "com.corbado:corbado-java:2.0.0b" ``` #### Maven users @@ -38,7 +38,7 @@ Add this dependency to your project's POM: com.corbado corbado-java - 2.0.0 + 2.0.0b ``` diff --git a/VERSION b/VERSION index 359a5b9..a8949c6 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.0.0 \ No newline at end of file +2.0.0b \ No newline at end of file diff --git a/pom.xml b/pom.xml index fee2afb..1d0ffec 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ com.corbado corbado-java jar - 2.0.0 + 2.0.0b Corbado Java Corbado Java SDK https://github.com/corbado/corbado-java diff --git a/src/main/java/com/corbado/sdk/CorbadoSdk.java b/src/main/java/com/corbado/sdk/CorbadoSdk.java index 6426534..0f2d41b 100644 --- a/src/main/java/com/corbado/sdk/CorbadoSdk.java +++ b/src/main/java/com/corbado/sdk/CorbadoSdk.java @@ -24,7 +24,7 @@ @Slf4j public class CorbadoSdk { - private static final String CURRENT_SDK_VERSION = "2.0.0"; + private static final String CURRENT_SDK_VERSION = "2.0.0b"; /** The Constant CORBADO_HEADER_NAME. */ private static final String CORBADO_HEADER_NAME = "X-Corbado-SDK"; From d56a2a057bf5e58c5b5fc1d031b0d2c7fd0560d0 Mon Sep 17 00:00:00 2001 From: Aleksandr Balakirev <55588266+alexbalakirev@users.noreply.github.com> Date: Sun, 15 Dec 2024 15:46:07 +0100 Subject: [PATCH 24/28] Update ci.yml --- .github/workflows/ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a8f9c4e..7136e6d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,7 +24,6 @@ on: - 'sdk-release/**' - 'feature/**' - development - jobs: build: From 0c9e57d043a36098318d4de7dfb450780d5fd502 Mon Sep 17 00:00:00 2001 From: Aleksandr Balakirev <55588266+alexbalakirev@users.noreply.github.com> Date: Sun, 15 Dec 2024 15:54:08 +0100 Subject: [PATCH 25/28] Update cache action to v4 --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7136e6d..7481116 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -43,7 +43,7 @@ jobs: architecture: x64 - name: Cache Maven dependencies - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: ~/.m2/repository key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}-${{ hashFiles('**/src/**') }} @@ -95,7 +95,7 @@ jobs: architecture: x64 - name: Cache Maven dependencies for tests - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: ~/.m2/repository key: ${{ runner.os }}-maven-${{ matrix.java-version }}-${{ hashFiles('**/pom.xml') }}-${{ hashFiles('**/src/**') }} @@ -135,7 +135,7 @@ jobs: server-id: central - name: Cache Maven dependencies - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: ~/.m2/repository key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}-${{ hashFiles('**/src/**') }} From 1f2a270121f652e723e36d7556bf295e5f69efc6 Mon Sep 17 00:00:00 2001 From: Aleksandr Balakirev Date: Sat, 8 Feb 2025 16:42:30 +0100 Subject: [PATCH 26/28] Remove unused code --- .../java/com/corbado/services/SessionService.java | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/src/main/java/com/corbado/services/SessionService.java b/src/main/java/com/corbado/services/SessionService.java index 79fea50..8e62c34 100644 --- a/src/main/java/com/corbado/services/SessionService.java +++ b/src/main/java/com/corbado/services/SessionService.java @@ -48,9 +48,6 @@ public class SessionService { /** The jwks uri. */ private String jwksUri; - /** The last short session validation result. */ - private String lastSessionTokenValidationResult; - /** The jwk provider. */ private JwkProvider jwkProvider; @@ -105,16 +102,6 @@ public SessionService(@NonNull final Config config) { config.getProjectId()); } - /** - * Sets the issuer mismatch error. - * - * @param issuer the new issuer mismatch error - */ - public void setIssuerMismatchError(final String issuer) { - this.lastSessionTokenValidationResult = - String.format("Mismatch in issuer (configured: %s, JWT: %s)", this.issuer, issuer); - } - /** * Gets the and validate user from short session value. * From 97993abcd6ddb03f026d71cdf1ca8380c205040f Mon Sep 17 00:00:00 2001 From: Aleksandr Balakirev Date: Sat, 8 Feb 2025 16:48:12 +0100 Subject: [PATCH 27/28] Update GitHub CI artifacts --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7481116..13b18dd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -62,7 +62,7 @@ jobs: - name: Save Maven build artifacts if: success() - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: maven-artifacts path: target/ @@ -83,7 +83,7 @@ jobs: uses: actions/checkout@v4 - name: Download build artifacts - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: maven-artifacts @@ -121,7 +121,7 @@ jobs: uses: actions/checkout@v4 - name: Download build artifacts - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: maven-artifacts From e1af6804e080e9a6be9fbfd7c17b6dbaeba5ecc2 Mon Sep 17 00:00:00 2001 From: Aleksandr Balakirev Date: Sat, 8 Feb 2025 16:52:59 +0100 Subject: [PATCH 28/28] Update OpenApi client --- .../corbado/generated/api/PasskeysApi.java | 133 ++++ .../generated/api/PasswordManagersApi.java | 207 ++++++ .../corbado/generated/api/SessionsApi.java | 594 +++--------------- .../generated/invoker/ApiException.java | 2 +- .../generated/invoker/Configuration.java | 2 +- .../com/corbado/generated/invoker/JSON.java | 14 +- .../com/corbado/generated/invoker/Pair.java | 2 +- .../invoker/ServerConfiguration.java | 2 +- .../generated/invoker/ServerVariable.java | 2 +- .../corbado/generated/invoker/StringUtil.java | 2 +- .../generated/invoker/auth/ApiKeyAuth.java | 2 +- .../invoker/auth/HttpBearerAuth.java | 2 +- .../generated/model/AaguidDetails.java | 37 +- .../model/AbstractOpenApiSchema.java | 2 +- .../com/corbado/generated/model/AppType.java | 80 --- .../corbado/generated/model/AuthEvent.java | 32 +- .../generated/model/AuthEventCreateReq.java | 2 +- .../corbado/generated/model/Challenge.java | 2 +- .../generated/model/ChallengeCreateReq.java | 2 +- .../generated/model/ChallengeUpdateReq.java | 2 +- .../generated/model/ClientInformation.java | 64 +- .../corbado/generated/model/ConnectToken.java | 2 +- .../model/ConnectTokenCreateReq.java | 2 +- .../generated/model/ConnectTokenData.java | 2 +- .../model/ConnectTokenDataPasskeyAppend.java | 2 +- .../model/ConnectTokenDataPasskeyDelete.java | 2 +- .../model/ConnectTokenDataPasskeyList.java | 2 +- .../model/ConnectTokenDataPasskeyLogin.java | 2 +- .../generated/model/ConnectTokenList.java | 2 +- .../generated/model/ConnectTokenType.java | 8 +- .../model/ConnectTokenUpdateReq.java | 2 +- .../corbado/generated/model/Credential.java | 60 +- .../generated/model/CredentialList.java | 2 +- .../generated/model/DecisionInsights.java | 314 +++++++++ .../corbado/generated/model/DecisionTag.java | 6 +- .../generated/model/DetectionInsights.java | 358 +++++++++++ .../corbado/generated/model/DetectionTag.java | 2 +- .../com/corbado/generated/model/ErrorRsp.java | 2 +- .../generated/model/ErrorRspAllOfError.java | 2 +- .../model/ErrorRspAllOfErrorValidation.java | 2 +- .../corbado/generated/model/GenericRsp.java | 2 +- .../corbado/generated/model/Identifier.java | 2 +- .../generated/model/IdentifierCreateReq.java | 2 +- .../generated/model/IdentifierList.java | 2 +- .../generated/model/IdentifierUpdateReq.java | 2 +- .../model/JavaScriptHighEntropy.java | 2 +- .../com/corbado/generated/model/Paging.java | 2 +- .../generated/model/ParsedDeviceInfo.java | 307 +++++++++ .../model/PasskeyAppendFinishReq.java | 2 +- .../model/PasskeyAppendFinishRsp.java | 2 +- .../model/PasskeyAppendStartReq.java | 2 +- .../model/PasskeyAppendStartRsp.java | 146 ++--- .../generated/model/PasskeyChallenge.java | 32 +- .../generated/model/PasskeyChallengeList.java | 2 +- .../model/PasskeyChallengeUpdateReq.java | 2 +- .../corbado/generated/model/PasskeyData.java | 2 +- .../corbado/generated/model/PasskeyEvent.java | 34 +- .../model/PasskeyEventCreateReq.java | 2 +- .../generated/model/PasskeyEventList.java | 2 +- .../generated/model/PasskeyIntelFlags.java | 2 +- .../model/PasskeyLoginFinishReq.java | 33 +- .../model/PasskeyLoginFinishRsp.java | 36 +- .../generated/model/PasskeyLoginStartReq.java | 2 +- .../generated/model/PasskeyLoginStartRsp.java | 170 ++--- .../model/PasskeyMediationFinishReq.java | 33 +- .../model/PasskeyMediationFinishRsp.java | 36 +- .../model/PasskeyMediationStartReq.java | 2 +- .../model/PasskeyMediationStartRsp.java | 2 +- ...pdateReq.java => PasskeyPostLoginReq.java} | 88 +-- ...tSession.java => PasskeyPostLoginRsp.java} | 86 +-- .../generated/model/PasswordManager.java | 425 +++++++++++++ ...reateReq.java => PasswordManagerList.java} | 129 ++-- .../model/ProjectConfigUpdateCnameReq.java | 2 +- .../corbado/generated/model/RequestData.java | 2 +- .../model/{LongSession.java => Session.java} | 211 ++++--- ...SessionCreateReq.java => SessionList.java} | 140 +++-- ...gSessionStatus.java => SessionStatus.java} | 22 +- .../generated/model/SocialAccount.java | 2 +- .../model/SocialAccountCreateReq.java | 2 +- .../generated/model/SocialAccountList.java | 2 +- .../com/corbado/generated/model/User.java | 2 +- .../generated/model/UserCreateReq.java | 2 +- .../generated/model/UserUpdateReq.java | 2 +- .../generated/model/WebhookEndpoint.java | 62 +- .../model/WebhookEndpointCreateReq.java | 2 +- .../generated/model/WebhookEndpointList.java | 2 +- 86 files changed, 2792 insertions(+), 1217 deletions(-) create mode 100644 src/main/java/com/corbado/generated/api/PasswordManagersApi.java delete mode 100644 src/main/java/com/corbado/generated/model/AppType.java create mode 100644 src/main/java/com/corbado/generated/model/DecisionInsights.java create mode 100644 src/main/java/com/corbado/generated/model/DetectionInsights.java create mode 100644 src/main/java/com/corbado/generated/model/ParsedDeviceInfo.java rename src/main/java/com/corbado/generated/model/{LongSessionUpdateReq.java => PasskeyPostLoginReq.java} (61%) rename src/main/java/com/corbado/generated/model/{ShortSession.java => PasskeyPostLoginRsp.java} (64%) create mode 100644 src/main/java/com/corbado/generated/model/PasswordManager.java rename src/main/java/com/corbado/generated/model/{ShortSessionCreateReq.java => PasswordManagerList.java} (56%) rename src/main/java/com/corbado/generated/model/{LongSession.java => Session.java} (57%) rename src/main/java/com/corbado/generated/model/{LongSessionCreateReq.java => SessionList.java} (55%) rename src/main/java/com/corbado/generated/model/{LongSessionStatus.java => SessionStatus.java} (71%) diff --git a/src/main/java/com/corbado/generated/api/PasskeysApi.java b/src/main/java/com/corbado/generated/api/PasskeysApi.java index d9045e0..e46752c 100644 --- a/src/main/java/com/corbado/generated/api/PasskeysApi.java +++ b/src/main/java/com/corbado/generated/api/PasskeysApi.java @@ -40,6 +40,8 @@ import com.corbado.generated.model.PasskeyMediationFinishRsp; import com.corbado.generated.model.PasskeyMediationStartReq; import com.corbado.generated.model.PasskeyMediationStartRsp; +import com.corbado.generated.model.PasskeyPostLoginReq; +import com.corbado.generated.model.PasskeyPostLoginRsp; import java.lang.reflect.Type; import java.util.ArrayList; @@ -870,4 +872,135 @@ public okhttp3.Call passkeyMediationStartAsync(PasskeyMediationStartReq passkeyM localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } + /** + * Build call for passkeyPostLogin + * @param passkeyPostLoginReq (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 Post Passkey Login succeeded -
0 Error -
+ */ + public okhttp3.Call passkeyPostLoginCall(PasskeyPostLoginReq passkeyPostLoginReq, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = passkeyPostLoginReq; + + // create path and map variables + String localVarPath = "/passkey/postLogin"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "basicAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call passkeyPostLoginValidateBeforeCall(PasskeyPostLoginReq passkeyPostLoginReq, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'passkeyPostLoginReq' is set + if (passkeyPostLoginReq == null) { + throw new ApiException("Missing the required parameter 'passkeyPostLoginReq' when calling passkeyPostLogin(Async)"); + } + + return passkeyPostLoginCall(passkeyPostLoginReq, _callback); + + } + + /** + * + * Explicitly runs the post-login action + * @param passkeyPostLoginReq (required) + * @return PasskeyPostLoginRsp + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 Post Passkey Login succeeded -
0 Error -
+ */ + public PasskeyPostLoginRsp passkeyPostLogin(PasskeyPostLoginReq passkeyPostLoginReq) throws ApiException { + ApiResponse localVarResp = passkeyPostLoginWithHttpInfo(passkeyPostLoginReq); + return localVarResp.getData(); + } + + /** + * + * Explicitly runs the post-login action + * @param passkeyPostLoginReq (required) + * @return ApiResponse<PasskeyPostLoginRsp> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 Post Passkey Login succeeded -
0 Error -
+ */ + public ApiResponse passkeyPostLoginWithHttpInfo(PasskeyPostLoginReq passkeyPostLoginReq) throws ApiException { + okhttp3.Call localVarCall = passkeyPostLoginValidateBeforeCall(passkeyPostLoginReq, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Explicitly runs the post-login action + * @param passkeyPostLoginReq (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 Post Passkey Login succeeded -
0 Error -
+ */ + public okhttp3.Call passkeyPostLoginAsync(PasskeyPostLoginReq passkeyPostLoginReq, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = passkeyPostLoginValidateBeforeCall(passkeyPostLoginReq, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } } diff --git a/src/main/java/com/corbado/generated/api/PasswordManagersApi.java b/src/main/java/com/corbado/generated/api/PasswordManagersApi.java new file mode 100644 index 0000000..732ef2f --- /dev/null +++ b/src/main/java/com/corbado/generated/api/PasswordManagersApi.java @@ -0,0 +1,207 @@ +/* + * Corbado Backend API + * # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@corbado.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.corbado.generated.api; + +import com.corbado.generated.invoker.ApiCallback; +import com.corbado.generated.invoker.ApiClient; +import com.corbado.generated.invoker.ApiException; +import com.corbado.generated.invoker.ApiResponse; +import com.corbado.generated.invoker.Configuration; +import com.corbado.generated.invoker.Pair; +import com.corbado.generated.invoker.ProgressRequestBody; +import com.corbado.generated.invoker.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + +import com.corbado.generated.model.ErrorRsp; +import com.corbado.generated.model.PasswordManagerList; + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class PasswordManagersApi { + private ApiClient localVarApiClient; + private int localHostIndex; + private String localCustomBaseUrl; + + public PasswordManagersApi() { + this(Configuration.getDefaultApiClient()); + } + + public PasswordManagersApi(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + + /** + * Build call for passwordManagerList + * @param userID ID of user (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 List of all matching password managers -
0 Error -
+ */ + public okhttp3.Call passwordManagerListCall(String userID, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/users/{userID}/passwordManagers" + .replace("{" + "userID" + "}", localVarApiClient.escapeString(userID.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "basicAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call passwordManagerListValidateBeforeCall(String userID, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'userID' is set + if (userID == null) { + throw new ApiException("Missing the required parameter 'userID' when calling passwordManagerList(Async)"); + } + + return passwordManagerListCall(userID, _callback); + + } + + /** + * + * Returns a list of password managers + * @param userID ID of user (required) + * @return PasswordManagerList + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 List of all matching password managers -
0 Error -
+ */ + public PasswordManagerList passwordManagerList(String userID) throws ApiException { + ApiResponse localVarResp = passwordManagerListWithHttpInfo(userID); + return localVarResp.getData(); + } + + /** + * + * Returns a list of password managers + * @param userID ID of user (required) + * @return ApiResponse<PasswordManagerList> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 List of all matching password managers -
0 Error -
+ */ + public ApiResponse passwordManagerListWithHttpInfo(String userID) throws ApiException { + okhttp3.Call localVarCall = passwordManagerListValidateBeforeCall(userID, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Returns a list of password managers + * @param userID ID of user (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 List of all matching password managers -
0 Error -
+ */ + public okhttp3.Call passwordManagerListAsync(String userID, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = passwordManagerListValidateBeforeCall(userID, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } +} diff --git a/src/main/java/com/corbado/generated/api/SessionsApi.java b/src/main/java/com/corbado/generated/api/SessionsApi.java index 227b080..620ff4a 100644 --- a/src/main/java/com/corbado/generated/api/SessionsApi.java +++ b/src/main/java/com/corbado/generated/api/SessionsApi.java @@ -28,11 +28,8 @@ import com.corbado.generated.model.ErrorRsp; -import com.corbado.generated.model.LongSession; -import com.corbado.generated.model.LongSessionCreateReq; -import com.corbado.generated.model.LongSessionUpdateReq; -import com.corbado.generated.model.ShortSession; -import com.corbado.generated.model.ShortSessionCreateReq; +import com.corbado.generated.model.GenericRsp; +import com.corbado.generated.model.SessionList; import java.lang.reflect.Type; import java.util.ArrayList; @@ -78,9 +75,11 @@ public void setCustomBaseUrl(String customBaseUrl) { } /** - * Build call for longSessionCreate - * @param userID ID of user (required) - * @param longSessionCreateReq (required) + * Build call for sessionList + * @param sort Field sorting (optional) + * @param filter Field filtering (optional) + * @param page Page number (optional, default to 1) + * @param pageSize Number of items per page (optional, default to 10) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -88,151 +87,11 @@ public void setCustomBaseUrl(String customBaseUrl) { - +
Response Details
Status Code Description Response Headers
200 Long session has been created -
200 List of all matching sessions -
0 Error -
*/ - public okhttp3.Call longSessionCreateCall(String userID, LongSessionCreateReq longSessionCreateReq, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = longSessionCreateReq; - - // create path and map variables - String localVarPath = "/users/{userID}/longSessions" - .replace("{" + "userID" + "}", localVarApiClient.escapeString(userID.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "basicAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call longSessionCreateValidateBeforeCall(String userID, LongSessionCreateReq longSessionCreateReq, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'userID' is set - if (userID == null) { - throw new ApiException("Missing the required parameter 'userID' when calling longSessionCreate(Async)"); - } - - // verify the required parameter 'longSessionCreateReq' is set - if (longSessionCreateReq == null) { - throw new ApiException("Missing the required parameter 'longSessionCreateReq' when calling longSessionCreate(Async)"); - } - - return longSessionCreateCall(userID, longSessionCreateReq, _callback); - - } - - /** - * - * Create a new long session - * @param userID ID of user (required) - * @param longSessionCreateReq (required) - * @return LongSession - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Response Details
Status Code Description Response Headers
200 Long session has been created -
0 Error -
- */ - public LongSession longSessionCreate(String userID, LongSessionCreateReq longSessionCreateReq) throws ApiException { - ApiResponse localVarResp = longSessionCreateWithHttpInfo(userID, longSessionCreateReq); - return localVarResp.getData(); - } - - /** - * - * Create a new long session - * @param userID ID of user (required) - * @param longSessionCreateReq (required) - * @return ApiResponse<LongSession> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Response Details
Status Code Description Response Headers
200 Long session has been created -
0 Error -
- */ - public ApiResponse longSessionCreateWithHttpInfo(String userID, LongSessionCreateReq longSessionCreateReq) throws ApiException { - okhttp3.Call localVarCall = longSessionCreateValidateBeforeCall(userID, longSessionCreateReq, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * Create a new long session - * @param userID ID of user (required) - * @param longSessionCreateReq (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - -
Response Details
Status Code Description Response Headers
200 Long session has been created -
0 Error -
- */ - public okhttp3.Call longSessionCreateAsync(String userID, LongSessionCreateReq longSessionCreateReq, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = longSessionCreateValidateBeforeCall(userID, longSessionCreateReq, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for longSessionGet - * @param longSessionID ID of long session (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Response Details
Status Code Description Response Headers
200 Long session has been returned -
0 Error -
- */ - public okhttp3.Call longSessionGetCall(String longSessionID, final ApiCallback _callback) throws ApiException { + public okhttp3.Call sessionListCall(String sort, List filter, Integer page, Integer pageSize, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -249,142 +108,7 @@ public okhttp3.Call longSessionGetCall(String longSessionID, final ApiCallback _ Object localVarPostBody = null; // create path and map variables - String localVarPath = "/longSessions/{longSessionID}" - .replace("{" + "longSessionID" + "}", localVarApiClient.escapeString(longSessionID.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "basicAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call longSessionGetValidateBeforeCall(String longSessionID, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'longSessionID' is set - if (longSessionID == null) { - throw new ApiException("Missing the required parameter 'longSessionID' when calling longSessionGet(Async)"); - } - - return longSessionGetCall(longSessionID, _callback); - - } - - /** - * - * Retrieves a long session by ID - * @param longSessionID ID of long session (required) - * @return LongSession - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Response Details
Status Code Description Response Headers
200 Long session has been returned -
0 Error -
- */ - public LongSession longSessionGet(String longSessionID) throws ApiException { - ApiResponse localVarResp = longSessionGetWithHttpInfo(longSessionID); - return localVarResp.getData(); - } - - /** - * - * Retrieves a long session by ID - * @param longSessionID ID of long session (required) - * @return ApiResponse<LongSession> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Response Details
Status Code Description Response Headers
200 Long session has been returned -
0 Error -
- */ - public ApiResponse longSessionGetWithHttpInfo(String longSessionID) throws ApiException { - okhttp3.Call localVarCall = longSessionGetValidateBeforeCall(longSessionID, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * Retrieves a long session by ID - * @param longSessionID ID of long session (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - -
Response Details
Status Code Description Response Headers
200 Long session has been returned -
0 Error -
- */ - public okhttp3.Call longSessionGetAsync(String longSessionID, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = longSessionGetValidateBeforeCall(longSessionID, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for longSessionUpdate - * @param userID ID of user (required) - * @param longSessionID ID of long session (required) - * @param longSessionUpdateReq (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Response Details
Status Code Description Response Headers
200 Long session has been updated -
0 Error -
- */ - public okhttp3.Call longSessionUpdateCall(String userID, String longSessionID, LongSessionUpdateReq longSessionUpdateReq, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = longSessionUpdateReq; - - // create path and map variables - String localVarPath = "/users/{userID}/longSessions/{longSessionID}" - .replace("{" + "userID" + "}", localVarApiClient.escapeString(userID.toString())) - .replace("{" + "longSessionID" + "}", localVarApiClient.escapeString(longSessionID.toString())); + String localVarPath = "/sessions"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -392,157 +116,22 @@ public okhttp3.Call longSessionUpdateCall(String userID, String longSessionID, L Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); + if (sort != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("sort", sort)); } - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); + if (filter != null) { + localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "filter[]", filter)); } - String[] localVarAuthNames = new String[] { "basicAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call longSessionUpdateValidateBeforeCall(String userID, String longSessionID, LongSessionUpdateReq longSessionUpdateReq, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'userID' is set - if (userID == null) { - throw new ApiException("Missing the required parameter 'userID' when calling longSessionUpdate(Async)"); - } - - // verify the required parameter 'longSessionID' is set - if (longSessionID == null) { - throw new ApiException("Missing the required parameter 'longSessionID' when calling longSessionUpdate(Async)"); - } - - // verify the required parameter 'longSessionUpdateReq' is set - if (longSessionUpdateReq == null) { - throw new ApiException("Missing the required parameter 'longSessionUpdateReq' when calling longSessionUpdate(Async)"); + if (page != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page)); } - return longSessionUpdateCall(userID, longSessionID, longSessionUpdateReq, _callback); - - } - - /** - * - * Updates long session status - * @param userID ID of user (required) - * @param longSessionID ID of long session (required) - * @param longSessionUpdateReq (required) - * @return LongSession - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Response Details
Status Code Description Response Headers
200 Long session has been updated -
0 Error -
- */ - public LongSession longSessionUpdate(String userID, String longSessionID, LongSessionUpdateReq longSessionUpdateReq) throws ApiException { - ApiResponse localVarResp = longSessionUpdateWithHttpInfo(userID, longSessionID, longSessionUpdateReq); - return localVarResp.getData(); - } - - /** - * - * Updates long session status - * @param userID ID of user (required) - * @param longSessionID ID of long session (required) - * @param longSessionUpdateReq (required) - * @return ApiResponse<LongSession> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Response Details
Status Code Description Response Headers
200 Long session has been updated -
0 Error -
- */ - public ApiResponse longSessionUpdateWithHttpInfo(String userID, String longSessionID, LongSessionUpdateReq longSessionUpdateReq) throws ApiException { - okhttp3.Call localVarCall = longSessionUpdateValidateBeforeCall(userID, longSessionID, longSessionUpdateReq, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * Updates long session status - * @param userID ID of user (required) - * @param longSessionID ID of long session (required) - * @param longSessionUpdateReq (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - -
Response Details
Status Code Description Response Headers
200 Long session has been updated -
0 Error -
- */ - public okhttp3.Call longSessionUpdateAsync(String userID, String longSessionID, LongSessionUpdateReq longSessionUpdateReq, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = longSessionUpdateValidateBeforeCall(userID, longSessionID, longSessionUpdateReq, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for shortSessionCreate - * @param userID ID of user (required) - * @param longSessionID ID of long session (required) - * @param shortSessionCreateReq (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Response Details
Status Code Description Response Headers
200 Short session has been created -
0 Error -
- */ - public okhttp3.Call shortSessionCreateCall(String userID, String longSessionID, ShortSessionCreateReq shortSessionCreateReq, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; + if (pageSize != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); } - Object localVarPostBody = shortSessionCreateReq; - - // create path and map variables - String localVarPath = "/users/{userID}/longSessions/{longSessionID}/shortSessions" - .replace("{" + "userID" + "}", localVarApiClient.escapeString(userID.toString())) - .replace("{" + "longSessionID" + "}", localVarApiClient.escapeString(longSessionID.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = { "application/json" }; @@ -552,7 +141,6 @@ public okhttp3.Call shortSessionCreateCall(String userID, String longSessionID, } final String[] localVarContentTypes = { - "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -560,79 +148,67 @@ public okhttp3.Call shortSessionCreateCall(String userID, String longSessionID, } String[] localVarAuthNames = new String[] { "basicAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call shortSessionCreateValidateBeforeCall(String userID, String longSessionID, ShortSessionCreateReq shortSessionCreateReq, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'userID' is set - if (userID == null) { - throw new ApiException("Missing the required parameter 'userID' when calling shortSessionCreate(Async)"); - } - - // verify the required parameter 'longSessionID' is set - if (longSessionID == null) { - throw new ApiException("Missing the required parameter 'longSessionID' when calling shortSessionCreate(Async)"); - } - - // verify the required parameter 'shortSessionCreateReq' is set - if (shortSessionCreateReq == null) { - throw new ApiException("Missing the required parameter 'shortSessionCreateReq' when calling shortSessionCreate(Async)"); - } - - return shortSessionCreateCall(userID, longSessionID, shortSessionCreateReq, _callback); + private okhttp3.Call sessionListValidateBeforeCall(String sort, List filter, Integer page, Integer pageSize, final ApiCallback _callback) throws ApiException { + return sessionListCall(sort, filter, page, pageSize, _callback); } /** * - * Create a new short session - * @param userID ID of user (required) - * @param longSessionID ID of long session (required) - * @param shortSessionCreateReq (required) - * @return ShortSession + * Returns a list of matching sessions + * @param sort Field sorting (optional) + * @param filter Field filtering (optional) + * @param page Page number (optional, default to 1) + * @param pageSize Number of items per page (optional, default to 10) + * @return SessionList * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
Response Details
Status Code Description Response Headers
200 Short session has been created -
200 List of all matching sessions -
0 Error -
*/ - public ShortSession shortSessionCreate(String userID, String longSessionID, ShortSessionCreateReq shortSessionCreateReq) throws ApiException { - ApiResponse localVarResp = shortSessionCreateWithHttpInfo(userID, longSessionID, shortSessionCreateReq); + public SessionList sessionList(String sort, List filter, Integer page, Integer pageSize) throws ApiException { + ApiResponse localVarResp = sessionListWithHttpInfo(sort, filter, page, pageSize); return localVarResp.getData(); } /** * - * Create a new short session - * @param userID ID of user (required) - * @param longSessionID ID of long session (required) - * @param shortSessionCreateReq (required) - * @return ApiResponse<ShortSession> + * Returns a list of matching sessions + * @param sort Field sorting (optional) + * @param filter Field filtering (optional) + * @param page Page number (optional, default to 1) + * @param pageSize Number of items per page (optional, default to 10) + * @return ApiResponse<SessionList> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
Response Details
Status Code Description Response Headers
200 Short session has been created -
200 List of all matching sessions -
0 Error -
*/ - public ApiResponse shortSessionCreateWithHttpInfo(String userID, String longSessionID, ShortSessionCreateReq shortSessionCreateReq) throws ApiException { - okhttp3.Call localVarCall = shortSessionCreateValidateBeforeCall(userID, longSessionID, shortSessionCreateReq, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse sessionListWithHttpInfo(String sort, List filter, Integer page, Integer pageSize) throws ApiException { + okhttp3.Call localVarCall = sessionListValidateBeforeCall(sort, filter, page, pageSize, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * (asynchronously) - * Create a new short session - * @param userID ID of user (required) - * @param longSessionID ID of long session (required) - * @param shortSessionCreateReq (required) + * Returns a list of matching sessions + * @param sort Field sorting (optional) + * @param filter Field filtering (optional) + * @param page Page number (optional, default to 1) + * @param pageSize Number of items per page (optional, default to 10) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -640,21 +216,20 @@ public ApiResponse shortSessionCreateWithHttpInfo(String userID, S - +
Response Details
Status Code Description Response Headers
200 Short session has been created -
200 List of all matching sessions -
0 Error -
*/ - public okhttp3.Call shortSessionCreateAsync(String userID, String longSessionID, ShortSessionCreateReq shortSessionCreateReq, final ApiCallback _callback) throws ApiException { + public okhttp3.Call sessionListAsync(String sort, List filter, Integer page, Integer pageSize, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = shortSessionCreateValidateBeforeCall(userID, longSessionID, shortSessionCreateReq, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = sessionListValidateBeforeCall(sort, filter, page, pageSize, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for userLongSessionGet - * @param userID ID of user (required) - * @param longSessionID ID of long session (required) + * Build call for sessionRevoke + * @param sessionID ID of session (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -662,11 +237,11 @@ public okhttp3.Call shortSessionCreateAsync(String userID, String longSessionID, - +
Response Details
Status Code Description Response Headers
200 Long session has been returned -
200 Operation succeeded -
0 Error -
*/ - public okhttp3.Call userLongSessionGetCall(String userID, String longSessionID, final ApiCallback _callback) throws ApiException { + public okhttp3.Call sessionRevokeCall(String sessionID, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -683,9 +258,8 @@ public okhttp3.Call userLongSessionGetCall(String userID, String longSessionID, Object localVarPostBody = null; // create path and map variables - String localVarPath = "/users/{userID}/longSessions/{longSessionID}" - .replace("{" + "userID" + "}", localVarApiClient.escapeString(userID.toString())) - .replace("{" + "longSessionID" + "}", localVarApiClient.escapeString(longSessionID.toString())); + String localVarPath = "/sessions/{sessionID}/revoke" + .replace("{" + "sessionID" + "}", localVarApiClient.escapeString(sessionID.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -709,71 +283,63 @@ public okhttp3.Call userLongSessionGetCall(String userID, String longSessionID, } String[] localVarAuthNames = new String[] { "basicAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call userLongSessionGetValidateBeforeCall(String userID, String longSessionID, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'userID' is set - if (userID == null) { - throw new ApiException("Missing the required parameter 'userID' when calling userLongSessionGet(Async)"); - } - - // verify the required parameter 'longSessionID' is set - if (longSessionID == null) { - throw new ApiException("Missing the required parameter 'longSessionID' when calling userLongSessionGet(Async)"); + private okhttp3.Call sessionRevokeValidateBeforeCall(String sessionID, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'sessionID' is set + if (sessionID == null) { + throw new ApiException("Missing the required parameter 'sessionID' when calling sessionRevoke(Async)"); } - return userLongSessionGetCall(userID, longSessionID, _callback); + return sessionRevokeCall(sessionID, _callback); } /** * - * Retrieves a long session by ID and user ID - * @param userID ID of user (required) - * @param longSessionID ID of long session (required) - * @return LongSession + * Revokes an existing session + * @param sessionID ID of session (required) + * @return GenericRsp * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
Response Details
Status Code Description Response Headers
200 Long session has been returned -
200 Operation succeeded -
0 Error -
*/ - public LongSession userLongSessionGet(String userID, String longSessionID) throws ApiException { - ApiResponse localVarResp = userLongSessionGetWithHttpInfo(userID, longSessionID); + public GenericRsp sessionRevoke(String sessionID) throws ApiException { + ApiResponse localVarResp = sessionRevokeWithHttpInfo(sessionID); return localVarResp.getData(); } /** * - * Retrieves a long session by ID and user ID - * @param userID ID of user (required) - * @param longSessionID ID of long session (required) - * @return ApiResponse<LongSession> + * Revokes an existing session + * @param sessionID ID of session (required) + * @return ApiResponse<GenericRsp> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
Response Details
Status Code Description Response Headers
200 Long session has been returned -
200 Operation succeeded -
0 Error -
*/ - public ApiResponse userLongSessionGetWithHttpInfo(String userID, String longSessionID) throws ApiException { - okhttp3.Call localVarCall = userLongSessionGetValidateBeforeCall(userID, longSessionID, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse sessionRevokeWithHttpInfo(String sessionID) throws ApiException { + okhttp3.Call localVarCall = sessionRevokeValidateBeforeCall(sessionID, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * (asynchronously) - * Retrieves a long session by ID and user ID - * @param userID ID of user (required) - * @param longSessionID ID of long session (required) + * Revokes an existing session + * @param sessionID ID of session (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -781,14 +347,14 @@ public ApiResponse userLongSessionGetWithHttpInfo(String userID, St - +
Response Details
Status Code Description Response Headers
200 Long session has been returned -
200 Operation succeeded -
0 Error -
*/ - public okhttp3.Call userLongSessionGetAsync(String userID, String longSessionID, final ApiCallback _callback) throws ApiException { + public okhttp3.Call sessionRevokeAsync(String sessionID, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = userLongSessionGetValidateBeforeCall(userID, longSessionID, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = sessionRevokeValidateBeforeCall(sessionID, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } diff --git a/src/main/java/com/corbado/generated/invoker/ApiException.java b/src/main/java/com/corbado/generated/invoker/ApiException.java index 84ce720..55a199b 100644 --- a/src/main/java/com/corbado/generated/invoker/ApiException.java +++ b/src/main/java/com/corbado/generated/invoker/ApiException.java @@ -21,7 +21,7 @@ *

ApiException class.

*/ @SuppressWarnings("serial") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-02-08T15:52:19.373962904Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class ApiException extends Exception { private static final long serialVersionUID = 1L; diff --git a/src/main/java/com/corbado/generated/invoker/Configuration.java b/src/main/java/com/corbado/generated/invoker/Configuration.java index 79f48e4..46b9aed 100644 --- a/src/main/java/com/corbado/generated/invoker/Configuration.java +++ b/src/main/java/com/corbado/generated/invoker/Configuration.java @@ -13,7 +13,7 @@ package com.corbado.generated.invoker; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-02-08T15:52:19.373962904Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class Configuration { public static final String VERSION = "1.0.0"; diff --git a/src/main/java/com/corbado/generated/invoker/JSON.java b/src/main/java/com/corbado/generated/invoker/JSON.java index 11ccb02..26f705d 100644 --- a/src/main/java/com/corbado/generated/invoker/JSON.java +++ b/src/main/java/com/corbado/generated/invoker/JSON.java @@ -111,6 +111,8 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new com.corbado.generated.model.ConnectTokenUpdateReq.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.corbado.generated.model.Credential.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.corbado.generated.model.CredentialList.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.corbado.generated.model.DecisionInsights.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.corbado.generated.model.DetectionInsights.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.corbado.generated.model.DetectionTag.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.corbado.generated.model.ErrorRsp.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.corbado.generated.model.ErrorRspAllOfError.CustomTypeAdapterFactory()); @@ -121,10 +123,8 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new com.corbado.generated.model.IdentifierList.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.corbado.generated.model.IdentifierUpdateReq.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.corbado.generated.model.JavaScriptHighEntropy.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.corbado.generated.model.LongSession.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.corbado.generated.model.LongSessionCreateReq.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.corbado.generated.model.LongSessionUpdateReq.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.corbado.generated.model.Paging.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.corbado.generated.model.ParsedDeviceInfo.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.corbado.generated.model.PasskeyAppendFinishReq.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.corbado.generated.model.PasskeyAppendFinishRsp.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.corbado.generated.model.PasskeyAppendStartReq.CustomTypeAdapterFactory()); @@ -145,10 +145,14 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new com.corbado.generated.model.PasskeyMediationFinishRsp.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.corbado.generated.model.PasskeyMediationStartReq.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.corbado.generated.model.PasskeyMediationStartRsp.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.corbado.generated.model.PasskeyPostLoginReq.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.corbado.generated.model.PasskeyPostLoginRsp.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.corbado.generated.model.PasswordManager.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.corbado.generated.model.PasswordManagerList.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.corbado.generated.model.ProjectConfigUpdateCnameReq.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.corbado.generated.model.RequestData.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.corbado.generated.model.ShortSession.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.corbado.generated.model.ShortSessionCreateReq.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.corbado.generated.model.Session.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.corbado.generated.model.SessionList.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.corbado.generated.model.SocialAccount.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.corbado.generated.model.SocialAccountCreateReq.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.corbado.generated.model.SocialAccountList.CustomTypeAdapterFactory()); diff --git a/src/main/java/com/corbado/generated/invoker/Pair.java b/src/main/java/com/corbado/generated/invoker/Pair.java index 5f2a82c..26aaf85 100644 --- a/src/main/java/com/corbado/generated/invoker/Pair.java +++ b/src/main/java/com/corbado/generated/invoker/Pair.java @@ -13,7 +13,7 @@ package com.corbado.generated.invoker; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-02-08T15:52:19.373962904Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class Pair { private String name = ""; private String value = ""; diff --git a/src/main/java/com/corbado/generated/invoker/ServerConfiguration.java b/src/main/java/com/corbado/generated/invoker/ServerConfiguration.java index c1d5ce3..0e35f6c 100644 --- a/src/main/java/com/corbado/generated/invoker/ServerConfiguration.java +++ b/src/main/java/com/corbado/generated/invoker/ServerConfiguration.java @@ -18,7 +18,7 @@ /** * Representing a Server configuration. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-02-08T15:52:19.373962904Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class ServerConfiguration { public String URL; public String description; diff --git a/src/main/java/com/corbado/generated/invoker/ServerVariable.java b/src/main/java/com/corbado/generated/invoker/ServerVariable.java index dbf829c..e8e93e7 100644 --- a/src/main/java/com/corbado/generated/invoker/ServerVariable.java +++ b/src/main/java/com/corbado/generated/invoker/ServerVariable.java @@ -18,7 +18,7 @@ /** * Representing a Server Variable for server URL template substitution. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-02-08T15:52:19.373962904Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class ServerVariable { public String description; public String defaultValue; diff --git a/src/main/java/com/corbado/generated/invoker/StringUtil.java b/src/main/java/com/corbado/generated/invoker/StringUtil.java index b1e8f51..1e5d1f9 100644 --- a/src/main/java/com/corbado/generated/invoker/StringUtil.java +++ b/src/main/java/com/corbado/generated/invoker/StringUtil.java @@ -16,7 +16,7 @@ import java.util.Collection; import java.util.Iterator; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-02-08T15:52:19.373962904Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class StringUtil { /** * Check if the given array contains the given value (with case-insensitive comparison). diff --git a/src/main/java/com/corbado/generated/invoker/auth/ApiKeyAuth.java b/src/main/java/com/corbado/generated/invoker/auth/ApiKeyAuth.java index 88ea60a..69bccd2 100644 --- a/src/main/java/com/corbado/generated/invoker/auth/ApiKeyAuth.java +++ b/src/main/java/com/corbado/generated/invoker/auth/ApiKeyAuth.java @@ -20,7 +20,7 @@ import java.util.Map; import java.util.List; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-02-08T15:52:19.373962904Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class ApiKeyAuth implements Authentication { private final String location; private final String paramName; diff --git a/src/main/java/com/corbado/generated/invoker/auth/HttpBearerAuth.java b/src/main/java/com/corbado/generated/invoker/auth/HttpBearerAuth.java index 63cb33b..788da0a 100644 --- a/src/main/java/com/corbado/generated/invoker/auth/HttpBearerAuth.java +++ b/src/main/java/com/corbado/generated/invoker/auth/HttpBearerAuth.java @@ -22,7 +22,7 @@ import java.util.Optional; import java.util.function.Supplier; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-02-08T15:52:19.373962904Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class HttpBearerAuth implements Authentication { private final String scheme; private Supplier tokenSupplier; diff --git a/src/main/java/com/corbado/generated/model/AaguidDetails.java b/src/main/java/com/corbado/generated/model/AaguidDetails.java index cd45c7d..aa31e7a 100644 --- a/src/main/java/com/corbado/generated/model/AaguidDetails.java +++ b/src/main/java/com/corbado/generated/model/AaguidDetails.java @@ -48,8 +48,13 @@ /** * AaguidDetails */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-02-08T15:52:19.373962904Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class AaguidDetails { + public static final String SERIALIZED_NAME_AAGUID = "aaguid"; + @SerializedName(SERIALIZED_NAME_AAGUID) + @javax.annotation.Nonnull + private String aaguid; + public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) @javax.annotation.Nonnull @@ -68,6 +73,25 @@ public class AaguidDetails { public AaguidDetails() { } + public AaguidDetails aaguid(@javax.annotation.Nonnull String aaguid) { + this.aaguid = aaguid; + return this; + } + + /** + * Get aaguid + * @return aaguid + */ + @javax.annotation.Nonnull + public String getAaguid() { + return aaguid; + } + + public void setAaguid(@javax.annotation.Nonnull String aaguid) { + this.aaguid = aaguid; + } + + public AaguidDetails name(@javax.annotation.Nonnull String name) { this.name = name; return this; @@ -135,20 +159,22 @@ public boolean equals(Object o) { return false; } AaguidDetails aaguidDetails = (AaguidDetails) o; - return Objects.equals(this.name, aaguidDetails.name) && + return Objects.equals(this.aaguid, aaguidDetails.aaguid) && + Objects.equals(this.name, aaguidDetails.name) && Objects.equals(this.iconLight, aaguidDetails.iconLight) && Objects.equals(this.iconDark, aaguidDetails.iconDark); } @Override public int hashCode() { - return Objects.hash(name, iconLight, iconDark); + return Objects.hash(aaguid, name, iconLight, iconDark); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class AaguidDetails {\n"); + sb.append(" aaguid: ").append(toIndentedString(aaguid)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" iconLight: ").append(toIndentedString(iconLight)).append("\n"); sb.append(" iconDark: ").append(toIndentedString(iconDark)).append("\n"); @@ -174,12 +200,14 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); + openapiFields.add("aaguid"); openapiFields.add("name"); openapiFields.add("iconLight"); openapiFields.add("iconDark"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("aaguid"); openapiRequiredFields.add("name"); openapiRequiredFields.add("iconLight"); openapiRequiredFields.add("iconDark"); @@ -213,6 +241,9 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("aaguid").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `aaguid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("aaguid").toString())); + } if (!jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } diff --git a/src/main/java/com/corbado/generated/model/AbstractOpenApiSchema.java b/src/main/java/com/corbado/generated/model/AbstractOpenApiSchema.java index 5c03cc7..597c11f 100644 --- a/src/main/java/com/corbado/generated/model/AbstractOpenApiSchema.java +++ b/src/main/java/com/corbado/generated/model/AbstractOpenApiSchema.java @@ -21,7 +21,7 @@ /** * Abstract class for oneOf,anyOf schemas defined in OpenAPI spec */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-02-08T15:52:19.373962904Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public abstract class AbstractOpenApiSchema { // store the actual instance of the schema/object diff --git a/src/main/java/com/corbado/generated/model/AppType.java b/src/main/java/com/corbado/generated/model/AppType.java deleted file mode 100644 index 5f208e9..0000000 --- a/src/main/java/com/corbado/generated/model/AppType.java +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Corbado Backend API - * # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. - * - * The version of the OpenAPI document: 2.0.0 - * Contact: support@corbado.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.corbado.generated.model; - -import java.util.Objects; -import com.google.gson.annotations.SerializedName; - -import java.io.IOException; -import com.google.gson.TypeAdapter; -import com.google.gson.JsonElement; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; - -/** - * Application type - */ -@JsonAdapter(AppType.Adapter.class) -public enum AppType { - - EMPTY("empty"), - - WEB("web"), - - NATIVE("native"); - - private String value; - - AppType(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static AppType fromValue(String value) { - for (AppType b : AppType.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final AppType enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public AppType read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return AppType.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - AppType.fromValue(value); - } -} - diff --git a/src/main/java/com/corbado/generated/model/AuthEvent.java b/src/main/java/com/corbado/generated/model/AuthEvent.java index 22465c6..5f926b6 100644 --- a/src/main/java/com/corbado/generated/model/AuthEvent.java +++ b/src/main/java/com/corbado/generated/model/AuthEvent.java @@ -51,7 +51,7 @@ /** * AuthEvent */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-02-08T15:52:19.373962904Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class AuthEvent { public static final String SERIALIZED_NAME_AUTH_EVENT_I_D = "authEventID"; @SerializedName(SERIALIZED_NAME_AUTH_EVENT_I_D) @@ -83,6 +83,11 @@ public class AuthEvent { @javax.annotation.Nonnull private String created; + public static final String SERIALIZED_NAME_CREATED_MS = "createdMs"; + @SerializedName(SERIALIZED_NAME_CREATED_MS) + @javax.annotation.Nonnull + private Long createdMs; + public static final String SERIALIZED_NAME_STATUS = "status"; @SerializedName(SERIALIZED_NAME_STATUS) @javax.annotation.Nonnull @@ -205,6 +210,25 @@ public void setCreated(@javax.annotation.Nonnull String created) { } + public AuthEvent createdMs(@javax.annotation.Nonnull Long createdMs) { + this.createdMs = createdMs; + return this; + } + + /** + * Get createdMs + * @return createdMs + */ + @javax.annotation.Nonnull + public Long getCreatedMs() { + return createdMs; + } + + public void setCreatedMs(@javax.annotation.Nonnull Long createdMs) { + this.createdMs = createdMs; + } + + public AuthEvent status(@javax.annotation.Nonnull AuthEventStatus status) { this.status = status; return this; @@ -240,12 +264,13 @@ public boolean equals(Object o) { Objects.equals(this.eventType, authEvent.eventType) && Objects.equals(this.method, authEvent.method) && Objects.equals(this.created, authEvent.created) && + Objects.equals(this.createdMs, authEvent.createdMs) && Objects.equals(this.status, authEvent.status); } @Override public int hashCode() { - return Objects.hash(authEventID, userID, username, eventType, method, created, status); + return Objects.hash(authEventID, userID, username, eventType, method, created, createdMs, status); } @Override @@ -258,6 +283,7 @@ public String toString() { sb.append(" eventType: ").append(toIndentedString(eventType)).append("\n"); sb.append(" method: ").append(toIndentedString(method)).append("\n"); sb.append(" created: ").append(toIndentedString(created)).append("\n"); + sb.append(" createdMs: ").append(toIndentedString(createdMs)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append("}"); return sb.toString(); @@ -287,6 +313,7 @@ private String toIndentedString(Object o) { openapiFields.add("eventType"); openapiFields.add("method"); openapiFields.add("created"); + openapiFields.add("createdMs"); openapiFields.add("status"); // a set of required properties/fields (JSON key names) @@ -297,6 +324,7 @@ private String toIndentedString(Object o) { openapiRequiredFields.add("eventType"); openapiRequiredFields.add("method"); openapiRequiredFields.add("created"); + openapiRequiredFields.add("createdMs"); openapiRequiredFields.add("status"); } diff --git a/src/main/java/com/corbado/generated/model/AuthEventCreateReq.java b/src/main/java/com/corbado/generated/model/AuthEventCreateReq.java index 53ba4c3..9714bb0 100644 --- a/src/main/java/com/corbado/generated/model/AuthEventCreateReq.java +++ b/src/main/java/com/corbado/generated/model/AuthEventCreateReq.java @@ -52,7 +52,7 @@ /** * AuthEventCreateReq */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-02-08T15:52:19.373962904Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class AuthEventCreateReq { public static final String SERIALIZED_NAME_USERNAME = "username"; @SerializedName(SERIALIZED_NAME_USERNAME) diff --git a/src/main/java/com/corbado/generated/model/Challenge.java b/src/main/java/com/corbado/generated/model/Challenge.java index 1ce0c7e..e9894a5 100644 --- a/src/main/java/com/corbado/generated/model/Challenge.java +++ b/src/main/java/com/corbado/generated/model/Challenge.java @@ -50,7 +50,7 @@ /** * Challenge */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-02-08T15:52:19.373962904Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class Challenge { public static final String SERIALIZED_NAME_CHALLENGE_I_D = "challengeID"; @SerializedName(SERIALIZED_NAME_CHALLENGE_I_D) diff --git a/src/main/java/com/corbado/generated/model/ChallengeCreateReq.java b/src/main/java/com/corbado/generated/model/ChallengeCreateReq.java index 1903eb1..04f50ee 100644 --- a/src/main/java/com/corbado/generated/model/ChallengeCreateReq.java +++ b/src/main/java/com/corbado/generated/model/ChallengeCreateReq.java @@ -50,7 +50,7 @@ /** * ChallengeCreateReq */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-02-08T15:52:19.373962904Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class ChallengeCreateReq { public static final String SERIALIZED_NAME_CHALLENGE_TYPE = "challengeType"; @SerializedName(SERIALIZED_NAME_CHALLENGE_TYPE) diff --git a/src/main/java/com/corbado/generated/model/ChallengeUpdateReq.java b/src/main/java/com/corbado/generated/model/ChallengeUpdateReq.java index a7a2b6e..03164ac 100644 --- a/src/main/java/com/corbado/generated/model/ChallengeUpdateReq.java +++ b/src/main/java/com/corbado/generated/model/ChallengeUpdateReq.java @@ -48,7 +48,7 @@ /** * ChallengeUpdateReq */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-02-08T15:52:19.373962904Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class ChallengeUpdateReq { public static final String SERIALIZED_NAME_VALUE = "value"; @SerializedName(SERIALIZED_NAME_VALUE) diff --git a/src/main/java/com/corbado/generated/model/ClientInformation.java b/src/main/java/com/corbado/generated/model/ClientInformation.java index bb8049b..4b22699 100644 --- a/src/main/java/com/corbado/generated/model/ClientInformation.java +++ b/src/main/java/com/corbado/generated/model/ClientInformation.java @@ -15,6 +15,7 @@ import java.util.Objects; import com.corbado.generated.model.JavaScriptHighEntropy; +import com.corbado.generated.model.ParsedDeviceInfo; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -49,7 +50,7 @@ /** * ClientInformation */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-02-08T15:52:19.373962904Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class ClientInformation { public static final String SERIALIZED_NAME_REMOTE_ADDRESS = "remoteAddress"; @SerializedName(SERIALIZED_NAME_REMOTE_ADDRESS) @@ -96,6 +97,16 @@ public class ClientInformation { @javax.annotation.Nonnull private Boolean conditionalMediationAvailable; + public static final String SERIALIZED_NAME_PRIVATE_MODE = "privateMode"; + @SerializedName(SERIALIZED_NAME_PRIVATE_MODE) + @javax.annotation.Nullable + private Boolean privateMode; + + public static final String SERIALIZED_NAME_PARSED_DEVICE_INFO = "parsedDeviceInfo"; + @SerializedName(SERIALIZED_NAME_PARSED_DEVICE_INFO) + @javax.annotation.Nonnull + private ParsedDeviceInfo parsedDeviceInfo; + public ClientInformation() { } @@ -270,6 +281,44 @@ public void setConditionalMediationAvailable(@javax.annotation.Nonnull Boolean c } + public ClientInformation privateMode(@javax.annotation.Nullable Boolean privateMode) { + this.privateMode = privateMode; + return this; + } + + /** + * Get privateMode + * @return privateMode + */ + @javax.annotation.Nullable + public Boolean getPrivateMode() { + return privateMode; + } + + public void setPrivateMode(@javax.annotation.Nullable Boolean privateMode) { + this.privateMode = privateMode; + } + + + public ClientInformation parsedDeviceInfo(@javax.annotation.Nonnull ParsedDeviceInfo parsedDeviceInfo) { + this.parsedDeviceInfo = parsedDeviceInfo; + return this; + } + + /** + * Get parsedDeviceInfo + * @return parsedDeviceInfo + */ + @javax.annotation.Nonnull + public ParsedDeviceInfo getParsedDeviceInfo() { + return parsedDeviceInfo; + } + + public void setParsedDeviceInfo(@javax.annotation.Nonnull ParsedDeviceInfo parsedDeviceInfo) { + this.parsedDeviceInfo = parsedDeviceInfo; + } + + @Override public boolean equals(Object o) { @@ -288,12 +337,14 @@ public boolean equals(Object o) { Objects.equals(this.bluetoothAvailable, clientInformation.bluetoothAvailable) && Objects.equals(this.passwordManagerAvailable, clientInformation.passwordManagerAvailable) && Objects.equals(this.userVerifyingPlatformAuthenticatorAvailable, clientInformation.userVerifyingPlatformAuthenticatorAvailable) && - Objects.equals(this.conditionalMediationAvailable, clientInformation.conditionalMediationAvailable); + Objects.equals(this.conditionalMediationAvailable, clientInformation.conditionalMediationAvailable) && + Objects.equals(this.privateMode, clientInformation.privateMode) && + Objects.equals(this.parsedDeviceInfo, clientInformation.parsedDeviceInfo); } @Override public int hashCode() { - return Objects.hash(remoteAddress, userAgent, clientEnvHandle, javascriptFingerprint, javaScriptHighEntropy, bluetoothAvailable, passwordManagerAvailable, userVerifyingPlatformAuthenticatorAvailable, conditionalMediationAvailable); + return Objects.hash(remoteAddress, userAgent, clientEnvHandle, javascriptFingerprint, javaScriptHighEntropy, bluetoothAvailable, passwordManagerAvailable, userVerifyingPlatformAuthenticatorAvailable, conditionalMediationAvailable, privateMode, parsedDeviceInfo); } @Override @@ -309,6 +360,8 @@ public String toString() { sb.append(" passwordManagerAvailable: ").append(toIndentedString(passwordManagerAvailable)).append("\n"); sb.append(" userVerifyingPlatformAuthenticatorAvailable: ").append(toIndentedString(userVerifyingPlatformAuthenticatorAvailable)).append("\n"); sb.append(" conditionalMediationAvailable: ").append(toIndentedString(conditionalMediationAvailable)).append("\n"); + sb.append(" privateMode: ").append(toIndentedString(privateMode)).append("\n"); + sb.append(" parsedDeviceInfo: ").append(toIndentedString(parsedDeviceInfo)).append("\n"); sb.append("}"); return sb.toString(); } @@ -340,6 +393,8 @@ private String toIndentedString(Object o) { openapiFields.add("passwordManagerAvailable"); openapiFields.add("userVerifyingPlatformAuthenticatorAvailable"); openapiFields.add("conditionalMediationAvailable"); + openapiFields.add("privateMode"); + openapiFields.add("parsedDeviceInfo"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -347,6 +402,7 @@ private String toIndentedString(Object o) { openapiRequiredFields.add("userAgent"); openapiRequiredFields.add("userVerifyingPlatformAuthenticatorAvailable"); openapiRequiredFields.add("conditionalMediationAvailable"); + openapiRequiredFields.add("parsedDeviceInfo"); } /** @@ -393,6 +449,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonObj.get("javaScriptHighEntropy") != null && !jsonObj.get("javaScriptHighEntropy").isJsonNull()) { JavaScriptHighEntropy.validateJsonElement(jsonObj.get("javaScriptHighEntropy")); } + // validate the required field `parsedDeviceInfo` + ParsedDeviceInfo.validateJsonElement(jsonObj.get("parsedDeviceInfo")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/com/corbado/generated/model/ConnectToken.java b/src/main/java/com/corbado/generated/model/ConnectToken.java index d7f6250..2caaf59 100644 --- a/src/main/java/com/corbado/generated/model/ConnectToken.java +++ b/src/main/java/com/corbado/generated/model/ConnectToken.java @@ -51,7 +51,7 @@ /** * ConnectToken */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-02-08T15:52:19.373962904Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class ConnectToken { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) diff --git a/src/main/java/com/corbado/generated/model/ConnectTokenCreateReq.java b/src/main/java/com/corbado/generated/model/ConnectTokenCreateReq.java index d6d2d49..fbc24a2 100644 --- a/src/main/java/com/corbado/generated/model/ConnectTokenCreateReq.java +++ b/src/main/java/com/corbado/generated/model/ConnectTokenCreateReq.java @@ -50,7 +50,7 @@ /** * ConnectTokenCreateReq */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-02-08T15:52:19.373962904Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class ConnectTokenCreateReq { public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) diff --git a/src/main/java/com/corbado/generated/model/ConnectTokenData.java b/src/main/java/com/corbado/generated/model/ConnectTokenData.java index e3af016..4cfe4fe 100644 --- a/src/main/java/com/corbado/generated/model/ConnectTokenData.java +++ b/src/main/java/com/corbado/generated/model/ConnectTokenData.java @@ -61,7 +61,7 @@ import com.corbado.generated.invoker.JSON; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-02-08T15:52:19.373962904Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class ConnectTokenData extends AbstractOpenApiSchema { private static final Logger log = Logger.getLogger(ConnectTokenData.class.getName()); diff --git a/src/main/java/com/corbado/generated/model/ConnectTokenDataPasskeyAppend.java b/src/main/java/com/corbado/generated/model/ConnectTokenDataPasskeyAppend.java index d52e6eb..3f9f10e 100644 --- a/src/main/java/com/corbado/generated/model/ConnectTokenDataPasskeyAppend.java +++ b/src/main/java/com/corbado/generated/model/ConnectTokenDataPasskeyAppend.java @@ -48,7 +48,7 @@ /** * ConnectTokenDataPasskeyAppend */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-02-08T15:52:19.373962904Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class ConnectTokenDataPasskeyAppend { public static final String SERIALIZED_NAME_DISPLAY_NAME = "displayName"; @SerializedName(SERIALIZED_NAME_DISPLAY_NAME) diff --git a/src/main/java/com/corbado/generated/model/ConnectTokenDataPasskeyDelete.java b/src/main/java/com/corbado/generated/model/ConnectTokenDataPasskeyDelete.java index 262ece1..293af2c 100644 --- a/src/main/java/com/corbado/generated/model/ConnectTokenDataPasskeyDelete.java +++ b/src/main/java/com/corbado/generated/model/ConnectTokenDataPasskeyDelete.java @@ -48,7 +48,7 @@ /** * ConnectTokenDataPasskeyDelete */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-02-08T15:52:19.373962904Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class ConnectTokenDataPasskeyDelete { public static final String SERIALIZED_NAME_IDENTIFIER = "identifier"; @SerializedName(SERIALIZED_NAME_IDENTIFIER) diff --git a/src/main/java/com/corbado/generated/model/ConnectTokenDataPasskeyList.java b/src/main/java/com/corbado/generated/model/ConnectTokenDataPasskeyList.java index 8b38235..10579aa 100644 --- a/src/main/java/com/corbado/generated/model/ConnectTokenDataPasskeyList.java +++ b/src/main/java/com/corbado/generated/model/ConnectTokenDataPasskeyList.java @@ -48,7 +48,7 @@ /** * ConnectTokenDataPasskeyList */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-02-08T15:52:19.373962904Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class ConnectTokenDataPasskeyList { public static final String SERIALIZED_NAME_IDENTIFIER = "identifier"; @SerializedName(SERIALIZED_NAME_IDENTIFIER) diff --git a/src/main/java/com/corbado/generated/model/ConnectTokenDataPasskeyLogin.java b/src/main/java/com/corbado/generated/model/ConnectTokenDataPasskeyLogin.java index 74fe585..442cb7e 100644 --- a/src/main/java/com/corbado/generated/model/ConnectTokenDataPasskeyLogin.java +++ b/src/main/java/com/corbado/generated/model/ConnectTokenDataPasskeyLogin.java @@ -48,7 +48,7 @@ /** * ConnectTokenDataPasskeyLogin */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-02-08T15:52:19.373962904Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class ConnectTokenDataPasskeyLogin { public static final String SERIALIZED_NAME_IDENTIFIER = "identifier"; @SerializedName(SERIALIZED_NAME_IDENTIFIER) diff --git a/src/main/java/com/corbado/generated/model/ConnectTokenList.java b/src/main/java/com/corbado/generated/model/ConnectTokenList.java index e8e8b7c..3770d05 100644 --- a/src/main/java/com/corbado/generated/model/ConnectTokenList.java +++ b/src/main/java/com/corbado/generated/model/ConnectTokenList.java @@ -52,7 +52,7 @@ /** * ConnectTokenList */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-02-08T15:52:19.373962904Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class ConnectTokenList { public static final String SERIALIZED_NAME_CONNECT_TOKENS = "connectTokens"; @SerializedName(SERIALIZED_NAME_CONNECT_TOKENS) diff --git a/src/main/java/com/corbado/generated/model/ConnectTokenType.java b/src/main/java/com/corbado/generated/model/ConnectTokenType.java index a2bf2fd..51ea620 100644 --- a/src/main/java/com/corbado/generated/model/ConnectTokenType.java +++ b/src/main/java/com/corbado/generated/model/ConnectTokenType.java @@ -29,13 +29,13 @@ @JsonAdapter(ConnectTokenType.Adapter.class) public enum ConnectTokenType { - APPEND("passkey-append"), + PASSKEY_APPEND("passkey-append"), - DELETE("passkey-delete"), + PASSKEY_DELETE("passkey-delete"), - LIST("passkey-list"), + PASSKEY_LIST("passkey-list"), - LOGIN("passkey-login"); + PASSKEY_LOGIN("passkey-login"); private String value; diff --git a/src/main/java/com/corbado/generated/model/ConnectTokenUpdateReq.java b/src/main/java/com/corbado/generated/model/ConnectTokenUpdateReq.java index 275c26d..8850344 100644 --- a/src/main/java/com/corbado/generated/model/ConnectTokenUpdateReq.java +++ b/src/main/java/com/corbado/generated/model/ConnectTokenUpdateReq.java @@ -49,7 +49,7 @@ /** * ConnectTokenUpdateReq */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-02-08T15:52:19.373962904Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class ConnectTokenUpdateReq { public static final String SERIALIZED_NAME_STATUS = "status"; @SerializedName(SERIALIZED_NAME_STATUS) diff --git a/src/main/java/com/corbado/generated/model/Credential.java b/src/main/java/com/corbado/generated/model/Credential.java index 42c41da..cc3d3f8 100644 --- a/src/main/java/com/corbado/generated/model/Credential.java +++ b/src/main/java/com/corbado/generated/model/Credential.java @@ -51,7 +51,7 @@ /** * Credential */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-02-08T15:52:19.373962904Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class Credential { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) @@ -163,11 +163,21 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @javax.annotation.Nonnull private String lastUsed; + public static final String SERIALIZED_NAME_LAST_USED_MS = "lastUsedMs"; + @SerializedName(SERIALIZED_NAME_LAST_USED_MS) + @javax.annotation.Nonnull + private Long lastUsedMs; + public static final String SERIALIZED_NAME_CREATED = "created"; @SerializedName(SERIALIZED_NAME_CREATED) @javax.annotation.Nonnull private String created; + public static final String SERIALIZED_NAME_CREATED_MS = "createdMs"; + @SerializedName(SERIALIZED_NAME_CREATED_MS) + @javax.annotation.Nonnull + private Long createdMs; + /** * Status */ @@ -431,6 +441,25 @@ public void setLastUsed(@javax.annotation.Nonnull String lastUsed) { } + public Credential lastUsedMs(@javax.annotation.Nonnull Long lastUsedMs) { + this.lastUsedMs = lastUsedMs; + return this; + } + + /** + * Get lastUsedMs + * @return lastUsedMs + */ + @javax.annotation.Nonnull + public Long getLastUsedMs() { + return lastUsedMs; + } + + public void setLastUsedMs(@javax.annotation.Nonnull Long lastUsedMs) { + this.lastUsedMs = lastUsedMs; + } + + public Credential created(@javax.annotation.Nonnull String created) { this.created = created; return this; @@ -450,6 +479,25 @@ public void setCreated(@javax.annotation.Nonnull String created) { } + public Credential createdMs(@javax.annotation.Nonnull Long createdMs) { + this.createdMs = createdMs; + return this; + } + + /** + * Get createdMs + * @return createdMs + */ + @javax.annotation.Nonnull + public Long getCreatedMs() { + return createdMs; + } + + public void setCreatedMs(@javax.annotation.Nonnull Long createdMs) { + this.createdMs = createdMs; + } + + public Credential status(@javax.annotation.Nonnull StatusEnum status) { this.status = status; return this; @@ -508,14 +556,16 @@ public boolean equals(Object o) { Objects.equals(this.sourceOS, credential.sourceOS) && Objects.equals(this.sourceBrowser, credential.sourceBrowser) && Objects.equals(this.lastUsed, credential.lastUsed) && + Objects.equals(this.lastUsedMs, credential.lastUsedMs) && Objects.equals(this.created, credential.created) && + Objects.equals(this.createdMs, credential.createdMs) && Objects.equals(this.status, credential.status) && Objects.equals(this.aaguidDetails, credential.aaguidDetails); } @Override public int hashCode() { - return Objects.hash(id, credentialID, attestationType, transport, backupEligible, backupState, authenticatorAAGUID, sourceOS, sourceBrowser, lastUsed, created, status, aaguidDetails); + return Objects.hash(id, credentialID, attestationType, transport, backupEligible, backupState, authenticatorAAGUID, sourceOS, sourceBrowser, lastUsed, lastUsedMs, created, createdMs, status, aaguidDetails); } @Override @@ -532,7 +582,9 @@ public String toString() { sb.append(" sourceOS: ").append(toIndentedString(sourceOS)).append("\n"); sb.append(" sourceBrowser: ").append(toIndentedString(sourceBrowser)).append("\n"); sb.append(" lastUsed: ").append(toIndentedString(lastUsed)).append("\n"); + sb.append(" lastUsedMs: ").append(toIndentedString(lastUsedMs)).append("\n"); sb.append(" created: ").append(toIndentedString(created)).append("\n"); + sb.append(" createdMs: ").append(toIndentedString(createdMs)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append(" aaguidDetails: ").append(toIndentedString(aaguidDetails)).append("\n"); sb.append("}"); @@ -567,7 +619,9 @@ private String toIndentedString(Object o) { openapiFields.add("sourceOS"); openapiFields.add("sourceBrowser"); openapiFields.add("lastUsed"); + openapiFields.add("lastUsedMs"); openapiFields.add("created"); + openapiFields.add("createdMs"); openapiFields.add("status"); openapiFields.add("aaguidDetails"); @@ -583,7 +637,9 @@ private String toIndentedString(Object o) { openapiRequiredFields.add("sourceOS"); openapiRequiredFields.add("sourceBrowser"); openapiRequiredFields.add("lastUsed"); + openapiRequiredFields.add("lastUsedMs"); openapiRequiredFields.add("created"); + openapiRequiredFields.add("createdMs"); openapiRequiredFields.add("status"); openapiRequiredFields.add("aaguidDetails"); } diff --git a/src/main/java/com/corbado/generated/model/CredentialList.java b/src/main/java/com/corbado/generated/model/CredentialList.java index d814ad4..6bccb97 100644 --- a/src/main/java/com/corbado/generated/model/CredentialList.java +++ b/src/main/java/com/corbado/generated/model/CredentialList.java @@ -52,7 +52,7 @@ /** * CredentialList */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-02-08T15:52:19.373962904Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class CredentialList { public static final String SERIALIZED_NAME_CREDENTIALS = "credentials"; @SerializedName(SERIALIZED_NAME_CREDENTIALS) diff --git a/src/main/java/com/corbado/generated/model/DecisionInsights.java b/src/main/java/com/corbado/generated/model/DecisionInsights.java new file mode 100644 index 0000000..cc388bb --- /dev/null +++ b/src/main/java/com/corbado/generated/model/DecisionInsights.java @@ -0,0 +1,314 @@ +/* + * Corbado Backend API + * # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@corbado.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.corbado.generated.model; + +import java.util.Objects; +import com.corbado.generated.model.DecisionTag; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.corbado.generated.invoker.JSON; + +/** + * DecisionInsights + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-02-08T15:52:19.373962904Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") +public class DecisionInsights { + public static final String SERIALIZED_NAME_TAG = "tag"; + @SerializedName(SERIALIZED_NAME_TAG) + @javax.annotation.Nonnull + private DecisionTag tag; + + public static final String SERIALIZED_NAME_IS_C_D_A_CANDIDATE = "isCDACandidate"; + @SerializedName(SERIALIZED_NAME_IS_C_D_A_CANDIDATE) + @javax.annotation.Nonnull + private Boolean isCDACandidate; + + public static final String SERIALIZED_NAME_IS_RESTRICTED_BROWSER = "isRestrictedBrowser"; + @SerializedName(SERIALIZED_NAME_IS_RESTRICTED_BROWSER) + @javax.annotation.Nonnull + private Boolean isRestrictedBrowser; + + public static final String SERIALIZED_NAME_EXPERIMENTS = "experiments"; + @SerializedName(SERIALIZED_NAME_EXPERIMENTS) + @javax.annotation.Nonnull + private List experiments = new ArrayList<>(); + + public DecisionInsights() { + } + + public DecisionInsights tag(@javax.annotation.Nonnull DecisionTag tag) { + this.tag = tag; + return this; + } + + /** + * Get tag + * @return tag + */ + @javax.annotation.Nonnull + public DecisionTag getTag() { + return tag; + } + + public void setTag(@javax.annotation.Nonnull DecisionTag tag) { + this.tag = tag; + } + + + public DecisionInsights isCDACandidate(@javax.annotation.Nonnull Boolean isCDACandidate) { + this.isCDACandidate = isCDACandidate; + return this; + } + + /** + * Get isCDACandidate + * @return isCDACandidate + */ + @javax.annotation.Nonnull + public Boolean getIsCDACandidate() { + return isCDACandidate; + } + + public void setIsCDACandidate(@javax.annotation.Nonnull Boolean isCDACandidate) { + this.isCDACandidate = isCDACandidate; + } + + + public DecisionInsights isRestrictedBrowser(@javax.annotation.Nonnull Boolean isRestrictedBrowser) { + this.isRestrictedBrowser = isRestrictedBrowser; + return this; + } + + /** + * Get isRestrictedBrowser + * @return isRestrictedBrowser + */ + @javax.annotation.Nonnull + public Boolean getIsRestrictedBrowser() { + return isRestrictedBrowser; + } + + public void setIsRestrictedBrowser(@javax.annotation.Nonnull Boolean isRestrictedBrowser) { + this.isRestrictedBrowser = isRestrictedBrowser; + } + + + public DecisionInsights experiments(@javax.annotation.Nonnull List experiments) { + this.experiments = experiments; + return this; + } + + public DecisionInsights addExperimentsItem(String experimentsItem) { + if (this.experiments == null) { + this.experiments = new ArrayList<>(); + } + this.experiments.add(experimentsItem); + return this; + } + + /** + * Get experiments + * @return experiments + */ + @javax.annotation.Nonnull + public List getExperiments() { + return experiments; + } + + public void setExperiments(@javax.annotation.Nonnull List experiments) { + this.experiments = experiments; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DecisionInsights decisionInsights = (DecisionInsights) o; + return Objects.equals(this.tag, decisionInsights.tag) && + Objects.equals(this.isCDACandidate, decisionInsights.isCDACandidate) && + Objects.equals(this.isRestrictedBrowser, decisionInsights.isRestrictedBrowser) && + Objects.equals(this.experiments, decisionInsights.experiments); + } + + @Override + public int hashCode() { + return Objects.hash(tag, isCDACandidate, isRestrictedBrowser, experiments); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DecisionInsights {\n"); + sb.append(" tag: ").append(toIndentedString(tag)).append("\n"); + sb.append(" isCDACandidate: ").append(toIndentedString(isCDACandidate)).append("\n"); + sb.append(" isRestrictedBrowser: ").append(toIndentedString(isRestrictedBrowser)).append("\n"); + sb.append(" experiments: ").append(toIndentedString(experiments)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("tag"); + openapiFields.add("isCDACandidate"); + openapiFields.add("isRestrictedBrowser"); + openapiFields.add("experiments"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("tag"); + openapiRequiredFields.add("isCDACandidate"); + openapiRequiredFields.add("isRestrictedBrowser"); + openapiRequiredFields.add("experiments"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to DecisionInsights + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!DecisionInsights.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in DecisionInsights is not found in the empty JSON string", DecisionInsights.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!DecisionInsights.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `DecisionInsights` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : DecisionInsights.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the required field `tag` + DecisionTag.validateJsonElement(jsonObj.get("tag")); + // ensure the required json array is present + if (jsonObj.get("experiments") == null) { + throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); + } else if (!jsonObj.get("experiments").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `experiments` to be an array in the JSON string but got `%s`", jsonObj.get("experiments").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!DecisionInsights.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'DecisionInsights' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(DecisionInsights.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, DecisionInsights value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public DecisionInsights read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of DecisionInsights given an JSON string + * + * @param jsonString JSON string + * @return An instance of DecisionInsights + * @throws IOException if the JSON string is invalid with respect to DecisionInsights + */ + public static DecisionInsights fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, DecisionInsights.class); + } + + /** + * Convert an instance of DecisionInsights to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/corbado/generated/model/DecisionTag.java b/src/main/java/com/corbado/generated/model/DecisionTag.java index 0372aa1..de02582 100644 --- a/src/main/java/com/corbado/generated/model/DecisionTag.java +++ b/src/main/java/com/corbado/generated/model/DecisionTag.java @@ -29,6 +29,8 @@ @JsonAdapter(DecisionTag.Adapter.class) public enum DecisionTag { + ENV_NO_PLATFORM_PK_SUPPORT("env-no-platform-pk-support"), + ENV_NO_PK_SUPPORT("env-no-pk-support"), USER_NO_PKS("user-no-pks"), @@ -65,7 +67,9 @@ public enum DecisionTag { PROCESS_PK_LOGIN_CROSS_PLATFORM_COMPLETED("process-pk-login-cross-platform-completed"), - DEVICE_LOCAL_PLATFORM_PASSKEY_EXPERIMENT("device-local-platform-passkey-experiment"); + DEVICE_LOCAL_PLATFORM_PASSKEY_EXPERIMENT("device-local-platform-passkey-experiment"), + + ENV_BROKEN("env-broken"); private String value; diff --git a/src/main/java/com/corbado/generated/model/DetectionInsights.java b/src/main/java/com/corbado/generated/model/DetectionInsights.java new file mode 100644 index 0000000..ddba22b --- /dev/null +++ b/src/main/java/com/corbado/generated/model/DetectionInsights.java @@ -0,0 +1,358 @@ +/* + * Corbado Backend API + * # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@corbado.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.corbado.generated.model; + +import java.util.Objects; +import com.corbado.generated.model.DetectionTag; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.corbado.generated.invoker.JSON; + +/** + * DetectionInsights + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-02-08T15:52:19.373962904Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") +public class DetectionInsights { + public static final String SERIALIZED_NAME_TAGS = "tags"; + @SerializedName(SERIALIZED_NAME_TAGS) + @javax.annotation.Nonnull + private List tags = new ArrayList<>(); + + public static final String SERIALIZED_NAME_CREDENTIAL_IDS = "credentialIds"; + @SerializedName(SERIALIZED_NAME_CREDENTIAL_IDS) + @javax.annotation.Nonnull + private List credentialIds = new ArrayList<>(); + + public static final String SERIALIZED_NAME_CLIENT_ENV_IDS = "clientEnvIds"; + @SerializedName(SERIALIZED_NAME_CLIENT_ENV_IDS) + @javax.annotation.Nonnull + private List clientEnvIds = new ArrayList<>(); + + public static final String SERIALIZED_NAME_PASSWORD_MANAGER_IDS = "passwordManagerIds"; + @SerializedName(SERIALIZED_NAME_PASSWORD_MANAGER_IDS) + @javax.annotation.Nonnull + private List passwordManagerIds = new ArrayList<>(); + + public DetectionInsights() { + } + + public DetectionInsights tags(@javax.annotation.Nonnull List tags) { + this.tags = tags; + return this; + } + + public DetectionInsights addTagsItem(DetectionTag tagsItem) { + if (this.tags == null) { + this.tags = new ArrayList<>(); + } + this.tags.add(tagsItem); + return this; + } + + /** + * Get tags + * @return tags + */ + @javax.annotation.Nonnull + public List getTags() { + return tags; + } + + public void setTags(@javax.annotation.Nonnull List tags) { + this.tags = tags; + } + + + public DetectionInsights credentialIds(@javax.annotation.Nonnull List credentialIds) { + this.credentialIds = credentialIds; + return this; + } + + public DetectionInsights addCredentialIdsItem(String credentialIdsItem) { + if (this.credentialIds == null) { + this.credentialIds = new ArrayList<>(); + } + this.credentialIds.add(credentialIdsItem); + return this; + } + + /** + * Get credentialIds + * @return credentialIds + */ + @javax.annotation.Nonnull + public List getCredentialIds() { + return credentialIds; + } + + public void setCredentialIds(@javax.annotation.Nonnull List credentialIds) { + this.credentialIds = credentialIds; + } + + + public DetectionInsights clientEnvIds(@javax.annotation.Nonnull List clientEnvIds) { + this.clientEnvIds = clientEnvIds; + return this; + } + + public DetectionInsights addClientEnvIdsItem(String clientEnvIdsItem) { + if (this.clientEnvIds == null) { + this.clientEnvIds = new ArrayList<>(); + } + this.clientEnvIds.add(clientEnvIdsItem); + return this; + } + + /** + * Get clientEnvIds + * @return clientEnvIds + */ + @javax.annotation.Nonnull + public List getClientEnvIds() { + return clientEnvIds; + } + + public void setClientEnvIds(@javax.annotation.Nonnull List clientEnvIds) { + this.clientEnvIds = clientEnvIds; + } + + + public DetectionInsights passwordManagerIds(@javax.annotation.Nonnull List passwordManagerIds) { + this.passwordManagerIds = passwordManagerIds; + return this; + } + + public DetectionInsights addPasswordManagerIdsItem(String passwordManagerIdsItem) { + if (this.passwordManagerIds == null) { + this.passwordManagerIds = new ArrayList<>(); + } + this.passwordManagerIds.add(passwordManagerIdsItem); + return this; + } + + /** + * Get passwordManagerIds + * @return passwordManagerIds + */ + @javax.annotation.Nonnull + public List getPasswordManagerIds() { + return passwordManagerIds; + } + + public void setPasswordManagerIds(@javax.annotation.Nonnull List passwordManagerIds) { + this.passwordManagerIds = passwordManagerIds; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DetectionInsights detectionInsights = (DetectionInsights) o; + return Objects.equals(this.tags, detectionInsights.tags) && + Objects.equals(this.credentialIds, detectionInsights.credentialIds) && + Objects.equals(this.clientEnvIds, detectionInsights.clientEnvIds) && + Objects.equals(this.passwordManagerIds, detectionInsights.passwordManagerIds); + } + + @Override + public int hashCode() { + return Objects.hash(tags, credentialIds, clientEnvIds, passwordManagerIds); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DetectionInsights {\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" credentialIds: ").append(toIndentedString(credentialIds)).append("\n"); + sb.append(" clientEnvIds: ").append(toIndentedString(clientEnvIds)).append("\n"); + sb.append(" passwordManagerIds: ").append(toIndentedString(passwordManagerIds)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("tags"); + openapiFields.add("credentialIds"); + openapiFields.add("clientEnvIds"); + openapiFields.add("passwordManagerIds"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("tags"); + openapiRequiredFields.add("credentialIds"); + openapiRequiredFields.add("clientEnvIds"); + openapiRequiredFields.add("passwordManagerIds"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to DetectionInsights + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!DetectionInsights.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in DetectionInsights is not found in the empty JSON string", DetectionInsights.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!DetectionInsights.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `DetectionInsights` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : DetectionInsights.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the json data is an array + if (!jsonObj.get("tags").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); + } + + JsonArray jsonArraytags = jsonObj.getAsJsonArray("tags"); + // validate the required field `tags` (array) + for (int i = 0; i < jsonArraytags.size(); i++) { + DetectionTag.validateJsonElement(jsonArraytags.get(i)); + }; + // ensure the required json array is present + if (jsonObj.get("credentialIds") == null) { + throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); + } else if (!jsonObj.get("credentialIds").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `credentialIds` to be an array in the JSON string but got `%s`", jsonObj.get("credentialIds").toString())); + } + // ensure the required json array is present + if (jsonObj.get("clientEnvIds") == null) { + throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); + } else if (!jsonObj.get("clientEnvIds").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `clientEnvIds` to be an array in the JSON string but got `%s`", jsonObj.get("clientEnvIds").toString())); + } + // ensure the required json array is present + if (jsonObj.get("passwordManagerIds") == null) { + throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); + } else if (!jsonObj.get("passwordManagerIds").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `passwordManagerIds` to be an array in the JSON string but got `%s`", jsonObj.get("passwordManagerIds").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!DetectionInsights.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'DetectionInsights' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(DetectionInsights.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, DetectionInsights value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public DetectionInsights read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of DetectionInsights given an JSON string + * + * @param jsonString JSON string + * @return An instance of DetectionInsights + * @throws IOException if the JSON string is invalid with respect to DetectionInsights + */ + public static DetectionInsights fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, DetectionInsights.class); + } + + /** + * Convert an instance of DetectionInsights to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/corbado/generated/model/DetectionTag.java b/src/main/java/com/corbado/generated/model/DetectionTag.java index d0e6087..9bbacc2 100644 --- a/src/main/java/com/corbado/generated/model/DetectionTag.java +++ b/src/main/java/com/corbado/generated/model/DetectionTag.java @@ -48,7 +48,7 @@ /** * DetectionTag */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-02-08T15:52:19.373962904Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class DetectionTag { /** * Gets or Sets category diff --git a/src/main/java/com/corbado/generated/model/ErrorRsp.java b/src/main/java/com/corbado/generated/model/ErrorRsp.java index 1ea3f26..f690348 100644 --- a/src/main/java/com/corbado/generated/model/ErrorRsp.java +++ b/src/main/java/com/corbado/generated/model/ErrorRsp.java @@ -50,7 +50,7 @@ /** * ErrorRsp */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-02-08T15:52:19.373962904Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class ErrorRsp { public static final String SERIALIZED_NAME_HTTP_STATUS_CODE = "httpStatusCode"; @SerializedName(SERIALIZED_NAME_HTTP_STATUS_CODE) diff --git a/src/main/java/com/corbado/generated/model/ErrorRspAllOfError.java b/src/main/java/com/corbado/generated/model/ErrorRspAllOfError.java index e534ba4..22d4329 100644 --- a/src/main/java/com/corbado/generated/model/ErrorRspAllOfError.java +++ b/src/main/java/com/corbado/generated/model/ErrorRspAllOfError.java @@ -51,7 +51,7 @@ /** * ErrorRspAllOfError */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-02-08T15:52:19.373962904Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class ErrorRspAllOfError { public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) diff --git a/src/main/java/com/corbado/generated/model/ErrorRspAllOfErrorValidation.java b/src/main/java/com/corbado/generated/model/ErrorRspAllOfErrorValidation.java index 978de1a..2d964e4 100644 --- a/src/main/java/com/corbado/generated/model/ErrorRspAllOfErrorValidation.java +++ b/src/main/java/com/corbado/generated/model/ErrorRspAllOfErrorValidation.java @@ -48,7 +48,7 @@ /** * ErrorRspAllOfErrorValidation */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-02-08T15:52:19.373962904Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class ErrorRspAllOfErrorValidation { public static final String SERIALIZED_NAME_FIELD = "field"; @SerializedName(SERIALIZED_NAME_FIELD) diff --git a/src/main/java/com/corbado/generated/model/GenericRsp.java b/src/main/java/com/corbado/generated/model/GenericRsp.java index 3213fb7..865d1ad 100644 --- a/src/main/java/com/corbado/generated/model/GenericRsp.java +++ b/src/main/java/com/corbado/generated/model/GenericRsp.java @@ -49,7 +49,7 @@ /** * GenericRsp */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-02-08T15:52:19.373962904Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class GenericRsp { public static final String SERIALIZED_NAME_HTTP_STATUS_CODE = "httpStatusCode"; @SerializedName(SERIALIZED_NAME_HTTP_STATUS_CODE) diff --git a/src/main/java/com/corbado/generated/model/Identifier.java b/src/main/java/com/corbado/generated/model/Identifier.java index 0d8a519..03f004f 100644 --- a/src/main/java/com/corbado/generated/model/Identifier.java +++ b/src/main/java/com/corbado/generated/model/Identifier.java @@ -50,7 +50,7 @@ /** * Identifier */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-02-08T15:52:19.373962904Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class Identifier { public static final String SERIALIZED_NAME_IDENTIFIER_I_D = "identifierID"; @SerializedName(SERIALIZED_NAME_IDENTIFIER_I_D) diff --git a/src/main/java/com/corbado/generated/model/IdentifierCreateReq.java b/src/main/java/com/corbado/generated/model/IdentifierCreateReq.java index 95abece..1f8e5fd 100644 --- a/src/main/java/com/corbado/generated/model/IdentifierCreateReq.java +++ b/src/main/java/com/corbado/generated/model/IdentifierCreateReq.java @@ -50,7 +50,7 @@ /** * IdentifierCreateReq */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-02-08T15:52:19.373962904Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class IdentifierCreateReq { public static final String SERIALIZED_NAME_IDENTIFIER_TYPE = "identifierType"; @SerializedName(SERIALIZED_NAME_IDENTIFIER_TYPE) diff --git a/src/main/java/com/corbado/generated/model/IdentifierList.java b/src/main/java/com/corbado/generated/model/IdentifierList.java index 2a8cd6c..7385ecf 100644 --- a/src/main/java/com/corbado/generated/model/IdentifierList.java +++ b/src/main/java/com/corbado/generated/model/IdentifierList.java @@ -52,7 +52,7 @@ /** * IdentifierList */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-02-08T15:52:19.373962904Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class IdentifierList { public static final String SERIALIZED_NAME_IDENTIFIERS = "identifiers"; @SerializedName(SERIALIZED_NAME_IDENTIFIERS) diff --git a/src/main/java/com/corbado/generated/model/IdentifierUpdateReq.java b/src/main/java/com/corbado/generated/model/IdentifierUpdateReq.java index 79466d1..3db0c30 100644 --- a/src/main/java/com/corbado/generated/model/IdentifierUpdateReq.java +++ b/src/main/java/com/corbado/generated/model/IdentifierUpdateReq.java @@ -49,7 +49,7 @@ /** * IdentifierUpdateReq */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-02-08T15:52:19.373962904Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class IdentifierUpdateReq { public static final String SERIALIZED_NAME_STATUS = "status"; @SerializedName(SERIALIZED_NAME_STATUS) diff --git a/src/main/java/com/corbado/generated/model/JavaScriptHighEntropy.java b/src/main/java/com/corbado/generated/model/JavaScriptHighEntropy.java index b84dd8c..a0db4f2 100644 --- a/src/main/java/com/corbado/generated/model/JavaScriptHighEntropy.java +++ b/src/main/java/com/corbado/generated/model/JavaScriptHighEntropy.java @@ -48,7 +48,7 @@ /** * JavaScriptHighEntropy */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-02-08T15:52:19.373962904Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class JavaScriptHighEntropy { public static final String SERIALIZED_NAME_PLATFORM = "platform"; @SerializedName(SERIALIZED_NAME_PLATFORM) diff --git a/src/main/java/com/corbado/generated/model/Paging.java b/src/main/java/com/corbado/generated/model/Paging.java index 6ade1c7..44965c0 100644 --- a/src/main/java/com/corbado/generated/model/Paging.java +++ b/src/main/java/com/corbado/generated/model/Paging.java @@ -48,7 +48,7 @@ /** * Paging */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-02-08T15:52:19.373962904Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class Paging { public static final String SERIALIZED_NAME_PAGE = "page"; @SerializedName(SERIALIZED_NAME_PAGE) diff --git a/src/main/java/com/corbado/generated/model/ParsedDeviceInfo.java b/src/main/java/com/corbado/generated/model/ParsedDeviceInfo.java new file mode 100644 index 0000000..77593a0 --- /dev/null +++ b/src/main/java/com/corbado/generated/model/ParsedDeviceInfo.java @@ -0,0 +1,307 @@ +/* + * Corbado Backend API + * # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@corbado.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.corbado.generated.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.corbado.generated.invoker.JSON; + +/** + * ParsedDeviceInfo + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-02-08T15:52:19.373962904Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") +public class ParsedDeviceInfo { + public static final String SERIALIZED_NAME_BROWSER_NAME = "browserName"; + @SerializedName(SERIALIZED_NAME_BROWSER_NAME) + @javax.annotation.Nonnull + private String browserName; + + public static final String SERIALIZED_NAME_BROWSER_VERSION = "browserVersion"; + @SerializedName(SERIALIZED_NAME_BROWSER_VERSION) + @javax.annotation.Nonnull + private String browserVersion; + + public static final String SERIALIZED_NAME_OS_NAME = "osName"; + @SerializedName(SERIALIZED_NAME_OS_NAME) + @javax.annotation.Nonnull + private String osName; + + public static final String SERIALIZED_NAME_OS_VERSION = "osVersion"; + @SerializedName(SERIALIZED_NAME_OS_VERSION) + @javax.annotation.Nonnull + private String osVersion; + + public ParsedDeviceInfo() { + } + + public ParsedDeviceInfo browserName(@javax.annotation.Nonnull String browserName) { + this.browserName = browserName; + return this; + } + + /** + * Get browserName + * @return browserName + */ + @javax.annotation.Nonnull + public String getBrowserName() { + return browserName; + } + + public void setBrowserName(@javax.annotation.Nonnull String browserName) { + this.browserName = browserName; + } + + + public ParsedDeviceInfo browserVersion(@javax.annotation.Nonnull String browserVersion) { + this.browserVersion = browserVersion; + return this; + } + + /** + * Get browserVersion + * @return browserVersion + */ + @javax.annotation.Nonnull + public String getBrowserVersion() { + return browserVersion; + } + + public void setBrowserVersion(@javax.annotation.Nonnull String browserVersion) { + this.browserVersion = browserVersion; + } + + + public ParsedDeviceInfo osName(@javax.annotation.Nonnull String osName) { + this.osName = osName; + return this; + } + + /** + * Get osName + * @return osName + */ + @javax.annotation.Nonnull + public String getOsName() { + return osName; + } + + public void setOsName(@javax.annotation.Nonnull String osName) { + this.osName = osName; + } + + + public ParsedDeviceInfo osVersion(@javax.annotation.Nonnull String osVersion) { + this.osVersion = osVersion; + return this; + } + + /** + * Get osVersion + * @return osVersion + */ + @javax.annotation.Nonnull + public String getOsVersion() { + return osVersion; + } + + public void setOsVersion(@javax.annotation.Nonnull String osVersion) { + this.osVersion = osVersion; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ParsedDeviceInfo parsedDeviceInfo = (ParsedDeviceInfo) o; + return Objects.equals(this.browserName, parsedDeviceInfo.browserName) && + Objects.equals(this.browserVersion, parsedDeviceInfo.browserVersion) && + Objects.equals(this.osName, parsedDeviceInfo.osName) && + Objects.equals(this.osVersion, parsedDeviceInfo.osVersion); + } + + @Override + public int hashCode() { + return Objects.hash(browserName, browserVersion, osName, osVersion); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ParsedDeviceInfo {\n"); + sb.append(" browserName: ").append(toIndentedString(browserName)).append("\n"); + sb.append(" browserVersion: ").append(toIndentedString(browserVersion)).append("\n"); + sb.append(" osName: ").append(toIndentedString(osName)).append("\n"); + sb.append(" osVersion: ").append(toIndentedString(osVersion)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("browserName"); + openapiFields.add("browserVersion"); + openapiFields.add("osName"); + openapiFields.add("osVersion"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("browserName"); + openapiRequiredFields.add("browserVersion"); + openapiRequiredFields.add("osName"); + openapiRequiredFields.add("osVersion"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ParsedDeviceInfo + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ParsedDeviceInfo.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ParsedDeviceInfo is not found in the empty JSON string", ParsedDeviceInfo.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ParsedDeviceInfo.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ParsedDeviceInfo` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ParsedDeviceInfo.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("browserName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `browserName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("browserName").toString())); + } + if (!jsonObj.get("browserVersion").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `browserVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("browserVersion").toString())); + } + if (!jsonObj.get("osName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `osName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("osName").toString())); + } + if (!jsonObj.get("osVersion").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `osVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("osVersion").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ParsedDeviceInfo.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ParsedDeviceInfo' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ParsedDeviceInfo.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ParsedDeviceInfo value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ParsedDeviceInfo read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ParsedDeviceInfo given an JSON string + * + * @param jsonString JSON string + * @return An instance of ParsedDeviceInfo + * @throws IOException if the JSON string is invalid with respect to ParsedDeviceInfo + */ + public static ParsedDeviceInfo fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ParsedDeviceInfo.class); + } + + /** + * Convert an instance of ParsedDeviceInfo to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/corbado/generated/model/PasskeyAppendFinishReq.java b/src/main/java/com/corbado/generated/model/PasskeyAppendFinishReq.java index 23e4f28..3b89f62 100644 --- a/src/main/java/com/corbado/generated/model/PasskeyAppendFinishReq.java +++ b/src/main/java/com/corbado/generated/model/PasskeyAppendFinishReq.java @@ -49,7 +49,7 @@ /** * PasskeyAppendFinishReq */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-02-08T15:52:19.373962904Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class PasskeyAppendFinishReq { public static final String SERIALIZED_NAME_USER_I_D = "userID"; @SerializedName(SERIALIZED_NAME_USER_I_D) diff --git a/src/main/java/com/corbado/generated/model/PasskeyAppendFinishRsp.java b/src/main/java/com/corbado/generated/model/PasskeyAppendFinishRsp.java index 2eaa508..28c71f9 100644 --- a/src/main/java/com/corbado/generated/model/PasskeyAppendFinishRsp.java +++ b/src/main/java/com/corbado/generated/model/PasskeyAppendFinishRsp.java @@ -49,7 +49,7 @@ /** * PasskeyAppendFinishRsp */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-02-08T15:52:19.373962904Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class PasskeyAppendFinishRsp { public static final String SERIALIZED_NAME_PASSKEY_DATA = "passkeyData"; @SerializedName(SERIALIZED_NAME_PASSKEY_DATA) diff --git a/src/main/java/com/corbado/generated/model/PasskeyAppendStartReq.java b/src/main/java/com/corbado/generated/model/PasskeyAppendStartReq.java index 14f6875..b837ae3 100644 --- a/src/main/java/com/corbado/generated/model/PasskeyAppendStartReq.java +++ b/src/main/java/com/corbado/generated/model/PasskeyAppendStartReq.java @@ -50,7 +50,7 @@ /** * PasskeyAppendStartReq */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-02-08T15:52:19.373962904Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class PasskeyAppendStartReq { public static final String SERIALIZED_NAME_USER_I_D = "userID"; @SerializedName(SERIALIZED_NAME_USER_I_D) diff --git a/src/main/java/com/corbado/generated/model/PasskeyAppendStartRsp.java b/src/main/java/com/corbado/generated/model/PasskeyAppendStartRsp.java index 3d5e9c2..cc95594 100644 --- a/src/main/java/com/corbado/generated/model/PasskeyAppendStartRsp.java +++ b/src/main/java/com/corbado/generated/model/PasskeyAppendStartRsp.java @@ -14,17 +14,15 @@ package com.corbado.generated.model; import java.util.Objects; -import com.corbado.generated.model.DecisionTag; -import com.corbado.generated.model.DetectionTag; +import com.corbado.generated.model.DecisionInsights; +import com.corbado.generated.model.DetectionInsights; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.util.ArrayList; import java.util.Arrays; -import java.util.List; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -52,32 +50,27 @@ /** * PasskeyAppendStartRsp */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-02-08T15:52:19.373962904Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class PasskeyAppendStartRsp { public static final String SERIALIZED_NAME_APPEND_ALLOW = "appendAllow"; @SerializedName(SERIALIZED_NAME_APPEND_ALLOW) @javax.annotation.Nonnull private Boolean appendAllow; - public static final String SERIALIZED_NAME_DETECTION_TAGS = "detectionTags"; - @SerializedName(SERIALIZED_NAME_DETECTION_TAGS) + public static final String SERIALIZED_NAME_ATTESTATION_OPTIONS = "attestationOptions"; + @SerializedName(SERIALIZED_NAME_ATTESTATION_OPTIONS) @javax.annotation.Nonnull - private List detectionTags = new ArrayList<>(); + private String attestationOptions; - public static final String SERIALIZED_NAME_DECISION_TAG = "decisionTag"; - @SerializedName(SERIALIZED_NAME_DECISION_TAG) + public static final String SERIALIZED_NAME_DETECTION_INSIGHTS = "detectionInsights"; + @SerializedName(SERIALIZED_NAME_DETECTION_INSIGHTS) @javax.annotation.Nonnull - private DecisionTag decisionTag; + private DetectionInsights detectionInsights; - public static final String SERIALIZED_NAME_CREDENTIAL_COUNT = "credentialCount"; - @SerializedName(SERIALIZED_NAME_CREDENTIAL_COUNT) + public static final String SERIALIZED_NAME_DECISION_INSIGHTS = "decisionInsights"; + @SerializedName(SERIALIZED_NAME_DECISION_INSIGHTS) @javax.annotation.Nonnull - private Integer credentialCount; - - public static final String SERIALIZED_NAME_ATTESTATION_OPTIONS = "attestationOptions"; - @SerializedName(SERIALIZED_NAME_ATTESTATION_OPTIONS) - @javax.annotation.Nonnull - private String attestationOptions; + private DecisionInsights decisionInsights; public PasskeyAppendStartRsp() { } @@ -101,87 +94,60 @@ public void setAppendAllow(@javax.annotation.Nonnull Boolean appendAllow) { } - public PasskeyAppendStartRsp detectionTags(@javax.annotation.Nonnull List detectionTags) { - this.detectionTags = detectionTags; - return this; - } - - public PasskeyAppendStartRsp addDetectionTagsItem(DetectionTag detectionTagsItem) { - if (this.detectionTags == null) { - this.detectionTags = new ArrayList<>(); - } - this.detectionTags.add(detectionTagsItem); - return this; - } - - /** - * Get detectionTags - * @return detectionTags - */ - @javax.annotation.Nonnull - public List getDetectionTags() { - return detectionTags; - } - - public void setDetectionTags(@javax.annotation.Nonnull List detectionTags) { - this.detectionTags = detectionTags; - } - - - public PasskeyAppendStartRsp decisionTag(@javax.annotation.Nonnull DecisionTag decisionTag) { - this.decisionTag = decisionTag; + public PasskeyAppendStartRsp attestationOptions(@javax.annotation.Nonnull String attestationOptions) { + this.attestationOptions = attestationOptions; return this; } /** - * Get decisionTag - * @return decisionTag + * Get attestationOptions + * @return attestationOptions */ @javax.annotation.Nonnull - public DecisionTag getDecisionTag() { - return decisionTag; + public String getAttestationOptions() { + return attestationOptions; } - public void setDecisionTag(@javax.annotation.Nonnull DecisionTag decisionTag) { - this.decisionTag = decisionTag; + public void setAttestationOptions(@javax.annotation.Nonnull String attestationOptions) { + this.attestationOptions = attestationOptions; } - public PasskeyAppendStartRsp credentialCount(@javax.annotation.Nonnull Integer credentialCount) { - this.credentialCount = credentialCount; + public PasskeyAppendStartRsp detectionInsights(@javax.annotation.Nonnull DetectionInsights detectionInsights) { + this.detectionInsights = detectionInsights; return this; } /** - * Get credentialCount - * @return credentialCount + * Get detectionInsights + * @return detectionInsights */ @javax.annotation.Nonnull - public Integer getCredentialCount() { - return credentialCount; + public DetectionInsights getDetectionInsights() { + return detectionInsights; } - public void setCredentialCount(@javax.annotation.Nonnull Integer credentialCount) { - this.credentialCount = credentialCount; + public void setDetectionInsights(@javax.annotation.Nonnull DetectionInsights detectionInsights) { + this.detectionInsights = detectionInsights; } - public PasskeyAppendStartRsp attestationOptions(@javax.annotation.Nonnull String attestationOptions) { - this.attestationOptions = attestationOptions; + public PasskeyAppendStartRsp decisionInsights(@javax.annotation.Nonnull DecisionInsights decisionInsights) { + this.decisionInsights = decisionInsights; return this; } /** - * Get attestationOptions - * @return attestationOptions + * Get decisionInsights + * @return decisionInsights */ @javax.annotation.Nonnull - public String getAttestationOptions() { - return attestationOptions; + public DecisionInsights getDecisionInsights() { + return decisionInsights; } - public void setAttestationOptions(@javax.annotation.Nonnull String attestationOptions) { - this.attestationOptions = attestationOptions; + public void setDecisionInsights(@javax.annotation.Nonnull DecisionInsights decisionInsights) { + this.decisionInsights = decisionInsights; } @@ -196,15 +162,14 @@ public boolean equals(Object o) { } PasskeyAppendStartRsp passkeyAppendStartRsp = (PasskeyAppendStartRsp) o; return Objects.equals(this.appendAllow, passkeyAppendStartRsp.appendAllow) && - Objects.equals(this.detectionTags, passkeyAppendStartRsp.detectionTags) && - Objects.equals(this.decisionTag, passkeyAppendStartRsp.decisionTag) && - Objects.equals(this.credentialCount, passkeyAppendStartRsp.credentialCount) && - Objects.equals(this.attestationOptions, passkeyAppendStartRsp.attestationOptions); + Objects.equals(this.attestationOptions, passkeyAppendStartRsp.attestationOptions) && + Objects.equals(this.detectionInsights, passkeyAppendStartRsp.detectionInsights) && + Objects.equals(this.decisionInsights, passkeyAppendStartRsp.decisionInsights); } @Override public int hashCode() { - return Objects.hash(appendAllow, detectionTags, decisionTag, credentialCount, attestationOptions); + return Objects.hash(appendAllow, attestationOptions, detectionInsights, decisionInsights); } @Override @@ -212,10 +177,9 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class PasskeyAppendStartRsp {\n"); sb.append(" appendAllow: ").append(toIndentedString(appendAllow)).append("\n"); - sb.append(" detectionTags: ").append(toIndentedString(detectionTags)).append("\n"); - sb.append(" decisionTag: ").append(toIndentedString(decisionTag)).append("\n"); - sb.append(" credentialCount: ").append(toIndentedString(credentialCount)).append("\n"); sb.append(" attestationOptions: ").append(toIndentedString(attestationOptions)).append("\n"); + sb.append(" detectionInsights: ").append(toIndentedString(detectionInsights)).append("\n"); + sb.append(" decisionInsights: ").append(toIndentedString(decisionInsights)).append("\n"); sb.append("}"); return sb.toString(); } @@ -239,18 +203,16 @@ private String toIndentedString(Object o) { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); openapiFields.add("appendAllow"); - openapiFields.add("detectionTags"); - openapiFields.add("decisionTag"); - openapiFields.add("credentialCount"); openapiFields.add("attestationOptions"); + openapiFields.add("detectionInsights"); + openapiFields.add("decisionInsights"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); openapiRequiredFields.add("appendAllow"); - openapiRequiredFields.add("detectionTags"); - openapiRequiredFields.add("decisionTag"); - openapiRequiredFields.add("credentialCount"); openapiRequiredFields.add("attestationOptions"); + openapiRequiredFields.add("detectionInsights"); + openapiRequiredFields.add("decisionInsights"); } /** @@ -281,21 +243,13 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); - // ensure the json data is an array - if (!jsonObj.get("detectionTags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `detectionTags` to be an array in the JSON string but got `%s`", jsonObj.get("detectionTags").toString())); - } - - JsonArray jsonArraydetectionTags = jsonObj.getAsJsonArray("detectionTags"); - // validate the required field `detectionTags` (array) - for (int i = 0; i < jsonArraydetectionTags.size(); i++) { - DetectionTag.validateJsonElement(jsonArraydetectionTags.get(i)); - }; - // validate the required field `decisionTag` - DecisionTag.validateJsonElement(jsonObj.get("decisionTag")); if (!jsonObj.get("attestationOptions").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `attestationOptions` to be a primitive type in the JSON string but got `%s`", jsonObj.get("attestationOptions").toString())); } + // validate the required field `detectionInsights` + DetectionInsights.validateJsonElement(jsonObj.get("detectionInsights")); + // validate the required field `decisionInsights` + DecisionInsights.validateJsonElement(jsonObj.get("decisionInsights")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/com/corbado/generated/model/PasskeyChallenge.java b/src/main/java/com/corbado/generated/model/PasskeyChallenge.java index 83e7bf3..afabd46 100644 --- a/src/main/java/com/corbado/generated/model/PasskeyChallenge.java +++ b/src/main/java/com/corbado/generated/model/PasskeyChallenge.java @@ -50,7 +50,7 @@ /** * PasskeyChallenge */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-02-08T15:52:19.373962904Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class PasskeyChallenge { public static final String SERIALIZED_NAME_CHALLENGE_I_D = "challengeID"; @SerializedName(SERIALIZED_NAME_CHALLENGE_I_D) @@ -77,6 +77,11 @@ public class PasskeyChallenge { @javax.annotation.Nonnull private Long created; + public static final String SERIALIZED_NAME_CREATED_MS = "createdMs"; + @SerializedName(SERIALIZED_NAME_CREATED_MS) + @javax.annotation.Nonnull + private Long createdMs; + public static final String SERIALIZED_NAME_EXPIRES = "expires"; @SerializedName(SERIALIZED_NAME_EXPIRES) @javax.annotation.Nonnull @@ -180,6 +185,25 @@ public void setCreated(@javax.annotation.Nonnull Long created) { } + public PasskeyChallenge createdMs(@javax.annotation.Nonnull Long createdMs) { + this.createdMs = createdMs; + return this; + } + + /** + * Get createdMs + * @return createdMs + */ + @javax.annotation.Nonnull + public Long getCreatedMs() { + return createdMs; + } + + public void setCreatedMs(@javax.annotation.Nonnull Long createdMs) { + this.createdMs = createdMs; + } + + public PasskeyChallenge expires(@javax.annotation.Nonnull Long expires) { this.expires = expires; return this; @@ -214,12 +238,13 @@ public boolean equals(Object o) { Objects.equals(this.value, passkeyChallenge.value) && Objects.equals(this.status, passkeyChallenge.status) && Objects.equals(this.created, passkeyChallenge.created) && + Objects.equals(this.createdMs, passkeyChallenge.createdMs) && Objects.equals(this.expires, passkeyChallenge.expires); } @Override public int hashCode() { - return Objects.hash(challengeID, type, value, status, created, expires); + return Objects.hash(challengeID, type, value, status, created, createdMs, expires); } @Override @@ -231,6 +256,7 @@ public String toString() { sb.append(" value: ").append(toIndentedString(value)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append(" created: ").append(toIndentedString(created)).append("\n"); + sb.append(" createdMs: ").append(toIndentedString(createdMs)).append("\n"); sb.append(" expires: ").append(toIndentedString(expires)).append("\n"); sb.append("}"); return sb.toString(); @@ -259,6 +285,7 @@ private String toIndentedString(Object o) { openapiFields.add("value"); openapiFields.add("status"); openapiFields.add("created"); + openapiFields.add("createdMs"); openapiFields.add("expires"); // a set of required properties/fields (JSON key names) @@ -268,6 +295,7 @@ private String toIndentedString(Object o) { openapiRequiredFields.add("value"); openapiRequiredFields.add("status"); openapiRequiredFields.add("created"); + openapiRequiredFields.add("createdMs"); openapiRequiredFields.add("expires"); } diff --git a/src/main/java/com/corbado/generated/model/PasskeyChallengeList.java b/src/main/java/com/corbado/generated/model/PasskeyChallengeList.java index 24b183a..61f67d8 100644 --- a/src/main/java/com/corbado/generated/model/PasskeyChallengeList.java +++ b/src/main/java/com/corbado/generated/model/PasskeyChallengeList.java @@ -52,7 +52,7 @@ /** * PasskeyChallengeList */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-02-08T15:52:19.373962904Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class PasskeyChallengeList { public static final String SERIALIZED_NAME_PASSKEY_CHALLENGES = "passkeyChallenges"; @SerializedName(SERIALIZED_NAME_PASSKEY_CHALLENGES) diff --git a/src/main/java/com/corbado/generated/model/PasskeyChallengeUpdateReq.java b/src/main/java/com/corbado/generated/model/PasskeyChallengeUpdateReq.java index 35b6f5c..b586c18 100644 --- a/src/main/java/com/corbado/generated/model/PasskeyChallengeUpdateReq.java +++ b/src/main/java/com/corbado/generated/model/PasskeyChallengeUpdateReq.java @@ -49,7 +49,7 @@ /** * PasskeyChallengeUpdateReq */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-02-08T15:52:19.373962904Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class PasskeyChallengeUpdateReq { public static final String SERIALIZED_NAME_STATUS = "status"; @SerializedName(SERIALIZED_NAME_STATUS) diff --git a/src/main/java/com/corbado/generated/model/PasskeyData.java b/src/main/java/com/corbado/generated/model/PasskeyData.java index fbd66b3..91b7ef6 100644 --- a/src/main/java/com/corbado/generated/model/PasskeyData.java +++ b/src/main/java/com/corbado/generated/model/PasskeyData.java @@ -49,7 +49,7 @@ /** * PasskeyData */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-02-08T15:52:19.373962904Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class PasskeyData { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) diff --git a/src/main/java/com/corbado/generated/model/PasskeyEvent.java b/src/main/java/com/corbado/generated/model/PasskeyEvent.java index 31d08f9..0bbd233 100644 --- a/src/main/java/com/corbado/generated/model/PasskeyEvent.java +++ b/src/main/java/com/corbado/generated/model/PasskeyEvent.java @@ -49,7 +49,7 @@ /** * PasskeyEvent */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-02-08T15:52:19.373962904Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class PasskeyEvent { public static final String SERIALIZED_NAME_PASSKEY_EVENT_I_D = "passkeyEventID"; @SerializedName(SERIALIZED_NAME_PASSKEY_EVENT_I_D) @@ -91,6 +91,11 @@ public class PasskeyEvent { @javax.annotation.Nonnull private String created; + public static final String SERIALIZED_NAME_CREATED_MS = "createdMs"; + @SerializedName(SERIALIZED_NAME_CREATED_MS) + @javax.annotation.Nonnull + private Long createdMs; + public PasskeyEvent() { } @@ -246,6 +251,25 @@ public void setCreated(@javax.annotation.Nonnull String created) { } + public PasskeyEvent createdMs(@javax.annotation.Nonnull Long createdMs) { + this.createdMs = createdMs; + return this; + } + + /** + * Get createdMs + * @return createdMs + */ + @javax.annotation.Nonnull + public Long getCreatedMs() { + return createdMs; + } + + public void setCreatedMs(@javax.annotation.Nonnull Long createdMs) { + this.createdMs = createdMs; + } + + @Override public boolean equals(Object o) { @@ -263,12 +287,13 @@ public boolean equals(Object o) { Objects.equals(this.processID, passkeyEvent.processID) && Objects.equals(this.credentialID, passkeyEvent.credentialID) && Objects.equals(this.expires, passkeyEvent.expires) && - Objects.equals(this.created, passkeyEvent.created); + Objects.equals(this.created, passkeyEvent.created) && + Objects.equals(this.createdMs, passkeyEvent.createdMs); } @Override public int hashCode() { - return Objects.hash(passkeyEventID, userID, eventType, clientEnvID, processID, credentialID, expires, created); + return Objects.hash(passkeyEventID, userID, eventType, clientEnvID, processID, credentialID, expires, created, createdMs); } @Override @@ -283,6 +308,7 @@ public String toString() { sb.append(" credentialID: ").append(toIndentedString(credentialID)).append("\n"); sb.append(" expires: ").append(toIndentedString(expires)).append("\n"); sb.append(" created: ").append(toIndentedString(created)).append("\n"); + sb.append(" createdMs: ").append(toIndentedString(createdMs)).append("\n"); sb.append("}"); return sb.toString(); } @@ -313,6 +339,7 @@ private String toIndentedString(Object o) { openapiFields.add("credentialID"); openapiFields.add("expires"); openapiFields.add("created"); + openapiFields.add("createdMs"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -320,6 +347,7 @@ private String toIndentedString(Object o) { openapiRequiredFields.add("userID"); openapiRequiredFields.add("eventType"); openapiRequiredFields.add("created"); + openapiRequiredFields.add("createdMs"); } /** diff --git a/src/main/java/com/corbado/generated/model/PasskeyEventCreateReq.java b/src/main/java/com/corbado/generated/model/PasskeyEventCreateReq.java index a2dcb34..879504f 100644 --- a/src/main/java/com/corbado/generated/model/PasskeyEventCreateReq.java +++ b/src/main/java/com/corbado/generated/model/PasskeyEventCreateReq.java @@ -49,7 +49,7 @@ /** * PasskeyEventCreateReq */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-02-08T15:52:19.373962904Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class PasskeyEventCreateReq { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) diff --git a/src/main/java/com/corbado/generated/model/PasskeyEventList.java b/src/main/java/com/corbado/generated/model/PasskeyEventList.java index d39811f..e4cec1e 100644 --- a/src/main/java/com/corbado/generated/model/PasskeyEventList.java +++ b/src/main/java/com/corbado/generated/model/PasskeyEventList.java @@ -52,7 +52,7 @@ /** * PasskeyEventList */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-02-08T15:52:19.373962904Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class PasskeyEventList { public static final String SERIALIZED_NAME_PASSKEY_EVENTS = "passkeyEvents"; @SerializedName(SERIALIZED_NAME_PASSKEY_EVENTS) diff --git a/src/main/java/com/corbado/generated/model/PasskeyIntelFlags.java b/src/main/java/com/corbado/generated/model/PasskeyIntelFlags.java index af5714a..416999e 100644 --- a/src/main/java/com/corbado/generated/model/PasskeyIntelFlags.java +++ b/src/main/java/com/corbado/generated/model/PasskeyIntelFlags.java @@ -48,7 +48,7 @@ /** * PasskeyIntelFlags */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-02-08T15:52:19.373962904Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class PasskeyIntelFlags { public static final String SERIALIZED_NAME_FORCE_PASSKEY_APPEND = "forcePasskeyAppend"; @SerializedName(SERIALIZED_NAME_FORCE_PASSKEY_APPEND) diff --git a/src/main/java/com/corbado/generated/model/PasskeyLoginFinishReq.java b/src/main/java/com/corbado/generated/model/PasskeyLoginFinishReq.java index 084d465..585c0fa 100644 --- a/src/main/java/com/corbado/generated/model/PasskeyLoginFinishReq.java +++ b/src/main/java/com/corbado/generated/model/PasskeyLoginFinishReq.java @@ -49,7 +49,7 @@ /** * PasskeyLoginFinishReq */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-02-08T15:52:19.373962904Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class PasskeyLoginFinishReq { public static final String SERIALIZED_NAME_USER_I_D = "userID"; @SerializedName(SERIALIZED_NAME_USER_I_D) @@ -71,6 +71,11 @@ public class PasskeyLoginFinishReq { @javax.annotation.Nonnull private String processID; + public static final String SERIALIZED_NAME_SIGN_PASSKEY_DATA = "signPasskeyData"; + @SerializedName(SERIALIZED_NAME_SIGN_PASSKEY_DATA) + @javax.annotation.Nullable + private Boolean signPasskeyData; + public PasskeyLoginFinishReq() { } @@ -150,6 +155,25 @@ public void setProcessID(@javax.annotation.Nonnull String processID) { } + public PasskeyLoginFinishReq signPasskeyData(@javax.annotation.Nullable Boolean signPasskeyData) { + this.signPasskeyData = signPasskeyData; + return this; + } + + /** + * Get signPasskeyData + * @return signPasskeyData + */ + @javax.annotation.Nullable + public Boolean getSignPasskeyData() { + return signPasskeyData; + } + + public void setSignPasskeyData(@javax.annotation.Nullable Boolean signPasskeyData) { + this.signPasskeyData = signPasskeyData; + } + + @Override public boolean equals(Object o) { @@ -163,12 +187,13 @@ public boolean equals(Object o) { return Objects.equals(this.userID, passkeyLoginFinishReq.userID) && Objects.equals(this.assertionResponse, passkeyLoginFinishReq.assertionResponse) && Objects.equals(this.clientInformation, passkeyLoginFinishReq.clientInformation) && - Objects.equals(this.processID, passkeyLoginFinishReq.processID); + Objects.equals(this.processID, passkeyLoginFinishReq.processID) && + Objects.equals(this.signPasskeyData, passkeyLoginFinishReq.signPasskeyData); } @Override public int hashCode() { - return Objects.hash(userID, assertionResponse, clientInformation, processID); + return Objects.hash(userID, assertionResponse, clientInformation, processID, signPasskeyData); } @Override @@ -179,6 +204,7 @@ public String toString() { sb.append(" assertionResponse: ").append(toIndentedString(assertionResponse)).append("\n"); sb.append(" clientInformation: ").append(toIndentedString(clientInformation)).append("\n"); sb.append(" processID: ").append(toIndentedString(processID)).append("\n"); + sb.append(" signPasskeyData: ").append(toIndentedString(signPasskeyData)).append("\n"); sb.append("}"); return sb.toString(); } @@ -205,6 +231,7 @@ private String toIndentedString(Object o) { openapiFields.add("assertionResponse"); openapiFields.add("clientInformation"); openapiFields.add("processID"); + openapiFields.add("signPasskeyData"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); diff --git a/src/main/java/com/corbado/generated/model/PasskeyLoginFinishRsp.java b/src/main/java/com/corbado/generated/model/PasskeyLoginFinishRsp.java index dac5e7e..35e64f4 100644 --- a/src/main/java/com/corbado/generated/model/PasskeyLoginFinishRsp.java +++ b/src/main/java/com/corbado/generated/model/PasskeyLoginFinishRsp.java @@ -49,13 +49,18 @@ /** * PasskeyLoginFinishRsp */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-02-08T15:52:19.373962904Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class PasskeyLoginFinishRsp { public static final String SERIALIZED_NAME_PASSKEY_DATA = "passkeyData"; @SerializedName(SERIALIZED_NAME_PASSKEY_DATA) @javax.annotation.Nonnull private PasskeyData passkeyData; + public static final String SERIALIZED_NAME_SIGNED_PASSKEY_DATA = "signedPasskeyData"; + @SerializedName(SERIALIZED_NAME_SIGNED_PASSKEY_DATA) + @javax.annotation.Nullable + private String signedPasskeyData; + public PasskeyLoginFinishRsp() { } @@ -78,6 +83,25 @@ public void setPasskeyData(@javax.annotation.Nonnull PasskeyData passkeyData) { } + public PasskeyLoginFinishRsp signedPasskeyData(@javax.annotation.Nullable String signedPasskeyData) { + this.signedPasskeyData = signedPasskeyData; + return this; + } + + /** + * Get signedPasskeyData + * @return signedPasskeyData + */ + @javax.annotation.Nullable + public String getSignedPasskeyData() { + return signedPasskeyData; + } + + public void setSignedPasskeyData(@javax.annotation.Nullable String signedPasskeyData) { + this.signedPasskeyData = signedPasskeyData; + } + + @Override public boolean equals(Object o) { @@ -88,12 +112,13 @@ public boolean equals(Object o) { return false; } PasskeyLoginFinishRsp passkeyLoginFinishRsp = (PasskeyLoginFinishRsp) o; - return Objects.equals(this.passkeyData, passkeyLoginFinishRsp.passkeyData); + return Objects.equals(this.passkeyData, passkeyLoginFinishRsp.passkeyData) && + Objects.equals(this.signedPasskeyData, passkeyLoginFinishRsp.signedPasskeyData); } @Override public int hashCode() { - return Objects.hash(passkeyData); + return Objects.hash(passkeyData, signedPasskeyData); } @Override @@ -101,6 +126,7 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class PasskeyLoginFinishRsp {\n"); sb.append(" passkeyData: ").append(toIndentedString(passkeyData)).append("\n"); + sb.append(" signedPasskeyData: ").append(toIndentedString(signedPasskeyData)).append("\n"); sb.append("}"); return sb.toString(); } @@ -124,6 +150,7 @@ private String toIndentedString(Object o) { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); openapiFields.add("passkeyData"); + openapiFields.add("signedPasskeyData"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -160,6 +187,9 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the required field `passkeyData` PasskeyData.validateJsonElement(jsonObj.get("passkeyData")); + if ((jsonObj.get("signedPasskeyData") != null && !jsonObj.get("signedPasskeyData").isJsonNull()) && !jsonObj.get("signedPasskeyData").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `signedPasskeyData` to be a primitive type in the JSON string but got `%s`", jsonObj.get("signedPasskeyData").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/com/corbado/generated/model/PasskeyLoginStartReq.java b/src/main/java/com/corbado/generated/model/PasskeyLoginStartReq.java index 47db659..6e0746f 100644 --- a/src/main/java/com/corbado/generated/model/PasskeyLoginStartReq.java +++ b/src/main/java/com/corbado/generated/model/PasskeyLoginStartReq.java @@ -50,7 +50,7 @@ /** * PasskeyLoginStartReq */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-02-08T15:52:19.373962904Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class PasskeyLoginStartReq { public static final String SERIALIZED_NAME_USER_I_D = "userID"; @SerializedName(SERIALIZED_NAME_USER_I_D) diff --git a/src/main/java/com/corbado/generated/model/PasskeyLoginStartRsp.java b/src/main/java/com/corbado/generated/model/PasskeyLoginStartRsp.java index 4853c53..5d64c36 100644 --- a/src/main/java/com/corbado/generated/model/PasskeyLoginStartRsp.java +++ b/src/main/java/com/corbado/generated/model/PasskeyLoginStartRsp.java @@ -14,17 +14,15 @@ package com.corbado.generated.model; import java.util.Objects; -import com.corbado.generated.model.DecisionTag; -import com.corbado.generated.model.DetectionTag; +import com.corbado.generated.model.DecisionInsights; +import com.corbado.generated.model.DetectionInsights; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.util.ArrayList; import java.util.Arrays; -import java.util.List; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -52,37 +50,27 @@ /** * PasskeyLoginStartRsp */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-02-08T15:52:19.373962904Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class PasskeyLoginStartRsp { public static final String SERIALIZED_NAME_LOGIN_ALLOW = "loginAllow"; @SerializedName(SERIALIZED_NAME_LOGIN_ALLOW) @javax.annotation.Nonnull private Boolean loginAllow; - public static final String SERIALIZED_NAME_DETECTION_TAGS = "detectionTags"; - @SerializedName(SERIALIZED_NAME_DETECTION_TAGS) - @javax.annotation.Nonnull - private List detectionTags = new ArrayList<>(); - - public static final String SERIALIZED_NAME_DECISION_TAG = "decisionTag"; - @SerializedName(SERIALIZED_NAME_DECISION_TAG) - @javax.annotation.Nonnull - private DecisionTag decisionTag; - - public static final String SERIALIZED_NAME_CREDENTIAL_COUNT = "credentialCount"; - @SerializedName(SERIALIZED_NAME_CREDENTIAL_COUNT) - @javax.annotation.Nonnull - private Integer credentialCount; - public static final String SERIALIZED_NAME_ASSERTION_OPTIONS = "assertionOptions"; @SerializedName(SERIALIZED_NAME_ASSERTION_OPTIONS) @javax.annotation.Nonnull private String assertionOptions; - public static final String SERIALIZED_NAME_IS_C_D_A_CANDIDATE = "isCDACandidate"; - @SerializedName(SERIALIZED_NAME_IS_C_D_A_CANDIDATE) + public static final String SERIALIZED_NAME_DETECTION_INSIGHTS = "detectionInsights"; + @SerializedName(SERIALIZED_NAME_DETECTION_INSIGHTS) @javax.annotation.Nonnull - private Boolean isCDACandidate; + private DetectionInsights detectionInsights; + + public static final String SERIALIZED_NAME_DECISION_INSIGHTS = "decisionInsights"; + @SerializedName(SERIALIZED_NAME_DECISION_INSIGHTS) + @javax.annotation.Nonnull + private DecisionInsights decisionInsights; public PasskeyLoginStartRsp() { } @@ -106,106 +94,60 @@ public void setLoginAllow(@javax.annotation.Nonnull Boolean loginAllow) { } - public PasskeyLoginStartRsp detectionTags(@javax.annotation.Nonnull List detectionTags) { - this.detectionTags = detectionTags; - return this; - } - - public PasskeyLoginStartRsp addDetectionTagsItem(DetectionTag detectionTagsItem) { - if (this.detectionTags == null) { - this.detectionTags = new ArrayList<>(); - } - this.detectionTags.add(detectionTagsItem); - return this; - } - - /** - * Get detectionTags - * @return detectionTags - */ - @javax.annotation.Nonnull - public List getDetectionTags() { - return detectionTags; - } - - public void setDetectionTags(@javax.annotation.Nonnull List detectionTags) { - this.detectionTags = detectionTags; - } - - - public PasskeyLoginStartRsp decisionTag(@javax.annotation.Nonnull DecisionTag decisionTag) { - this.decisionTag = decisionTag; - return this; - } - - /** - * Get decisionTag - * @return decisionTag - */ - @javax.annotation.Nonnull - public DecisionTag getDecisionTag() { - return decisionTag; - } - - public void setDecisionTag(@javax.annotation.Nonnull DecisionTag decisionTag) { - this.decisionTag = decisionTag; - } - - - public PasskeyLoginStartRsp credentialCount(@javax.annotation.Nonnull Integer credentialCount) { - this.credentialCount = credentialCount; + public PasskeyLoginStartRsp assertionOptions(@javax.annotation.Nonnull String assertionOptions) { + this.assertionOptions = assertionOptions; return this; } /** - * Get credentialCount - * @return credentialCount + * Get assertionOptions + * @return assertionOptions */ @javax.annotation.Nonnull - public Integer getCredentialCount() { - return credentialCount; + public String getAssertionOptions() { + return assertionOptions; } - public void setCredentialCount(@javax.annotation.Nonnull Integer credentialCount) { - this.credentialCount = credentialCount; + public void setAssertionOptions(@javax.annotation.Nonnull String assertionOptions) { + this.assertionOptions = assertionOptions; } - public PasskeyLoginStartRsp assertionOptions(@javax.annotation.Nonnull String assertionOptions) { - this.assertionOptions = assertionOptions; + public PasskeyLoginStartRsp detectionInsights(@javax.annotation.Nonnull DetectionInsights detectionInsights) { + this.detectionInsights = detectionInsights; return this; } /** - * Get assertionOptions - * @return assertionOptions + * Get detectionInsights + * @return detectionInsights */ @javax.annotation.Nonnull - public String getAssertionOptions() { - return assertionOptions; + public DetectionInsights getDetectionInsights() { + return detectionInsights; } - public void setAssertionOptions(@javax.annotation.Nonnull String assertionOptions) { - this.assertionOptions = assertionOptions; + public void setDetectionInsights(@javax.annotation.Nonnull DetectionInsights detectionInsights) { + this.detectionInsights = detectionInsights; } - public PasskeyLoginStartRsp isCDACandidate(@javax.annotation.Nonnull Boolean isCDACandidate) { - this.isCDACandidate = isCDACandidate; + public PasskeyLoginStartRsp decisionInsights(@javax.annotation.Nonnull DecisionInsights decisionInsights) { + this.decisionInsights = decisionInsights; return this; } /** - * Get isCDACandidate - * @return isCDACandidate + * Get decisionInsights + * @return decisionInsights */ @javax.annotation.Nonnull - public Boolean getIsCDACandidate() { - return isCDACandidate; + public DecisionInsights getDecisionInsights() { + return decisionInsights; } - public void setIsCDACandidate(@javax.annotation.Nonnull Boolean isCDACandidate) { - this.isCDACandidate = isCDACandidate; + public void setDecisionInsights(@javax.annotation.Nonnull DecisionInsights decisionInsights) { + this.decisionInsights = decisionInsights; } @@ -220,16 +162,14 @@ public boolean equals(Object o) { } PasskeyLoginStartRsp passkeyLoginStartRsp = (PasskeyLoginStartRsp) o; return Objects.equals(this.loginAllow, passkeyLoginStartRsp.loginAllow) && - Objects.equals(this.detectionTags, passkeyLoginStartRsp.detectionTags) && - Objects.equals(this.decisionTag, passkeyLoginStartRsp.decisionTag) && - Objects.equals(this.credentialCount, passkeyLoginStartRsp.credentialCount) && Objects.equals(this.assertionOptions, passkeyLoginStartRsp.assertionOptions) && - Objects.equals(this.isCDACandidate, passkeyLoginStartRsp.isCDACandidate); + Objects.equals(this.detectionInsights, passkeyLoginStartRsp.detectionInsights) && + Objects.equals(this.decisionInsights, passkeyLoginStartRsp.decisionInsights); } @Override public int hashCode() { - return Objects.hash(loginAllow, detectionTags, decisionTag, credentialCount, assertionOptions, isCDACandidate); + return Objects.hash(loginAllow, assertionOptions, detectionInsights, decisionInsights); } @Override @@ -237,11 +177,9 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class PasskeyLoginStartRsp {\n"); sb.append(" loginAllow: ").append(toIndentedString(loginAllow)).append("\n"); - sb.append(" detectionTags: ").append(toIndentedString(detectionTags)).append("\n"); - sb.append(" decisionTag: ").append(toIndentedString(decisionTag)).append("\n"); - sb.append(" credentialCount: ").append(toIndentedString(credentialCount)).append("\n"); sb.append(" assertionOptions: ").append(toIndentedString(assertionOptions)).append("\n"); - sb.append(" isCDACandidate: ").append(toIndentedString(isCDACandidate)).append("\n"); + sb.append(" detectionInsights: ").append(toIndentedString(detectionInsights)).append("\n"); + sb.append(" decisionInsights: ").append(toIndentedString(decisionInsights)).append("\n"); sb.append("}"); return sb.toString(); } @@ -265,20 +203,16 @@ private String toIndentedString(Object o) { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); openapiFields.add("loginAllow"); - openapiFields.add("detectionTags"); - openapiFields.add("decisionTag"); - openapiFields.add("credentialCount"); openapiFields.add("assertionOptions"); - openapiFields.add("isCDACandidate"); + openapiFields.add("detectionInsights"); + openapiFields.add("decisionInsights"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); openapiRequiredFields.add("loginAllow"); - openapiRequiredFields.add("detectionTags"); - openapiRequiredFields.add("decisionTag"); - openapiRequiredFields.add("credentialCount"); openapiRequiredFields.add("assertionOptions"); - openapiRequiredFields.add("isCDACandidate"); + openapiRequiredFields.add("detectionInsights"); + openapiRequiredFields.add("decisionInsights"); } /** @@ -309,21 +243,13 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); - // ensure the json data is an array - if (!jsonObj.get("detectionTags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `detectionTags` to be an array in the JSON string but got `%s`", jsonObj.get("detectionTags").toString())); - } - - JsonArray jsonArraydetectionTags = jsonObj.getAsJsonArray("detectionTags"); - // validate the required field `detectionTags` (array) - for (int i = 0; i < jsonArraydetectionTags.size(); i++) { - DetectionTag.validateJsonElement(jsonArraydetectionTags.get(i)); - }; - // validate the required field `decisionTag` - DecisionTag.validateJsonElement(jsonObj.get("decisionTag")); if (!jsonObj.get("assertionOptions").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `assertionOptions` to be a primitive type in the JSON string but got `%s`", jsonObj.get("assertionOptions").toString())); } + // validate the required field `detectionInsights` + DetectionInsights.validateJsonElement(jsonObj.get("detectionInsights")); + // validate the required field `decisionInsights` + DecisionInsights.validateJsonElement(jsonObj.get("decisionInsights")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/com/corbado/generated/model/PasskeyMediationFinishReq.java b/src/main/java/com/corbado/generated/model/PasskeyMediationFinishReq.java index c748eb1..4c6ca75 100644 --- a/src/main/java/com/corbado/generated/model/PasskeyMediationFinishReq.java +++ b/src/main/java/com/corbado/generated/model/PasskeyMediationFinishReq.java @@ -49,7 +49,7 @@ /** * PasskeyMediationFinishReq */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-02-08T15:52:19.373962904Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class PasskeyMediationFinishReq { public static final String SERIALIZED_NAME_ASSERTION_RESPONSE = "assertionResponse"; @SerializedName(SERIALIZED_NAME_ASSERTION_RESPONSE) @@ -66,6 +66,11 @@ public class PasskeyMediationFinishReq { @javax.annotation.Nonnull private String processID; + public static final String SERIALIZED_NAME_SIGN_PASSKEY_DATA = "signPasskeyData"; + @SerializedName(SERIALIZED_NAME_SIGN_PASSKEY_DATA) + @javax.annotation.Nullable + private Boolean signPasskeyData; + public PasskeyMediationFinishReq() { } @@ -126,6 +131,25 @@ public void setProcessID(@javax.annotation.Nonnull String processID) { } + public PasskeyMediationFinishReq signPasskeyData(@javax.annotation.Nullable Boolean signPasskeyData) { + this.signPasskeyData = signPasskeyData; + return this; + } + + /** + * Get signPasskeyData + * @return signPasskeyData + */ + @javax.annotation.Nullable + public Boolean getSignPasskeyData() { + return signPasskeyData; + } + + public void setSignPasskeyData(@javax.annotation.Nullable Boolean signPasskeyData) { + this.signPasskeyData = signPasskeyData; + } + + @Override public boolean equals(Object o) { @@ -138,12 +162,13 @@ public boolean equals(Object o) { PasskeyMediationFinishReq passkeyMediationFinishReq = (PasskeyMediationFinishReq) o; return Objects.equals(this.assertionResponse, passkeyMediationFinishReq.assertionResponse) && Objects.equals(this.clientInformation, passkeyMediationFinishReq.clientInformation) && - Objects.equals(this.processID, passkeyMediationFinishReq.processID); + Objects.equals(this.processID, passkeyMediationFinishReq.processID) && + Objects.equals(this.signPasskeyData, passkeyMediationFinishReq.signPasskeyData); } @Override public int hashCode() { - return Objects.hash(assertionResponse, clientInformation, processID); + return Objects.hash(assertionResponse, clientInformation, processID, signPasskeyData); } @Override @@ -153,6 +178,7 @@ public String toString() { sb.append(" assertionResponse: ").append(toIndentedString(assertionResponse)).append("\n"); sb.append(" clientInformation: ").append(toIndentedString(clientInformation)).append("\n"); sb.append(" processID: ").append(toIndentedString(processID)).append("\n"); + sb.append(" signPasskeyData: ").append(toIndentedString(signPasskeyData)).append("\n"); sb.append("}"); return sb.toString(); } @@ -178,6 +204,7 @@ private String toIndentedString(Object o) { openapiFields.add("assertionResponse"); openapiFields.add("clientInformation"); openapiFields.add("processID"); + openapiFields.add("signPasskeyData"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); diff --git a/src/main/java/com/corbado/generated/model/PasskeyMediationFinishRsp.java b/src/main/java/com/corbado/generated/model/PasskeyMediationFinishRsp.java index d42ce87..b63ef4c 100644 --- a/src/main/java/com/corbado/generated/model/PasskeyMediationFinishRsp.java +++ b/src/main/java/com/corbado/generated/model/PasskeyMediationFinishRsp.java @@ -49,13 +49,18 @@ /** * PasskeyMediationFinishRsp */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-02-08T15:52:19.373962904Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class PasskeyMediationFinishRsp { public static final String SERIALIZED_NAME_PASSKEY_DATA = "passkeyData"; @SerializedName(SERIALIZED_NAME_PASSKEY_DATA) @javax.annotation.Nonnull private PasskeyData passkeyData; + public static final String SERIALIZED_NAME_SIGNED_PASSKEY_DATA = "signedPasskeyData"; + @SerializedName(SERIALIZED_NAME_SIGNED_PASSKEY_DATA) + @javax.annotation.Nullable + private String signedPasskeyData; + public PasskeyMediationFinishRsp() { } @@ -78,6 +83,25 @@ public void setPasskeyData(@javax.annotation.Nonnull PasskeyData passkeyData) { } + public PasskeyMediationFinishRsp signedPasskeyData(@javax.annotation.Nullable String signedPasskeyData) { + this.signedPasskeyData = signedPasskeyData; + return this; + } + + /** + * Get signedPasskeyData + * @return signedPasskeyData + */ + @javax.annotation.Nullable + public String getSignedPasskeyData() { + return signedPasskeyData; + } + + public void setSignedPasskeyData(@javax.annotation.Nullable String signedPasskeyData) { + this.signedPasskeyData = signedPasskeyData; + } + + @Override public boolean equals(Object o) { @@ -88,12 +112,13 @@ public boolean equals(Object o) { return false; } PasskeyMediationFinishRsp passkeyMediationFinishRsp = (PasskeyMediationFinishRsp) o; - return Objects.equals(this.passkeyData, passkeyMediationFinishRsp.passkeyData); + return Objects.equals(this.passkeyData, passkeyMediationFinishRsp.passkeyData) && + Objects.equals(this.signedPasskeyData, passkeyMediationFinishRsp.signedPasskeyData); } @Override public int hashCode() { - return Objects.hash(passkeyData); + return Objects.hash(passkeyData, signedPasskeyData); } @Override @@ -101,6 +126,7 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class PasskeyMediationFinishRsp {\n"); sb.append(" passkeyData: ").append(toIndentedString(passkeyData)).append("\n"); + sb.append(" signedPasskeyData: ").append(toIndentedString(signedPasskeyData)).append("\n"); sb.append("}"); return sb.toString(); } @@ -124,6 +150,7 @@ private String toIndentedString(Object o) { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); openapiFields.add("passkeyData"); + openapiFields.add("signedPasskeyData"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -160,6 +187,9 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the required field `passkeyData` PasskeyData.validateJsonElement(jsonObj.get("passkeyData")); + if ((jsonObj.get("signedPasskeyData") != null && !jsonObj.get("signedPasskeyData").isJsonNull()) && !jsonObj.get("signedPasskeyData").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `signedPasskeyData` to be a primitive type in the JSON string but got `%s`", jsonObj.get("signedPasskeyData").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/com/corbado/generated/model/PasskeyMediationStartReq.java b/src/main/java/com/corbado/generated/model/PasskeyMediationStartReq.java index 8f3a5f1..55efe61 100644 --- a/src/main/java/com/corbado/generated/model/PasskeyMediationStartReq.java +++ b/src/main/java/com/corbado/generated/model/PasskeyMediationStartReq.java @@ -49,7 +49,7 @@ /** * PasskeyMediationStartReq */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-02-08T15:52:19.373962904Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class PasskeyMediationStartReq { public static final String SERIALIZED_NAME_CLIENT_INFORMATION = "clientInformation"; @SerializedName(SERIALIZED_NAME_CLIENT_INFORMATION) diff --git a/src/main/java/com/corbado/generated/model/PasskeyMediationStartRsp.java b/src/main/java/com/corbado/generated/model/PasskeyMediationStartRsp.java index 28d7cdb..f50bc38 100644 --- a/src/main/java/com/corbado/generated/model/PasskeyMediationStartRsp.java +++ b/src/main/java/com/corbado/generated/model/PasskeyMediationStartRsp.java @@ -48,7 +48,7 @@ /** * PasskeyMediationStartRsp */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-02-08T15:52:19.373962904Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class PasskeyMediationStartRsp { public static final String SERIALIZED_NAME_LOGIN_ALLOW = "loginAllow"; @SerializedName(SERIALIZED_NAME_LOGIN_ALLOW) diff --git a/src/main/java/com/corbado/generated/model/LongSessionUpdateReq.java b/src/main/java/com/corbado/generated/model/PasskeyPostLoginReq.java similarity index 61% rename from src/main/java/com/corbado/generated/model/LongSessionUpdateReq.java rename to src/main/java/com/corbado/generated/model/PasskeyPostLoginReq.java index a9944eb..40e61f5 100644 --- a/src/main/java/com/corbado/generated/model/LongSessionUpdateReq.java +++ b/src/main/java/com/corbado/generated/model/PasskeyPostLoginReq.java @@ -14,7 +14,6 @@ package com.corbado.generated.model; import java.util.Objects; -import com.corbado.generated.model.LongSessionStatus; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -47,34 +46,34 @@ import com.corbado.generated.invoker.JSON; /** - * LongSessionUpdateReq + * PasskeyPostLoginReq */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") -public class LongSessionUpdateReq { - public static final String SERIALIZED_NAME_STATUS = "status"; - @SerializedName(SERIALIZED_NAME_STATUS) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-02-08T15:52:19.373962904Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") +public class PasskeyPostLoginReq { + public static final String SERIALIZED_NAME_SIGNED_PASSKEY_DATA = "signedPasskeyData"; + @SerializedName(SERIALIZED_NAME_SIGNED_PASSKEY_DATA) @javax.annotation.Nonnull - private LongSessionStatus status; + private String signedPasskeyData; - public LongSessionUpdateReq() { + public PasskeyPostLoginReq() { } - public LongSessionUpdateReq status(@javax.annotation.Nonnull LongSessionStatus status) { - this.status = status; + public PasskeyPostLoginReq signedPasskeyData(@javax.annotation.Nonnull String signedPasskeyData) { + this.signedPasskeyData = signedPasskeyData; return this; } /** - * Get status - * @return status + * Get signedPasskeyData + * @return signedPasskeyData */ @javax.annotation.Nonnull - public LongSessionStatus getStatus() { - return status; + public String getSignedPasskeyData() { + return signedPasskeyData; } - public void setStatus(@javax.annotation.Nonnull LongSessionStatus status) { - this.status = status; + public void setSignedPasskeyData(@javax.annotation.Nonnull String signedPasskeyData) { + this.signedPasskeyData = signedPasskeyData; } @@ -87,20 +86,20 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - LongSessionUpdateReq longSessionUpdateReq = (LongSessionUpdateReq) o; - return Objects.equals(this.status, longSessionUpdateReq.status); + PasskeyPostLoginReq passkeyPostLoginReq = (PasskeyPostLoginReq) o; + return Objects.equals(this.signedPasskeyData, passkeyPostLoginReq.signedPasskeyData); } @Override public int hashCode() { - return Objects.hash(status); + return Objects.hash(signedPasskeyData); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class LongSessionUpdateReq {\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append("class PasskeyPostLoginReq {\n"); + sb.append(" signedPasskeyData: ").append(toIndentedString(signedPasskeyData)).append("\n"); sb.append("}"); return sb.toString(); } @@ -123,65 +122,66 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); - openapiFields.add("status"); + openapiFields.add("signedPasskeyData"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("status"); + openapiRequiredFields.add("signedPasskeyData"); } /** * Validates the JSON Element and throws an exception if issues found * * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to LongSessionUpdateReq + * @throws IOException if the JSON Element is invalid with respect to PasskeyPostLoginReq */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { - if (!LongSessionUpdateReq.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in LongSessionUpdateReq is not found in the empty JSON string", LongSessionUpdateReq.openapiRequiredFields.toString())); + if (!PasskeyPostLoginReq.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in PasskeyPostLoginReq is not found in the empty JSON string", PasskeyPostLoginReq.openapiRequiredFields.toString())); } } Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Map.Entry entry : entries) { - if (!LongSessionUpdateReq.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `LongSessionUpdateReq` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + if (!PasskeyPostLoginReq.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PasskeyPostLoginReq` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : LongSessionUpdateReq.openapiRequiredFields) { + for (String requiredField : PasskeyPostLoginReq.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the required field `status` - LongSessionStatus.validateJsonElement(jsonObj.get("status")); + if (!jsonObj.get("signedPasskeyData").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `signedPasskeyData` to be a primitive type in the JSON string but got `%s`", jsonObj.get("signedPasskeyData").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!LongSessionUpdateReq.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'LongSessionUpdateReq' and its subtypes + if (!PasskeyPostLoginReq.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PasskeyPostLoginReq' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(LongSessionUpdateReq.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(PasskeyPostLoginReq.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, LongSessionUpdateReq value) throws IOException { + public void write(JsonWriter out, PasskeyPostLoginReq value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); elementAdapter.write(out, obj); } @Override - public LongSessionUpdateReq read(JsonReader in) throws IOException { + public PasskeyPostLoginReq read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); return thisAdapter.fromJsonTree(jsonElement); @@ -192,18 +192,18 @@ public LongSessionUpdateReq read(JsonReader in) throws IOException { } /** - * Create an instance of LongSessionUpdateReq given an JSON string + * Create an instance of PasskeyPostLoginReq given an JSON string * * @param jsonString JSON string - * @return An instance of LongSessionUpdateReq - * @throws IOException if the JSON string is invalid with respect to LongSessionUpdateReq + * @return An instance of PasskeyPostLoginReq + * @throws IOException if the JSON string is invalid with respect to PasskeyPostLoginReq */ - public static LongSessionUpdateReq fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, LongSessionUpdateReq.class); + public static PasskeyPostLoginReq fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, PasskeyPostLoginReq.class); } /** - * Convert an instance of LongSessionUpdateReq to an JSON string + * Convert an instance of PasskeyPostLoginReq to an JSON string * * @return JSON string */ diff --git a/src/main/java/com/corbado/generated/model/ShortSession.java b/src/main/java/com/corbado/generated/model/PasskeyPostLoginRsp.java similarity index 64% rename from src/main/java/com/corbado/generated/model/ShortSession.java rename to src/main/java/com/corbado/generated/model/PasskeyPostLoginRsp.java index 1211dd8..f3d61e9 100644 --- a/src/main/java/com/corbado/generated/model/ShortSession.java +++ b/src/main/java/com/corbado/generated/model/PasskeyPostLoginRsp.java @@ -46,34 +46,34 @@ import com.corbado.generated.invoker.JSON; /** - * ShortSession + * PasskeyPostLoginRsp */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") -public class ShortSession { - public static final String SERIALIZED_NAME_VALUE = "value"; - @SerializedName(SERIALIZED_NAME_VALUE) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-02-08T15:52:19.373962904Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") +public class PasskeyPostLoginRsp { + public static final String SERIALIZED_NAME_SESSION = "session"; + @SerializedName(SERIALIZED_NAME_SESSION) @javax.annotation.Nonnull - private String value; + private String session; - public ShortSession() { + public PasskeyPostLoginRsp() { } - public ShortSession value(@javax.annotation.Nonnull String value) { - this.value = value; + public PasskeyPostLoginRsp session(@javax.annotation.Nonnull String session) { + this.session = session; return this; } /** - * Get value - * @return value + * Get session + * @return session */ @javax.annotation.Nonnull - public String getValue() { - return value; + public String getSession() { + return session; } - public void setValue(@javax.annotation.Nonnull String value) { - this.value = value; + public void setSession(@javax.annotation.Nonnull String session) { + this.session = session; } @@ -86,20 +86,20 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - ShortSession shortSession = (ShortSession) o; - return Objects.equals(this.value, shortSession.value); + PasskeyPostLoginRsp passkeyPostLoginRsp = (PasskeyPostLoginRsp) o; + return Objects.equals(this.session, passkeyPostLoginRsp.session); } @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(session); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class ShortSession {\n"); - sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append("class PasskeyPostLoginRsp {\n"); + sb.append(" session: ").append(toIndentedString(session)).append("\n"); sb.append("}"); return sb.toString(); } @@ -122,43 +122,43 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); - openapiFields.add("value"); + openapiFields.add("session"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("value"); + openapiRequiredFields.add("session"); } /** * Validates the JSON Element and throws an exception if issues found * * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ShortSession + * @throws IOException if the JSON Element is invalid with respect to PasskeyPostLoginRsp */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { - if (!ShortSession.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ShortSession is not found in the empty JSON string", ShortSession.openapiRequiredFields.toString())); + if (!PasskeyPostLoginRsp.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in PasskeyPostLoginRsp is not found in the empty JSON string", PasskeyPostLoginRsp.openapiRequiredFields.toString())); } } Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Map.Entry entry : entries) { - if (!ShortSession.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ShortSession` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + if (!PasskeyPostLoginRsp.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PasskeyPostLoginRsp` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ShortSession.openapiRequiredFields) { + for (String requiredField : PasskeyPostLoginRsp.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("value").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `value` to be a primitive type in the JSON string but got `%s`", jsonObj.get("value").toString())); + if (!jsonObj.get("session").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `session` to be a primitive type in the JSON string but got `%s`", jsonObj.get("session").toString())); } } @@ -166,22 +166,22 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!ShortSession.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ShortSession' and its subtypes + if (!PasskeyPostLoginRsp.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PasskeyPostLoginRsp' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ShortSession.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(PasskeyPostLoginRsp.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, ShortSession value) throws IOException { + public void write(JsonWriter out, PasskeyPostLoginRsp value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); elementAdapter.write(out, obj); } @Override - public ShortSession read(JsonReader in) throws IOException { + public PasskeyPostLoginRsp read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); return thisAdapter.fromJsonTree(jsonElement); @@ -192,18 +192,18 @@ public ShortSession read(JsonReader in) throws IOException { } /** - * Create an instance of ShortSession given an JSON string + * Create an instance of PasskeyPostLoginRsp given an JSON string * * @param jsonString JSON string - * @return An instance of ShortSession - * @throws IOException if the JSON string is invalid with respect to ShortSession + * @return An instance of PasskeyPostLoginRsp + * @throws IOException if the JSON string is invalid with respect to PasskeyPostLoginRsp */ - public static ShortSession fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ShortSession.class); + public static PasskeyPostLoginRsp fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, PasskeyPostLoginRsp.class); } /** - * Convert an instance of ShortSession to an JSON string + * Convert an instance of PasskeyPostLoginRsp to an JSON string * * @return JSON string */ diff --git a/src/main/java/com/corbado/generated/model/PasswordManager.java b/src/main/java/com/corbado/generated/model/PasswordManager.java new file mode 100644 index 0000000..48957b4 --- /dev/null +++ b/src/main/java/com/corbado/generated/model/PasswordManager.java @@ -0,0 +1,425 @@ +/* + * Corbado Backend API + * # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@corbado.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.corbado.generated.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.corbado.generated.invoker.JSON; + +/** + * PasswordManager + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-02-08T15:52:19.373962904Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") +public class PasswordManager { + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull + private String id; + + public static final String SERIALIZED_NAME_USER_I_D = "userID"; + @SerializedName(SERIALIZED_NAME_USER_I_D) + @javax.annotation.Nonnull + private String userID; + + public static final String SERIALIZED_NAME_CLIENT_ENV_I_D = "clientEnvID"; + @SerializedName(SERIALIZED_NAME_CLIENT_ENV_I_D) + @javax.annotation.Nonnull + private String clientEnvID; + + public static final String SERIALIZED_NAME_CREDENTIAL_I_D = "credentialID"; + @SerializedName(SERIALIZED_NAME_CREDENTIAL_I_D) + @javax.annotation.Nonnull + private String credentialID; + + public static final String SERIALIZED_NAME_AAGUID = "aaguid"; + @SerializedName(SERIALIZED_NAME_AAGUID) + @javax.annotation.Nonnull + private String aaguid; + + public static final String SERIALIZED_NAME_STATUS = "status"; + @SerializedName(SERIALIZED_NAME_STATUS) + @javax.annotation.Nonnull + private String status; + + public static final String SERIALIZED_NAME_SCORE = "score"; + @SerializedName(SERIALIZED_NAME_SCORE) + @javax.annotation.Nonnull + private Integer score; + + public static final String SERIALIZED_NAME_CREATED_MS = "createdMs"; + @SerializedName(SERIALIZED_NAME_CREATED_MS) + @javax.annotation.Nonnull + private Long createdMs; + + public PasswordManager() { + } + + public PasswordManager id(@javax.annotation.Nonnull String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nonnull String id) { + this.id = id; + } + + + public PasswordManager userID(@javax.annotation.Nonnull String userID) { + this.userID = userID; + return this; + } + + /** + * Get userID + * @return userID + */ + @javax.annotation.Nonnull + public String getUserID() { + return userID; + } + + public void setUserID(@javax.annotation.Nonnull String userID) { + this.userID = userID; + } + + + public PasswordManager clientEnvID(@javax.annotation.Nonnull String clientEnvID) { + this.clientEnvID = clientEnvID; + return this; + } + + /** + * Get clientEnvID + * @return clientEnvID + */ + @javax.annotation.Nonnull + public String getClientEnvID() { + return clientEnvID; + } + + public void setClientEnvID(@javax.annotation.Nonnull String clientEnvID) { + this.clientEnvID = clientEnvID; + } + + + public PasswordManager credentialID(@javax.annotation.Nonnull String credentialID) { + this.credentialID = credentialID; + return this; + } + + /** + * Get credentialID + * @return credentialID + */ + @javax.annotation.Nonnull + public String getCredentialID() { + return credentialID; + } + + public void setCredentialID(@javax.annotation.Nonnull String credentialID) { + this.credentialID = credentialID; + } + + + public PasswordManager aaguid(@javax.annotation.Nonnull String aaguid) { + this.aaguid = aaguid; + return this; + } + + /** + * Get aaguid + * @return aaguid + */ + @javax.annotation.Nonnull + public String getAaguid() { + return aaguid; + } + + public void setAaguid(@javax.annotation.Nonnull String aaguid) { + this.aaguid = aaguid; + } + + + public PasswordManager status(@javax.annotation.Nonnull String status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + public String getStatus() { + return status; + } + + public void setStatus(@javax.annotation.Nonnull String status) { + this.status = status; + } + + + public PasswordManager score(@javax.annotation.Nonnull Integer score) { + this.score = score; + return this; + } + + /** + * Get score + * @return score + */ + @javax.annotation.Nonnull + public Integer getScore() { + return score; + } + + public void setScore(@javax.annotation.Nonnull Integer score) { + this.score = score; + } + + + public PasswordManager createdMs(@javax.annotation.Nonnull Long createdMs) { + this.createdMs = createdMs; + return this; + } + + /** + * Get createdMs + * @return createdMs + */ + @javax.annotation.Nonnull + public Long getCreatedMs() { + return createdMs; + } + + public void setCreatedMs(@javax.annotation.Nonnull Long createdMs) { + this.createdMs = createdMs; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PasswordManager passwordManager = (PasswordManager) o; + return Objects.equals(this.id, passwordManager.id) && + Objects.equals(this.userID, passwordManager.userID) && + Objects.equals(this.clientEnvID, passwordManager.clientEnvID) && + Objects.equals(this.credentialID, passwordManager.credentialID) && + Objects.equals(this.aaguid, passwordManager.aaguid) && + Objects.equals(this.status, passwordManager.status) && + Objects.equals(this.score, passwordManager.score) && + Objects.equals(this.createdMs, passwordManager.createdMs); + } + + @Override + public int hashCode() { + return Objects.hash(id, userID, clientEnvID, credentialID, aaguid, status, score, createdMs); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PasswordManager {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" userID: ").append(toIndentedString(userID)).append("\n"); + sb.append(" clientEnvID: ").append(toIndentedString(clientEnvID)).append("\n"); + sb.append(" credentialID: ").append(toIndentedString(credentialID)).append("\n"); + sb.append(" aaguid: ").append(toIndentedString(aaguid)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" score: ").append(toIndentedString(score)).append("\n"); + sb.append(" createdMs: ").append(toIndentedString(createdMs)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("userID"); + openapiFields.add("clientEnvID"); + openapiFields.add("credentialID"); + openapiFields.add("aaguid"); + openapiFields.add("status"); + openapiFields.add("score"); + openapiFields.add("createdMs"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("id"); + openapiRequiredFields.add("userID"); + openapiRequiredFields.add("clientEnvID"); + openapiRequiredFields.add("credentialID"); + openapiRequiredFields.add("aaguid"); + openapiRequiredFields.add("status"); + openapiRequiredFields.add("score"); + openapiRequiredFields.add("createdMs"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to PasswordManager + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!PasswordManager.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in PasswordManager is not found in the empty JSON string", PasswordManager.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!PasswordManager.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PasswordManager` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : PasswordManager.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + if (!jsonObj.get("userID").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `userID` to be a primitive type in the JSON string but got `%s`", jsonObj.get("userID").toString())); + } + if (!jsonObj.get("clientEnvID").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `clientEnvID` to be a primitive type in the JSON string but got `%s`", jsonObj.get("clientEnvID").toString())); + } + if (!jsonObj.get("credentialID").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `credentialID` to be a primitive type in the JSON string but got `%s`", jsonObj.get("credentialID").toString())); + } + if (!jsonObj.get("aaguid").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `aaguid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("aaguid").toString())); + } + if (!jsonObj.get("status").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!PasswordManager.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PasswordManager' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(PasswordManager.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, PasswordManager value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public PasswordManager read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of PasswordManager given an JSON string + * + * @param jsonString JSON string + * @return An instance of PasswordManager + * @throws IOException if the JSON string is invalid with respect to PasswordManager + */ + public static PasswordManager fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, PasswordManager.class); + } + + /** + * Convert an instance of PasswordManager to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/corbado/generated/model/ShortSessionCreateReq.java b/src/main/java/com/corbado/generated/model/PasswordManagerList.java similarity index 56% rename from src/main/java/com/corbado/generated/model/ShortSessionCreateReq.java rename to src/main/java/com/corbado/generated/model/PasswordManagerList.java index 1e93635..d31d657 100644 --- a/src/main/java/com/corbado/generated/model/ShortSessionCreateReq.java +++ b/src/main/java/com/corbado/generated/model/PasswordManagerList.java @@ -14,14 +14,16 @@ package com.corbado.generated.model; import java.util.Objects; -import com.corbado.generated.model.AppType; +import com.corbado.generated.model.PasswordManager; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.ArrayList; import java.util.Arrays; +import java.util.List; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -47,58 +49,42 @@ import com.corbado.generated.invoker.JSON; /** - * ShortSessionCreateReq + * PasswordManagerList */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") -public class ShortSessionCreateReq { - public static final String SERIALIZED_NAME_APP_TYPE = "appType"; - @SerializedName(SERIALIZED_NAME_APP_TYPE) - @javax.annotation.Nonnull - private AppType appType; - - public static final String SERIALIZED_NAME_ISSUER = "issuer"; - @SerializedName(SERIALIZED_NAME_ISSUER) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-02-08T15:52:19.373962904Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") +public class PasswordManagerList { + public static final String SERIALIZED_NAME_PASSWORD_MANAGERS = "passwordManagers"; + @SerializedName(SERIALIZED_NAME_PASSWORD_MANAGERS) @javax.annotation.Nonnull - private String issuer; + private List passwordManagers = new ArrayList<>(); - public ShortSessionCreateReq() { + public PasswordManagerList() { } - public ShortSessionCreateReq appType(@javax.annotation.Nonnull AppType appType) { - this.appType = appType; + public PasswordManagerList passwordManagers(@javax.annotation.Nonnull List passwordManagers) { + this.passwordManagers = passwordManagers; return this; } - /** - * Get appType - * @return appType - */ - @javax.annotation.Nonnull - public AppType getAppType() { - return appType; - } - - public void setAppType(@javax.annotation.Nonnull AppType appType) { - this.appType = appType; - } - - - public ShortSessionCreateReq issuer(@javax.annotation.Nonnull String issuer) { - this.issuer = issuer; + public PasswordManagerList addPasswordManagersItem(PasswordManager passwordManagersItem) { + if (this.passwordManagers == null) { + this.passwordManagers = new ArrayList<>(); + } + this.passwordManagers.add(passwordManagersItem); return this; } /** - * Get issuer - * @return issuer + * Get passwordManagers + * @return passwordManagers */ @javax.annotation.Nonnull - public String getIssuer() { - return issuer; + public List getPasswordManagers() { + return passwordManagers; } - public void setIssuer(@javax.annotation.Nonnull String issuer) { - this.issuer = issuer; + public void setPasswordManagers(@javax.annotation.Nonnull List passwordManagers) { + this.passwordManagers = passwordManagers; } @@ -111,22 +97,20 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - ShortSessionCreateReq shortSessionCreateReq = (ShortSessionCreateReq) o; - return Objects.equals(this.appType, shortSessionCreateReq.appType) && - Objects.equals(this.issuer, shortSessionCreateReq.issuer); + PasswordManagerList passwordManagerList = (PasswordManagerList) o; + return Objects.equals(this.passwordManagers, passwordManagerList.passwordManagers); } @Override public int hashCode() { - return Objects.hash(appType, issuer); + return Objects.hash(passwordManagers); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class ShortSessionCreateReq {\n"); - sb.append(" appType: ").append(toIndentedString(appType)).append("\n"); - sb.append(" issuer: ").append(toIndentedString(issuer)).append("\n"); + sb.append("class PasswordManagerList {\n"); + sb.append(" passwordManagers: ").append(toIndentedString(passwordManagers)).append("\n"); sb.append("}"); return sb.toString(); } @@ -149,70 +133,73 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); - openapiFields.add("appType"); - openapiFields.add("issuer"); + openapiFields.add("passwordManagers"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("appType"); - openapiRequiredFields.add("issuer"); + openapiRequiredFields.add("passwordManagers"); } /** * Validates the JSON Element and throws an exception if issues found * * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ShortSessionCreateReq + * @throws IOException if the JSON Element is invalid with respect to PasswordManagerList */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { - if (!ShortSessionCreateReq.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ShortSessionCreateReq is not found in the empty JSON string", ShortSessionCreateReq.openapiRequiredFields.toString())); + if (!PasswordManagerList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in PasswordManagerList is not found in the empty JSON string", PasswordManagerList.openapiRequiredFields.toString())); } } Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Map.Entry entry : entries) { - if (!ShortSessionCreateReq.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ShortSessionCreateReq` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + if (!PasswordManagerList.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PasswordManagerList` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ShortSessionCreateReq.openapiRequiredFields) { + for (String requiredField : PasswordManagerList.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the required field `appType` - AppType.validateJsonElement(jsonObj.get("appType")); - if (!jsonObj.get("issuer").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `issuer` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuer").toString())); + // ensure the json data is an array + if (!jsonObj.get("passwordManagers").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `passwordManagers` to be an array in the JSON string but got `%s`", jsonObj.get("passwordManagers").toString())); } + + JsonArray jsonArraypasswordManagers = jsonObj.getAsJsonArray("passwordManagers"); + // validate the required field `passwordManagers` (array) + for (int i = 0; i < jsonArraypasswordManagers.size(); i++) { + PasswordManager.validateJsonElement(jsonArraypasswordManagers.get(i)); + }; } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!ShortSessionCreateReq.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ShortSessionCreateReq' and its subtypes + if (!PasswordManagerList.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PasswordManagerList' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ShortSessionCreateReq.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(PasswordManagerList.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, ShortSessionCreateReq value) throws IOException { + public void write(JsonWriter out, PasswordManagerList value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); elementAdapter.write(out, obj); } @Override - public ShortSessionCreateReq read(JsonReader in) throws IOException { + public PasswordManagerList read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); return thisAdapter.fromJsonTree(jsonElement); @@ -223,18 +210,18 @@ public ShortSessionCreateReq read(JsonReader in) throws IOException { } /** - * Create an instance of ShortSessionCreateReq given an JSON string + * Create an instance of PasswordManagerList given an JSON string * * @param jsonString JSON string - * @return An instance of ShortSessionCreateReq - * @throws IOException if the JSON string is invalid with respect to ShortSessionCreateReq + * @return An instance of PasswordManagerList + * @throws IOException if the JSON string is invalid with respect to PasswordManagerList */ - public static ShortSessionCreateReq fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ShortSessionCreateReq.class); + public static PasswordManagerList fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, PasswordManagerList.class); } /** - * Convert an instance of ShortSessionCreateReq to an JSON string + * Convert an instance of PasswordManagerList to an JSON string * * @return JSON string */ diff --git a/src/main/java/com/corbado/generated/model/ProjectConfigUpdateCnameReq.java b/src/main/java/com/corbado/generated/model/ProjectConfigUpdateCnameReq.java index 62cfa12..1e6e38e 100644 --- a/src/main/java/com/corbado/generated/model/ProjectConfigUpdateCnameReq.java +++ b/src/main/java/com/corbado/generated/model/ProjectConfigUpdateCnameReq.java @@ -48,7 +48,7 @@ /** * ProjectConfigUpdateCnameReq */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-02-08T15:52:19.373962904Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class ProjectConfigUpdateCnameReq { public static final String SERIALIZED_NAME_CNAME = "cname"; @SerializedName(SERIALIZED_NAME_CNAME) diff --git a/src/main/java/com/corbado/generated/model/RequestData.java b/src/main/java/com/corbado/generated/model/RequestData.java index 9f08758..10c5dd7 100644 --- a/src/main/java/com/corbado/generated/model/RequestData.java +++ b/src/main/java/com/corbado/generated/model/RequestData.java @@ -48,7 +48,7 @@ /** * Data about the request itself, can be used for debugging */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-02-08T15:52:19.373962904Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class RequestData { public static final String SERIALIZED_NAME_REQUEST_I_D = "requestID"; @SerializedName(SERIALIZED_NAME_REQUEST_I_D) diff --git a/src/main/java/com/corbado/generated/model/LongSession.java b/src/main/java/com/corbado/generated/model/Session.java similarity index 57% rename from src/main/java/com/corbado/generated/model/LongSession.java rename to src/main/java/com/corbado/generated/model/Session.java index b365d37..4350216 100644 --- a/src/main/java/com/corbado/generated/model/LongSession.java +++ b/src/main/java/com/corbado/generated/model/Session.java @@ -14,7 +14,7 @@ package com.corbado.generated.model; import java.util.Objects; -import com.corbado.generated.model.LongSessionStatus; +import com.corbado.generated.model.SessionStatus; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -47,14 +47,14 @@ import com.corbado.generated.invoker.JSON; /** - * LongSession + * Session */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") -public class LongSession { - public static final String SERIALIZED_NAME_LONG_SESSION_I_D = "longSessionID"; - @SerializedName(SERIALIZED_NAME_LONG_SESSION_I_D) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-02-08T15:52:19.373962904Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") +public class Session { + public static final String SERIALIZED_NAME_SESSION_I_D = "sessionID"; + @SerializedName(SERIALIZED_NAME_SESSION_I_D) @javax.annotation.Nonnull - private String longSessionID; + private String sessionID; public static final String SERIALIZED_NAME_USER_I_D = "userID"; @SerializedName(SERIALIZED_NAME_USER_I_D) @@ -66,39 +66,49 @@ public class LongSession { @javax.annotation.Nonnull private String identifierValue; - public static final String SERIALIZED_NAME_STATUS = "status"; - @SerializedName(SERIALIZED_NAME_STATUS) + public static final String SERIALIZED_NAME_CREATED_MS = "createdMs"; + @SerializedName(SERIALIZED_NAME_CREATED_MS) + @javax.annotation.Nonnull + private Long createdMs; + + public static final String SERIALIZED_NAME_LAST_ACTION_MS = "lastActionMs"; + @SerializedName(SERIALIZED_NAME_LAST_ACTION_MS) @javax.annotation.Nonnull - private LongSessionStatus status; + private Long lastActionMs; - public static final String SERIALIZED_NAME_EXPIRES = "expires"; - @SerializedName(SERIALIZED_NAME_EXPIRES) + public static final String SERIALIZED_NAME_EXPIRES_MS = "expiresMs"; + @SerializedName(SERIALIZED_NAME_EXPIRES_MS) @javax.annotation.Nonnull - private String expires; + private Long expiresMs; - public LongSession() { + public static final String SERIALIZED_NAME_STATUS = "status"; + @SerializedName(SERIALIZED_NAME_STATUS) + @javax.annotation.Nonnull + private SessionStatus status; + + public Session() { } - public LongSession longSessionID(@javax.annotation.Nonnull String longSessionID) { - this.longSessionID = longSessionID; + public Session sessionID(@javax.annotation.Nonnull String sessionID) { + this.sessionID = sessionID; return this; } /** - * Get longSessionID - * @return longSessionID + * Get sessionID + * @return sessionID */ @javax.annotation.Nonnull - public String getLongSessionID() { - return longSessionID; + public String getSessionID() { + return sessionID; } - public void setLongSessionID(@javax.annotation.Nonnull String longSessionID) { - this.longSessionID = longSessionID; + public void setSessionID(@javax.annotation.Nonnull String sessionID) { + this.sessionID = sessionID; } - public LongSession userID(@javax.annotation.Nonnull String userID) { + public Session userID(@javax.annotation.Nonnull String userID) { this.userID = userID; return this; } @@ -117,7 +127,7 @@ public void setUserID(@javax.annotation.Nonnull String userID) { } - public LongSession identifierValue(@javax.annotation.Nonnull String identifierValue) { + public Session identifierValue(@javax.annotation.Nonnull String identifierValue) { this.identifierValue = identifierValue; return this; } @@ -136,41 +146,79 @@ public void setIdentifierValue(@javax.annotation.Nonnull String identifierValue) } - public LongSession status(@javax.annotation.Nonnull LongSessionStatus status) { - this.status = status; + public Session createdMs(@javax.annotation.Nonnull Long createdMs) { + this.createdMs = createdMs; return this; } /** - * Get status - * @return status + * Get createdMs + * @return createdMs */ @javax.annotation.Nonnull - public LongSessionStatus getStatus() { - return status; + public Long getCreatedMs() { + return createdMs; } - public void setStatus(@javax.annotation.Nonnull LongSessionStatus status) { - this.status = status; + public void setCreatedMs(@javax.annotation.Nonnull Long createdMs) { + this.createdMs = createdMs; } - public LongSession expires(@javax.annotation.Nonnull String expires) { - this.expires = expires; + public Session lastActionMs(@javax.annotation.Nonnull Long lastActionMs) { + this.lastActionMs = lastActionMs; return this; } /** - * Get expires - * @return expires + * Get lastActionMs + * @return lastActionMs */ @javax.annotation.Nonnull - public String getExpires() { - return expires; + public Long getLastActionMs() { + return lastActionMs; } - public void setExpires(@javax.annotation.Nonnull String expires) { - this.expires = expires; + public void setLastActionMs(@javax.annotation.Nonnull Long lastActionMs) { + this.lastActionMs = lastActionMs; + } + + + public Session expiresMs(@javax.annotation.Nonnull Long expiresMs) { + this.expiresMs = expiresMs; + return this; + } + + /** + * Get expiresMs + * @return expiresMs + */ + @javax.annotation.Nonnull + public Long getExpiresMs() { + return expiresMs; + } + + public void setExpiresMs(@javax.annotation.Nonnull Long expiresMs) { + this.expiresMs = expiresMs; + } + + + public Session status(@javax.annotation.Nonnull SessionStatus status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + public SessionStatus getStatus() { + return status; + } + + public void setStatus(@javax.annotation.Nonnull SessionStatus status) { + this.status = status; } @@ -183,28 +231,32 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - LongSession longSession = (LongSession) o; - return Objects.equals(this.longSessionID, longSession.longSessionID) && - Objects.equals(this.userID, longSession.userID) && - Objects.equals(this.identifierValue, longSession.identifierValue) && - Objects.equals(this.status, longSession.status) && - Objects.equals(this.expires, longSession.expires); + Session session = (Session) o; + return Objects.equals(this.sessionID, session.sessionID) && + Objects.equals(this.userID, session.userID) && + Objects.equals(this.identifierValue, session.identifierValue) && + Objects.equals(this.createdMs, session.createdMs) && + Objects.equals(this.lastActionMs, session.lastActionMs) && + Objects.equals(this.expiresMs, session.expiresMs) && + Objects.equals(this.status, session.status); } @Override public int hashCode() { - return Objects.hash(longSessionID, userID, identifierValue, status, expires); + return Objects.hash(sessionID, userID, identifierValue, createdMs, lastActionMs, expiresMs, status); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class LongSession {\n"); - sb.append(" longSessionID: ").append(toIndentedString(longSessionID)).append("\n"); + sb.append("class Session {\n"); + sb.append(" sessionID: ").append(toIndentedString(sessionID)).append("\n"); sb.append(" userID: ").append(toIndentedString(userID)).append("\n"); sb.append(" identifierValue: ").append(toIndentedString(identifierValue)).append("\n"); + sb.append(" createdMs: ").append(toIndentedString(createdMs)).append("\n"); + sb.append(" lastActionMs: ").append(toIndentedString(lastActionMs)).append("\n"); + sb.append(" expiresMs: ").append(toIndentedString(expiresMs)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" expires: ").append(toIndentedString(expires)).append("\n"); sb.append("}"); return sb.toString(); } @@ -227,51 +279,55 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); - openapiFields.add("longSessionID"); + openapiFields.add("sessionID"); openapiFields.add("userID"); openapiFields.add("identifierValue"); + openapiFields.add("createdMs"); + openapiFields.add("lastActionMs"); + openapiFields.add("expiresMs"); openapiFields.add("status"); - openapiFields.add("expires"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("longSessionID"); + openapiRequiredFields.add("sessionID"); openapiRequiredFields.add("userID"); openapiRequiredFields.add("identifierValue"); + openapiRequiredFields.add("createdMs"); + openapiRequiredFields.add("lastActionMs"); + openapiRequiredFields.add("expiresMs"); openapiRequiredFields.add("status"); - openapiRequiredFields.add("expires"); } /** * Validates the JSON Element and throws an exception if issues found * * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to LongSession + * @throws IOException if the JSON Element is invalid with respect to Session */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { - if (!LongSession.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in LongSession is not found in the empty JSON string", LongSession.openapiRequiredFields.toString())); + if (!Session.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in Session is not found in the empty JSON string", Session.openapiRequiredFields.toString())); } } Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Map.Entry entry : entries) { - if (!LongSession.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `LongSession` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + if (!Session.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Session` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : LongSession.openapiRequiredFields) { + for (String requiredField : Session.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("longSessionID").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `longSessionID` to be a primitive type in the JSON string but got `%s`", jsonObj.get("longSessionID").toString())); + if (!jsonObj.get("sessionID").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `sessionID` to be a primitive type in the JSON string but got `%s`", jsonObj.get("sessionID").toString())); } if (!jsonObj.get("userID").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `userID` to be a primitive type in the JSON string but got `%s`", jsonObj.get("userID").toString())); @@ -280,32 +336,29 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("Expected the field `identifierValue` to be a primitive type in the JSON string but got `%s`", jsonObj.get("identifierValue").toString())); } // validate the required field `status` - LongSessionStatus.validateJsonElement(jsonObj.get("status")); - if (!jsonObj.get("expires").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `expires` to be a primitive type in the JSON string but got `%s`", jsonObj.get("expires").toString())); - } + SessionStatus.validateJsonElement(jsonObj.get("status")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!LongSession.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'LongSession' and its subtypes + if (!Session.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Session' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(LongSession.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(Session.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, LongSession value) throws IOException { + public void write(JsonWriter out, Session value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); elementAdapter.write(out, obj); } @Override - public LongSession read(JsonReader in) throws IOException { + public Session read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); return thisAdapter.fromJsonTree(jsonElement); @@ -316,18 +369,18 @@ public LongSession read(JsonReader in) throws IOException { } /** - * Create an instance of LongSession given an JSON string + * Create an instance of Session given an JSON string * * @param jsonString JSON string - * @return An instance of LongSession - * @throws IOException if the JSON string is invalid with respect to LongSession + * @return An instance of Session + * @throws IOException if the JSON string is invalid with respect to Session */ - public static LongSession fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, LongSession.class); + public static Session fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, Session.class); } /** - * Convert an instance of LongSession to an JSON string + * Convert an instance of Session to an JSON string * * @return JSON string */ diff --git a/src/main/java/com/corbado/generated/model/LongSessionCreateReq.java b/src/main/java/com/corbado/generated/model/SessionList.java similarity index 55% rename from src/main/java/com/corbado/generated/model/LongSessionCreateReq.java rename to src/main/java/com/corbado/generated/model/SessionList.java index 146e933..382ae97 100644 --- a/src/main/java/com/corbado/generated/model/LongSessionCreateReq.java +++ b/src/main/java/com/corbado/generated/model/SessionList.java @@ -14,14 +14,17 @@ package com.corbado.generated.model; import java.util.Objects; -import com.corbado.generated.model.AppType; +import com.corbado.generated.model.Paging; +import com.corbado.generated.model.Session; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.ArrayList; import java.util.Arrays; +import java.util.List; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -47,58 +50,66 @@ import com.corbado.generated.invoker.JSON; /** - * LongSessionCreateReq + * SessionList */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") -public class LongSessionCreateReq { - public static final String SERIALIZED_NAME_APP_TYPE = "appType"; - @SerializedName(SERIALIZED_NAME_APP_TYPE) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-02-08T15:52:19.373962904Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") +public class SessionList { + public static final String SERIALIZED_NAME_SESSIONS = "sessions"; + @SerializedName(SERIALIZED_NAME_SESSIONS) @javax.annotation.Nonnull - private AppType appType; + private List sessions = new ArrayList<>(); - public static final String SERIALIZED_NAME_IDENTIFIER_VALUE = "identifierValue"; - @SerializedName(SERIALIZED_NAME_IDENTIFIER_VALUE) + public static final String SERIALIZED_NAME_PAGING = "paging"; + @SerializedName(SERIALIZED_NAME_PAGING) @javax.annotation.Nonnull - private String identifierValue; + private Paging paging; + + public SessionList() { + } - public LongSessionCreateReq() { + public SessionList sessions(@javax.annotation.Nonnull List sessions) { + this.sessions = sessions; + return this; } - public LongSessionCreateReq appType(@javax.annotation.Nonnull AppType appType) { - this.appType = appType; + public SessionList addSessionsItem(Session sessionsItem) { + if (this.sessions == null) { + this.sessions = new ArrayList<>(); + } + this.sessions.add(sessionsItem); return this; } /** - * Get appType - * @return appType + * Get sessions + * @return sessions */ @javax.annotation.Nonnull - public AppType getAppType() { - return appType; + public List getSessions() { + return sessions; } - public void setAppType(@javax.annotation.Nonnull AppType appType) { - this.appType = appType; + public void setSessions(@javax.annotation.Nonnull List sessions) { + this.sessions = sessions; } - public LongSessionCreateReq identifierValue(@javax.annotation.Nonnull String identifierValue) { - this.identifierValue = identifierValue; + public SessionList paging(@javax.annotation.Nonnull Paging paging) { + this.paging = paging; return this; } /** - * Get identifierValue - * @return identifierValue + * Get paging + * @return paging */ @javax.annotation.Nonnull - public String getIdentifierValue() { - return identifierValue; + public Paging getPaging() { + return paging; } - public void setIdentifierValue(@javax.annotation.Nonnull String identifierValue) { - this.identifierValue = identifierValue; + public void setPaging(@javax.annotation.Nonnull Paging paging) { + this.paging = paging; } @@ -111,22 +122,22 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - LongSessionCreateReq longSessionCreateReq = (LongSessionCreateReq) o; - return Objects.equals(this.appType, longSessionCreateReq.appType) && - Objects.equals(this.identifierValue, longSessionCreateReq.identifierValue); + SessionList sessionList = (SessionList) o; + return Objects.equals(this.sessions, sessionList.sessions) && + Objects.equals(this.paging, sessionList.paging); } @Override public int hashCode() { - return Objects.hash(appType, identifierValue); + return Objects.hash(sessions, paging); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class LongSessionCreateReq {\n"); - sb.append(" appType: ").append(toIndentedString(appType)).append("\n"); - sb.append(" identifierValue: ").append(toIndentedString(identifierValue)).append("\n"); + sb.append("class SessionList {\n"); + sb.append(" sessions: ").append(toIndentedString(sessions)).append("\n"); + sb.append(" paging: ").append(toIndentedString(paging)).append("\n"); sb.append("}"); return sb.toString(); } @@ -149,70 +160,77 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); - openapiFields.add("appType"); - openapiFields.add("identifierValue"); + openapiFields.add("sessions"); + openapiFields.add("paging"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("appType"); - openapiRequiredFields.add("identifierValue"); + openapiRequiredFields.add("sessions"); + openapiRequiredFields.add("paging"); } /** * Validates the JSON Element and throws an exception if issues found * * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to LongSessionCreateReq + * @throws IOException if the JSON Element is invalid with respect to SessionList */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { - if (!LongSessionCreateReq.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in LongSessionCreateReq is not found in the empty JSON string", LongSessionCreateReq.openapiRequiredFields.toString())); + if (!SessionList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in SessionList is not found in the empty JSON string", SessionList.openapiRequiredFields.toString())); } } Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Map.Entry entry : entries) { - if (!LongSessionCreateReq.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `LongSessionCreateReq` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + if (!SessionList.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `SessionList` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : LongSessionCreateReq.openapiRequiredFields) { + for (String requiredField : SessionList.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the required field `appType` - AppType.validateJsonElement(jsonObj.get("appType")); - if (!jsonObj.get("identifierValue").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `identifierValue` to be a primitive type in the JSON string but got `%s`", jsonObj.get("identifierValue").toString())); + // ensure the json data is an array + if (!jsonObj.get("sessions").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `sessions` to be an array in the JSON string but got `%s`", jsonObj.get("sessions").toString())); } + + JsonArray jsonArraysessions = jsonObj.getAsJsonArray("sessions"); + // validate the required field `sessions` (array) + for (int i = 0; i < jsonArraysessions.size(); i++) { + Session.validateJsonElement(jsonArraysessions.get(i)); + }; + // validate the required field `paging` + Paging.validateJsonElement(jsonObj.get("paging")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!LongSessionCreateReq.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'LongSessionCreateReq' and its subtypes + if (!SessionList.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SessionList' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(LongSessionCreateReq.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(SessionList.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, LongSessionCreateReq value) throws IOException { + public void write(JsonWriter out, SessionList value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); elementAdapter.write(out, obj); } @Override - public LongSessionCreateReq read(JsonReader in) throws IOException { + public SessionList read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); return thisAdapter.fromJsonTree(jsonElement); @@ -223,18 +241,18 @@ public LongSessionCreateReq read(JsonReader in) throws IOException { } /** - * Create an instance of LongSessionCreateReq given an JSON string + * Create an instance of SessionList given an JSON string * * @param jsonString JSON string - * @return An instance of LongSessionCreateReq - * @throws IOException if the JSON string is invalid with respect to LongSessionCreateReq + * @return An instance of SessionList + * @throws IOException if the JSON string is invalid with respect to SessionList */ - public static LongSessionCreateReq fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, LongSessionCreateReq.class); + public static SessionList fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, SessionList.class); } /** - * Convert an instance of LongSessionCreateReq to an JSON string + * Convert an instance of SessionList to an JSON string * * @return JSON string */ diff --git a/src/main/java/com/corbado/generated/model/LongSessionStatus.java b/src/main/java/com/corbado/generated/model/SessionStatus.java similarity index 71% rename from src/main/java/com/corbado/generated/model/LongSessionStatus.java rename to src/main/java/com/corbado/generated/model/SessionStatus.java index 4c36f82..c93ffd2 100644 --- a/src/main/java/com/corbado/generated/model/LongSessionStatus.java +++ b/src/main/java/com/corbado/generated/model/SessionStatus.java @@ -24,10 +24,10 @@ import com.google.gson.stream.JsonWriter; /** - * Gets or Sets longSessionStatus + * Gets or Sets sessionStatus */ -@JsonAdapter(LongSessionStatus.Adapter.class) -public enum LongSessionStatus { +@JsonAdapter(SessionStatus.Adapter.class) +public enum SessionStatus { ACTIVE("active"), @@ -41,7 +41,7 @@ public enum LongSessionStatus { private String value; - LongSessionStatus(String value) { + SessionStatus(String value) { this.value = value; } @@ -54,8 +54,8 @@ public String toString() { return String.valueOf(value); } - public static LongSessionStatus fromValue(String value) { - for (LongSessionStatus b : LongSessionStatus.values()) { + public static SessionStatus fromValue(String value) { + for (SessionStatus b : SessionStatus.values()) { if (b.value.equals(value)) { return b; } @@ -63,22 +63,22 @@ public static LongSessionStatus fromValue(String value) { throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - public static class Adapter extends TypeAdapter { + public static class Adapter extends TypeAdapter { @Override - public void write(final JsonWriter jsonWriter, final LongSessionStatus enumeration) throws IOException { + public void write(final JsonWriter jsonWriter, final SessionStatus enumeration) throws IOException { jsonWriter.value(enumeration.getValue()); } @Override - public LongSessionStatus read(final JsonReader jsonReader) throws IOException { + public SessionStatus read(final JsonReader jsonReader) throws IOException { String value = jsonReader.nextString(); - return LongSessionStatus.fromValue(value); + return SessionStatus.fromValue(value); } } public static void validateJsonElement(JsonElement jsonElement) throws IOException { String value = jsonElement.getAsString(); - LongSessionStatus.fromValue(value); + SessionStatus.fromValue(value); } } diff --git a/src/main/java/com/corbado/generated/model/SocialAccount.java b/src/main/java/com/corbado/generated/model/SocialAccount.java index 53162f1..3e9b0a7 100644 --- a/src/main/java/com/corbado/generated/model/SocialAccount.java +++ b/src/main/java/com/corbado/generated/model/SocialAccount.java @@ -48,7 +48,7 @@ /** * SocialAccount */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-02-08T15:52:19.373962904Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class SocialAccount { public static final String SERIALIZED_NAME_SOCIAL_ACCOUNT_I_D = "socialAccountID"; @SerializedName(SERIALIZED_NAME_SOCIAL_ACCOUNT_I_D) diff --git a/src/main/java/com/corbado/generated/model/SocialAccountCreateReq.java b/src/main/java/com/corbado/generated/model/SocialAccountCreateReq.java index 3687a7e..db98664 100644 --- a/src/main/java/com/corbado/generated/model/SocialAccountCreateReq.java +++ b/src/main/java/com/corbado/generated/model/SocialAccountCreateReq.java @@ -49,7 +49,7 @@ /** * SocialAccountCreateReq */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-02-08T15:52:19.373962904Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class SocialAccountCreateReq { public static final String SERIALIZED_NAME_PROVIDER_TYPE = "providerType"; @SerializedName(SERIALIZED_NAME_PROVIDER_TYPE) diff --git a/src/main/java/com/corbado/generated/model/SocialAccountList.java b/src/main/java/com/corbado/generated/model/SocialAccountList.java index edb8542..a733552 100644 --- a/src/main/java/com/corbado/generated/model/SocialAccountList.java +++ b/src/main/java/com/corbado/generated/model/SocialAccountList.java @@ -52,7 +52,7 @@ /** * SocialAccountList */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-02-08T15:52:19.373962904Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class SocialAccountList { public static final String SERIALIZED_NAME_SOCIAL_ACCOUNTS = "socialAccounts"; @SerializedName(SERIALIZED_NAME_SOCIAL_ACCOUNTS) diff --git a/src/main/java/com/corbado/generated/model/User.java b/src/main/java/com/corbado/generated/model/User.java index 8f47706..6efaf2c 100644 --- a/src/main/java/com/corbado/generated/model/User.java +++ b/src/main/java/com/corbado/generated/model/User.java @@ -49,7 +49,7 @@ /** * User */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-02-08T15:52:19.373962904Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class User { public static final String SERIALIZED_NAME_USER_I_D = "userID"; @SerializedName(SERIALIZED_NAME_USER_I_D) diff --git a/src/main/java/com/corbado/generated/model/UserCreateReq.java b/src/main/java/com/corbado/generated/model/UserCreateReq.java index dba006c..78d3fbb 100644 --- a/src/main/java/com/corbado/generated/model/UserCreateReq.java +++ b/src/main/java/com/corbado/generated/model/UserCreateReq.java @@ -49,7 +49,7 @@ /** * UserCreateReq */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-02-08T15:52:19.373962904Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class UserCreateReq { public static final String SERIALIZED_NAME_FULL_NAME = "fullName"; @SerializedName(SERIALIZED_NAME_FULL_NAME) diff --git a/src/main/java/com/corbado/generated/model/UserUpdateReq.java b/src/main/java/com/corbado/generated/model/UserUpdateReq.java index e3a25c3..8bb903e 100644 --- a/src/main/java/com/corbado/generated/model/UserUpdateReq.java +++ b/src/main/java/com/corbado/generated/model/UserUpdateReq.java @@ -49,7 +49,7 @@ /** * UserUpdateReq */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-02-08T15:52:19.373962904Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class UserUpdateReq { public static final String SERIALIZED_NAME_FULL_NAME = "fullName"; @SerializedName(SERIALIZED_NAME_FULL_NAME) diff --git a/src/main/java/com/corbado/generated/model/WebhookEndpoint.java b/src/main/java/com/corbado/generated/model/WebhookEndpoint.java index 96e31e4..caf54fd 100644 --- a/src/main/java/com/corbado/generated/model/WebhookEndpoint.java +++ b/src/main/java/com/corbado/generated/model/WebhookEndpoint.java @@ -51,7 +51,7 @@ /** * WebhookEndpoint */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-02-08T15:52:19.373962904Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class WebhookEndpoint { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) @@ -78,11 +78,21 @@ public class WebhookEndpoint { @javax.annotation.Nonnull private String created; + public static final String SERIALIZED_NAME_CREATED_MS = "createdMs"; + @SerializedName(SERIALIZED_NAME_CREATED_MS) + @javax.annotation.Nonnull + private Long createdMs; + public static final String SERIALIZED_NAME_UPDATED = "updated"; @SerializedName(SERIALIZED_NAME_UPDATED) @javax.annotation.Nonnull private String updated; + public static final String SERIALIZED_NAME_UPDATED_MS = "updatedMs"; + @SerializedName(SERIALIZED_NAME_UPDATED_MS) + @javax.annotation.Nonnull + private Long updatedMs; + public WebhookEndpoint() { } @@ -189,6 +199,25 @@ public void setCreated(@javax.annotation.Nonnull String created) { } + public WebhookEndpoint createdMs(@javax.annotation.Nonnull Long createdMs) { + this.createdMs = createdMs; + return this; + } + + /** + * Get createdMs + * @return createdMs + */ + @javax.annotation.Nonnull + public Long getCreatedMs() { + return createdMs; + } + + public void setCreatedMs(@javax.annotation.Nonnull Long createdMs) { + this.createdMs = createdMs; + } + + public WebhookEndpoint updated(@javax.annotation.Nonnull String updated) { this.updated = updated; return this; @@ -208,6 +237,25 @@ public void setUpdated(@javax.annotation.Nonnull String updated) { } + public WebhookEndpoint updatedMs(@javax.annotation.Nonnull Long updatedMs) { + this.updatedMs = updatedMs; + return this; + } + + /** + * Get updatedMs + * @return updatedMs + */ + @javax.annotation.Nonnull + public Long getUpdatedMs() { + return updatedMs; + } + + public void setUpdatedMs(@javax.annotation.Nonnull Long updatedMs) { + this.updatedMs = updatedMs; + } + + @Override public boolean equals(Object o) { @@ -223,12 +271,14 @@ public boolean equals(Object o) { Objects.equals(this.customHeaders, webhookEndpoint.customHeaders) && Objects.equals(this.subscribedEvents, webhookEndpoint.subscribedEvents) && Objects.equals(this.created, webhookEndpoint.created) && - Objects.equals(this.updated, webhookEndpoint.updated); + Objects.equals(this.createdMs, webhookEndpoint.createdMs) && + Objects.equals(this.updated, webhookEndpoint.updated) && + Objects.equals(this.updatedMs, webhookEndpoint.updatedMs); } @Override public int hashCode() { - return Objects.hash(id, url, customHeaders, subscribedEvents, created, updated); + return Objects.hash(id, url, customHeaders, subscribedEvents, created, createdMs, updated, updatedMs); } @Override @@ -240,7 +290,9 @@ public String toString() { sb.append(" customHeaders: ").append(toIndentedString(customHeaders)).append("\n"); sb.append(" subscribedEvents: ").append(toIndentedString(subscribedEvents)).append("\n"); sb.append(" created: ").append(toIndentedString(created)).append("\n"); + sb.append(" createdMs: ").append(toIndentedString(createdMs)).append("\n"); sb.append(" updated: ").append(toIndentedString(updated)).append("\n"); + sb.append(" updatedMs: ").append(toIndentedString(updatedMs)).append("\n"); sb.append("}"); return sb.toString(); } @@ -268,7 +320,9 @@ private String toIndentedString(Object o) { openapiFields.add("customHeaders"); openapiFields.add("subscribedEvents"); openapiFields.add("created"); + openapiFields.add("createdMs"); openapiFields.add("updated"); + openapiFields.add("updatedMs"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -277,7 +331,9 @@ private String toIndentedString(Object o) { openapiRequiredFields.add("customHeaders"); openapiRequiredFields.add("subscribedEvents"); openapiRequiredFields.add("created"); + openapiRequiredFields.add("createdMs"); openapiRequiredFields.add("updated"); + openapiRequiredFields.add("updatedMs"); } /** diff --git a/src/main/java/com/corbado/generated/model/WebhookEndpointCreateReq.java b/src/main/java/com/corbado/generated/model/WebhookEndpointCreateReq.java index 8e5e925..fee823f 100644 --- a/src/main/java/com/corbado/generated/model/WebhookEndpointCreateReq.java +++ b/src/main/java/com/corbado/generated/model/WebhookEndpointCreateReq.java @@ -51,7 +51,7 @@ /** * WebhookEndpointCreateReq */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-02-08T15:52:19.373962904Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class WebhookEndpointCreateReq { public static final String SERIALIZED_NAME_URL = "url"; @SerializedName(SERIALIZED_NAME_URL) diff --git a/src/main/java/com/corbado/generated/model/WebhookEndpointList.java b/src/main/java/com/corbado/generated/model/WebhookEndpointList.java index ce9d2e6..fa0123c 100644 --- a/src/main/java/com/corbado/generated/model/WebhookEndpointList.java +++ b/src/main/java/com/corbado/generated/model/WebhookEndpointList.java @@ -51,7 +51,7 @@ /** * WebhookEndpointList */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-15T13:05:51.424266690Z[Etc/UTC]", comments = "Generator version: 7.11.0-SNAPSHOT") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-02-08T15:52:19.373962904Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class WebhookEndpointList { public static final String SERIALIZED_NAME_WEBHOOK_ENDPOINTS = "webhookEndpoints"; @SerializedName(SERIALIZED_NAME_WEBHOOK_ENDPOINTS)