### Run Basic CLI Example with Maven Source: https://github.com/okta/okta-sdk-java/blob/master/examples/quickstart/README.md Execute the basic CLI example locally using the Maven command. Ensure you have Maven installed and configured. ```bash $ mvn exec:java ``` -------------------------------- ### Get an Application by ID Source: https://github.com/okta/okta-sdk-java/blob/master/README.md Retrieve a specific application using its unique ID. This example shows how to fetch a Bookmark Application. ```java ApplicationApi applicationApi = new ApplicationApi(client); BookmarkApplication bookmarkApp = (BookmarkApplication) applicationApi.getApplication("bookmark-app-id", null); ``` -------------------------------- ### List Users using Client Source: https://github.com/okta/okta-sdk-java/wiki/Creating-a-Client An example of how to use the configured client to perform an action, such as listing users. ```java client.listUsers() ``` -------------------------------- ### startImportFromIdentitySource Source: https://github.com/okta/okta-sdk-java/blob/master/japicmp-11_0_0_vs_10_3_0.html Adds a new method to start an import from an identity source. Overloaded versions exist to start import with or without additional map parameters. ```APIDOC ## startImportFromIdentitySource ### Description Initiates an import process from a specified identity source. Supports additional configuration options via a map. ### Method * `java.util.List startImportFromIdentitySource(java.lang.String identitySourceId, java.lang.String)` * `java.util.List startImportFromIdentitySource(java.lang.String identitySourceId, java.lang.String, java.util.Map options)` ### Exceptions * `org.openapitools.client.ApiException` ``` -------------------------------- ### Clone and Setup Local Repository Source: https://github.com/okta/okta-sdk-java/blob/master/CONTRIBUTING.md Clone the Okta Java SDK repository and set up your local environment with upstream tracking. ```bash $ git clone https://github.com/YOUR_ACCOUNT/okta-sdk-java.git $ cd okta-sdk-java $ git remote add upstream https://github.com/okta/okta-sdk-java.git $ git checkout master $ git fetch upstream $ git rebase upstream/master ``` -------------------------------- ### Recommended Pagination with PagedIterable (Java Streams) Source: https://github.com/okta/okta-sdk-java/blob/master/MIGRATING.md This example shows how to leverage Java Streams with `PagedIterable` for advanced filtering and collection of paginated user data. It provides a functional approach to processing the results. ```java // Option 3: Using Java Streams List filteredUsers = StreamSupport.stream(users.spliterator(), false) .filter(user -> user.getProfile().getEmail().endsWith("@example.com")) .collect(Collectors.toList()); ``` -------------------------------- ### List System Logs with Filtering Source: https://github.com/okta/okta-sdk-java/blob/master/README.md Fetch system log events, with options to filter by date, query, and sort order. This example retrieves the 100 most recent events matching a specific URI. ```java SystemLogApi systemLogApi = new SystemLogApi(client); // use a filter (start date, end date, filter, or query, sort order) all options are nullable List logEvents = systemLogApi.listLogEvents(null, null, null, "interestingURI.com", null, 100, "ASCENDING"); ``` -------------------------------- ### List Policies with Filters Source: https://github.com/okta/okta-sdk-java/blob/master/README.md Retrieve a list of policies, allowing filtering by policy type and lifecycle status. This example lists active password policies. ```java PolicyApi policyApi = new PolicyApi(client); List policies = policyApi.listPolicies(PolicyType.PASSWORD.name(), LifecycleStatus.ACTIVE.name(), null, null, null, null, null, null); ``` -------------------------------- ### List Groups API with expand parameter Source: https://github.com/okta/okta-sdk-java/blob/master/MIGRATING.md This example demonstrates how to call the Groups API endpoint to achieve previous functionality when the 'expand' parameter was removed from the SDK's listGroups method. This is a workaround and the 'expand' parameter support may be removed in the future. ```java GroupsList result = client.http() .addQueryParameter("expand", true) .get("/api/v1/groups", GroupsList.class); ``` -------------------------------- ### Dry Run Maven Release Preparation Source: https://github.com/okta/okta-sdk-java/wiki/Release-Guide Execute a dry run of the Maven release prepare command to verify the release environment setup without creating any release files. ```bash mvn release:prepare -DdryRun=true ``` -------------------------------- ### Configure GPG Profile for Okta Signature Source: https://github.com/okta/okta-sdk-java/wiki/Release-Guide Define a Maven profile for GPG signing, specifying the GPG executable, key name, and passphrase. Ensure 'gpg2' is used if installed via Homebrew. ```xml ... okta-signature gpg2 YOUR_GPG_KEY_NAME YOUR_GPG_PASSPHRASE sonatype-oss-release gpg2 YOUR_GPG_KEY_NAME YOUR_GPG_PASSPHRASE ... ``` -------------------------------- ### Get a Policy by ID Source: https://github.com/okta/okta-sdk-java/blob/master/README.md Retrieve a specific policy using its unique ID. This example shows how to fetch a policy. ```java PolicyApi policyApi = new PolicyApi(client); Policy policy = policyApi.getPolicy("policy-id", null); ``` -------------------------------- ### Create Client with Default Configuration Source: https://github.com/okta/okta-sdk-java/wiki/Creating-a-Client Build an Okta client using the default configuration, which typically reads from `~/.okta/okta.yaml`. ```java Client client = Clients.builder().build(); ``` -------------------------------- ### SamlApplicationV1 Methods Source: https://github.com/okta/okta-sdk-java/blob/master/MIGRATING.md Introduction of the `SamlApplicationV1` interface for managing SAML application settings. ```APIDOC ## Package `com.okta.sdk.resource.application.SamlApplicationV1` ### Description Represents a SAML application configuration, providing methods to access and modify its settings. ### Methods - `SamlApplicationSettings getSettings()`: Retrieves the settings for the SAML application. - `SamlApplicationV1 setSettings(SamlApplicationSettings settings)`: Sets the overall settings for the SAML application. ``` -------------------------------- ### Get Policy Source: https://github.com/okta/okta-sdk-java/blob/master/README.md Retrieves a specific policy by its ID. ```APIDOC ## Get Policy ### Description Retrieves a specific policy using its unique identifier. ### Method GET (inferred from getPolicy) ### Endpoint /api/v1/policies/{policyId} (inferred from getPolicy) ### Parameters #### Path Parameters - **policyId** (string) - Required - The ID of the policy to retrieve. #### Query Parameters - **queryParameters** (Map) - Optional - Additional query parameters. ### Request Example ```java PolicyApi policyApi = new PolicyApi(client); Policy policy = policyApi.getPolicy("policy-id", null); ``` ### Response #### Success Response (200) - **policy** (Policy) - The requested policy object. ``` -------------------------------- ### Get Application Source: https://github.com/okta/okta-sdk-java/blob/master/README.md Retrieves details of a specific application by its ID. ```APIDOC ## Get Application ### Description Retrieves a specific application using its unique identifier. ### Method GET (inferred from getApplication) ### Endpoint /api/v1/applications/{appId} (inferred from getApplication) ### Parameters #### Path Parameters - **appId** (string) - Required - The ID of the application to retrieve. #### Query Parameters - **queryParameters** (Map) - Optional - Additional query parameters. ### Request Example ```java ApplicationApi applicationApi = new ApplicationApi(client); BookmarkApplication bookmarkApp = (BookmarkApplication) applicationApi.getApplication("bookmark-app-id", null); ``` ### Response #### Success Response (200) - **bookmarkApp** (BookmarkApplication) - The requested application object. ``` -------------------------------- ### Create a User with Okta SDK for Java Source: https://github.com/okta/okta-sdk-java/blob/master/README.md Utilize UserBuilder to construct a new user object and then call buildAndCreate on the UserApi. Ensure all required profile fields are set. ```java UserApi userApi = new UserApi(client); User user = UserBuilder.instance() .setEmail("joe.coder@example.com") .setFirstName("Joe") .setLastName("Code") .buildAndCreate(userApi); ``` -------------------------------- ### getObjectMapper Source: https://github.com/okta/okta-sdk-java/blob/master/japicmp-11_0_0_vs_10_3_0.html Adds a static protected method to get the ObjectMapper instance. ```APIDOC ## getObjectMapper ### Description Provides access to the `ObjectMapper` used for JSON serialization and deserialization. ### Method * `static protected com.fasterxml.jackson.databind.ObjectMapper getObjectMapper()` ``` -------------------------------- ### com.okta.sdk.resource.application.SamlApplicationSettingsSignOn Methods Source: https://github.com/okta/okta-sdk-java/blob/master/MIGRATING.md New methods added to the SamlApplicationSettingsSignOn interface in version 5.0.0. ```APIDOC ## SamlApplicationSettingsSignOn Methods ### Description Methods added to the `com.okta.sdk.resource.application.SamlApplicationSettingsSignOn` interface in version 5.0.0. ### Methods - `List getInlineHooks()` - `SamlApplicationSettingsSignOn setInlineHooks(List inlineHooks)` ``` -------------------------------- ### Get a User Factor Source: https://github.com/okta/okta-sdk-java/blob/master/README.md Retrieves details for a specific factor enrolled by a user. ```APIDOC ## Get a User Factor ### Description Retrieves a specific user factor by its ID. ### Method ```java UserFactorApi userFactorApi = new UserFactorApi(client); UserFactor userFactor = userFactorApi.getFactor("userId", "factorId"); ``` ``` -------------------------------- ### Get a User Factor Source: https://github.com/okta/okta-sdk-java/blob/master/README.md Retrieves details for a specific factor enrolled by a user. ```java UserFactorApi userFactorApi = new UserFactorApi(client); UserFactor userFactor = userFactorApi.getFactor("userId", "factorId"); ``` -------------------------------- ### org.openapitools.client.model.PushProvider.links(LinksSelf) Source: https://github.com/okta/okta-sdk-java/blob/master/japicmp-11_0_0_vs_10_3_0.html A new method `links` accepting `org.openapitools.client.model.LinksSelf` has been added to the public class `org.openapitools.client.model.PushProvider`. ```APIDOC ## METHOD ADDED TO PUBLIC CLASS ### Class `org.openapitools.client.model.PushProvider` ### Method `public org.openapitools.client.model.PushProvider links(org.openapitools.client.model.LinksSelf)` ``` -------------------------------- ### UserSchemaBaseProperties Interface Source: https://github.com/okta/okta-sdk-java/blob/master/MIGRATING.md Provides methods to get and set various user schema attributes. ```APIDOC ## UserSchemaBaseProperties Interface ### Description This interface provides methods to retrieve and modify common user schema attributes. ### Methods #### Getters - `UserSchemaAttribute getCity()` - `UserSchemaAttribute getCostCenter()` - `UserSchemaAttribute getCountryCode()` - `UserSchemaAttribute getDepartment()` - `UserSchemaAttribute getDisplayName()` - `UserSchemaAttribute getDivision()` - `UserSchemaAttribute getEmail()` - `UserSchemaAttribute getEmployeeNumber()` - `UserSchemaAttribute getFirstName()` - `UserSchemaAttribute getHonorificPrefix()` - `UserSchemaAttribute getHonorificSuffix()` - `UserSchemaAttribute getLastName()` - `UserSchemaAttribute getLocale()` - `UserSchemaAttribute getLogin()` - `UserSchemaAttribute getManager()` - `UserSchemaAttribute getManagerId()` - `UserSchemaAttribute getMiddleName()` - `UserSchemaAttribute getMobilePhone()` - `UserSchemaAttribute getNickName()` - `UserSchemaAttribute getOrganization()` - `UserSchemaAttribute getPostalAddress()` - `UserSchemaAttribute getPreferredLanguage()` - `UserSchemaAttribute getPrimaryPhone()` - `UserSchemaAttribute getProfileUrl()` - `UserSchemaAttribute getSecondEmail()` - `UserSchemaAttribute getState()` - `UserSchemaAttribute getStreetAddress()` - `UserSchemaAttribute getTimezone()` - `UserSchemaAttribute getTitle()` - `UserSchemaAttribute getUserType()` - `UserSchemaAttribute getZipCode()` #### Setters - `UserSchemaBaseProperties setCity(UserSchemaAttribute city)` - `UserSchemaBaseProperties setCostCenter(UserSchemaAttribute costCenter)` - `UserSchemaBaseProperties setCountryCode(UserSchemaAttribute countryCode)` - `UserSchemaBaseProperties setDepartment(UserSchemaAttribute department)` - `UserSchemaBaseProperties setDisplayName(UserSchemaAttribute displayName)` - `UserSchemaBaseProperties setDivision(UserSchemaAttribute division)` - `UserSchemaBaseProperties setEmail(UserSchemaAttribute email)` - `UserSchemaBaseProperties setEmployeeNumber(UserSchemaAttribute employeeNumber)` - `UserSchemaBaseProperties setFirstName(UserSchemaAttribute firstName)` - `UserSchemaBaseProperties setHonorificPrefix(UserSchemaAttribute honorificPrefix)` - `UserSchemaBaseProperties setHonorificSuffix(UserSchemaAttribute honorificSuffix)` - `UserSchemaBaseProperties setLastName(UserSchemaAttribute lastName)` - `UserSchemaBaseProperties setLocale(UserSchemaAttribute locale)` - `UserSchemaBaseProperties setLogin(UserSchemaAttribute login)` - `UserSchemaBaseProperties setManager(UserSchemaAttribute manager)` - `UserSchemaBaseProperties setManagerId(UserSchemaAttribute managerId)` - `UserSchemaBaseProperties setMiddleName(UserSchemaAttribute middleName)` - `UserSchemaBaseProperties setMobilePhone(UserSchemaAttribute mobilePhone)` - `UserSchemaBaseProperties setNickName(UserSchemaAttribute nickName)` - `UserSchemaBaseProperties setOrganization(UserSchemaAttribute organization)` - `UserSchemaBaseProperties setPostalAddress(UserSchemaAttribute postalAddress)` - `UserSchemaBaseProperties setPreferredLanguage(UserSchemaAttribute preferredLanguage)` - `UserSchemaBaseProperties setPrimaryPhone(UserSchemaAttribute primaryPhone)` - `UserSchemaBaseProperties setProfileUrl(UserSchemaAttribute profileUrl)` - `UserSchemaBaseProperties setSecondEmail(UserSchemaAttribute secondEmail)` - `UserSchemaBaseProperties setState(UserSchemaAttribute state)` - `UserSchemaBaseProperties setStreetAddress(UserSchemaAttribute streetAddress)` - `UserSchemaBaseProperties setTimezone(UserSchemaAttribute timezone)` - `UserSchemaBaseProperties setTitle(UserSchemaAttribute title)` - `UserSchemaBaseProperties setUserType(UserSchemaAttribute userType)` - `UserSchemaBaseProperties setZipCode(UserSchemaAttribute zipCode)` ``` -------------------------------- ### DomainCertificateMetadata Interface Source: https://github.com/okta/okta-sdk-java/blob/master/MIGRATING.md Provides methods to get and set expiration, fingerprint, and subject for domain certificates. ```APIDOC ## DomainCertificateMetadata ### Description Interface for managing domain certificate metadata. ### Methods - `String getExpiration()`: Retrieves the certificate expiration date. - `String getFingerprint()`: Retrieves the certificate fingerprint. - `String getSubject()`: Retrieves the certificate subject. - `DomainCertificateMetadata setExpiration(String exp)`: Sets the certificate expiration date. - `DomainCertificateMetadata setFingerprint(String fingerprint)`: Sets the certificate fingerprint. - `DomainCertificateMetadata setSubject(String subject)`: Sets the certificate subject. ``` -------------------------------- ### org.openapitools.client.model.BaseEmailServer Source: https://github.com/okta/okta-sdk-java/blob/master/japicmp-11_0_0_vs_10_3_0.html Introduction of the BaseEmailServer class. ```APIDOC ## NEW BaseEmailServer ### Description A new public class `BaseEmailServer` has been introduced. ### Status NEW ``` -------------------------------- ### OrgContactTypeObj Interface Source: https://github.com/okta/okta-sdk-java/blob/master/MIGRATING.md Methods for the OrgContactTypeObj interface, used to set and get the contact type for an organization. ```APIDOC ## OrgContactTypeObj ### Description An interface for managing the contact type associated with an organization. ### Methods - `OrgContactType getContactType()` - `OrgContactTypeObj setContactType(OrgContactType contactType)` ``` -------------------------------- ### New Class: org.openapitools.client.model.DomainLinksAllOf Source: https://github.com/okta/okta-sdk-java/blob/master/japicmp-11_0_0_vs_10_3_0.html Documentation for the newly added `DomainLinksAllOf` class, including its fields, constructors, and methods. ```APIDOC ## New Class: org.openapitools.client.model.DomainLinksAllOf ### Description This document describes the newly introduced `DomainLinksAllOf` class, which extends the functionality related to domain links. ### Fields - **`JSON_PROPERTY_BRAND`** (public static final String): Constant for the 'brand' property. - **`JSON_PROPERTY_CERTIFICATE`** (public static final String): Constant for the 'certificate' property. - **`JSON_PROPERTY_VERIFY`** (public static final String): Constant for the 'verify' property. ### Constructors - **`DomainLinksAllOf()`**: Public constructor for the class. ### Methods - **`brand(org.openapitools.client.model.HrefObject)`**: Adds a brand object. - **`certificate(org.openapitools.client.model.HrefObject)`**: Adds a certificate object. - **`equals(java.lang.Object)`**: Checks for equality with another object. - **`getBrand()`**: Retrieves the brand object. - **`getCertificate()`**: Retrieves the certificate object. - **`getVerify()`**: Retrieves the verify object. - **`hashCode()`**: Computes the hash code for the object. - **`json ateş(java.lang.String)`**: Sets the JSON property for a given key. - **`json ateş(java.lang.String, java.lang.Object)`**: Sets a JSON property with a value. - **`self(org.openapitools.client.model.HrefObject)`**: Adds a self object. - **`toString()`**: Returns a string representation of the object. - **`verify(org.openapitools.client.model.HrefObject)`**: Adds a verify object. ``` -------------------------------- ### User Object Schema Changes (Before v25.0.0) Source: https://github.com/okta/okta-sdk-java/blob/master/MIGRATING.md Example of accessing user type properties before the schema changes in v25.0.0. ```java User user = userApi.getUser(userId); UserType type = user.getType(); String typeId = type.getId(); String typeName = type.getName(); Boolean isDefault = type.getDefault(); Date created = type.getCreated(); String createdBy = type.getCreatedBy(); ``` -------------------------------- ### Create SWA Application Source: https://github.com/okta/okta-sdk-java/blob/master/README.md Demonstrates how to create a new Single-Page Application (SWA) in Okta using the Java SDK. ```APIDOC ## Create SWA Application ### Description Creates a new Single-Page Application (SWA) with specified settings. ### Method POST (inferred from createApplication) ### Endpoint /api/v1/applications (inferred from ApplicationApi) ### Parameters #### Request Body - **browserPluginApplication** (BrowserPluginApplication) - Required - The application object containing settings for SWA. - **activate** (boolean) - Optional - Whether to activate the application upon creation. - **queryParameters** (Map) - Optional - Additional query parameters. ### Request Example ```java ApplicationApi applicationApi = new ApplicationApi(client); SwaApplicationSettingsApplication swaApplicationSettingsApplication = new SwaApplicationSettingsApplication(); swaApplicationSettingsApplication.buttonField("btn-login") .passwordField("txtbox-password") .usernameField("txtbox-username") .url("https://example.com/login.html"); SwaApplicationSettings swaApplicationSettings = new SwaApplicationSettings(); swaApplicationSettings.app(swaApplicationSettingsApplication); BrowserPluginApplication browserPluginApplication = new BrowserPluginApplication(); browserPluginApplication.name(BrowserPluginApplication.NameEnum.TEMPLATE_SWA); browserPluginApplication.label("Sample Plugin App"); browserPluginApplication.settings(swaApplicationSettings); // create BrowserPluginApplication app type BrowserPluginApplication createdApp = (BrowserPluginApplication) applicationApi.createApplication(browserPluginApplication, true, null); ``` ### Response #### Success Response (200) - **createdApp** (BrowserPluginApplication) - The created SWA application object. ``` -------------------------------- ### org.openapitools.client.model.PostAPIServiceIntegrationInstance.getConfigGuideUrl Source: https://github.com/okta/okta-sdk-java/blob/master/japicmp-11_0_0_vs_10_3_0.html Adds a new getter method `getConfigGuideUrl` to the `PostAPIServiceIntegrationInstance` class, used for retrieving the configuration guide URL. ```APIDOC ## METHOD PostAPIServiceIntegrationInstance.getConfigGuideUrl ### Description Retrieves the URL for the configuration guide. ### Method public String getConfigGuideUrl() ### Response #### Success Response * **configGuideUrl** (String) - The URL for the configuration guide. ``` -------------------------------- ### LogStreamSplunkPutSchema Source: https://github.com/okta/okta-sdk-java/blob/master/japicmp-11_0_0_vs_10_3_0.html Represents the schema for a Log Stream configured for Splunk. This class includes methods for setting and getting Splunk-specific settings. ```APIDOC ## Class org.openapitools.client.model.LogStreamSplunkPutSchema ### Description This class defines the schema for a Log Stream that sends data to Splunk. It includes fields and methods for managing Splunk-related configurations. ### Superclass org.openapitools.client.model.LogStreamPutSchema ### Fields - **JSON_PROPERTY_SETTINGS** (public static final java.lang.String) - A constant string for JSON property settings. ### Constructors - **LogStreamSplunkPutSchema()** - Public constructor for creating a new instance. ### Methods - **equals(java.lang.Object obj)** (public boolean) - Indicates whether some other object is "equal to" this one. - **getSettings()** (public org.openapitools.client.model.LogStreamSettingsSplunkPut) - Retrieves the Splunk settings for the log stream. - **hashCode()** (public int) - Returns a hash code value for the object. - **setSettings(org.openapitools.client.model.LogStreamSettingsSplunkPut settings)** (public void) - Sets the Splunk settings for the log stream. - **settings(org.openapitools.client.model.LogStreamSettingsSplunkPut settings)** (public org.openapitools.client.model.LogStreamSplunkPutSchema) - Builder method to set the Splunk settings. - **toString()** (public java.lang.String) - Returns a string representation of the object. ``` -------------------------------- ### System Property Configuration Reference Source: https://github.com/okta/okta-sdk-java/wiki/Creating-a-Client Reference for Okta client configuration properties that can be set via JVM system properties. ```ini okta.client.token: okta.client.orgUrl: okta.client.connectionTimeout: # of seconds okta.client.proxy.port: okta.client.proxy.host: okta.client.proxy.username: okta.client.proxy.password: ``` -------------------------------- ### getHints() Source: https://github.com/okta/okta-sdk-java/blob/master/japicmp-11_0_0_vs_10_3_0.html Retrieves the hints associated with the application. This method is new. ```APIDOC ## getHints() ### Description Getter for hints. ### Method public org.openapitools.client.model.HrefObjectHints getHints() ### Endpoint n.a. ### Parameters None ### Request Example None ### Response * **org.openapitools.client.model.HrefObjectHints** - The hints object. ### Response Example None ``` -------------------------------- ### Instantiate Okta Client (Older Version) Source: https://github.com/okta/okta-sdk-java/blob/master/MIGRATING.md In older versions (8.x.x), a global `Client` was instantiated to access Okta resources. This approach is now deprecated. ```java Client client = Clients.builder() .setOrgUrl("https://{yourOktaDomain}") // e.g. https://dev-123456.okta.com .setClientCredentials(new TokenClientCredentials("{apiToken}")) .build(); User user = client.getUser("a-user-id"); Application app = client.getApplication("appId"); ``` -------------------------------- ### Application Credentials JWKS Retrieval (v25.0.0) Source: https://github.com/okta/okta-sdk-java/blob/master/MIGRATING.md Example of listing JWKs for an application using the updated polymorphic response structure in v25.0.0. ```java ApplicationCredentialsApi credApi = new ApplicationCredentialsApi(client); // List JWKs - now uses polymorphic response List jwks = credApi.listJwks(appId); for (ListJwk200ResponseInner jwk : jwks) { System.out.println("Key ID: " + jwk.getKid()); System.out.println("Key Type: " + jwk.getKty()); System.out.println("Use: " + jwk.getUse()); // "sig" or "enc" System.out.println("Status: " + jwk.getStatus()); } ``` -------------------------------- ### org.openapitools.client.model.ProvisioningDeprovisionedAction.toUrlQueryString Source: https://github.com/okta/okta-sdk-java/blob/master/japicmp-11_0_0_vs_10_3_0.html A new method `toUrlQueryString` has been added to the public class `org.openapitools.client.model.ProvisioningDeprovisionedAction`. ```APIDOC ## METHOD ADDED TO PUBLIC CLASS ### Class `org.openapitools.client.model.ProvisioningDeprovisionedAction` ### Method `public java.lang.String toUrlQueryString(java.lang.String)` ``` -------------------------------- ### OrgCAPTCHASettingsLinks Source: https://github.com/okta/okta-sdk-java/blob/master/japicmp-11_0_0_vs_10_3_0.html Introduces the `OrgCAPTCHASettingsLinks` class, which provides link relations for the CAPTCHA settings object. It includes methods for setting and getting the 'self' link. ```APIDOC ## OrgCAPTCHASettingsLinks ### Description Represents link relations for the CAPTCHA settings object. ### Fields - **JSON_PROPERTY_SELF** (java.lang.String) - Constant for the 'self' property. ### Methods #### getSelf ##### Description Gets the 'self' link object. ##### Method public ##### Endpoint N.A. #### setSelf ##### Description Sets the 'self' link object. ##### Method public ##### Endpoint N.A. #### equals ##### Description Compares this `OrgCAPTCHASettingsLinks` object with another object for equality. ##### Method public ##### Endpoint N.A. #### hashCode ##### Description Returns a hash code value for this `OrgCAPTCHASettingsLinks` object. ##### Method public ##### Endpoint N.A. #### toString ##### Description Returns a string representation of this `OrgCAPTCHASettingsLinks` object. ##### Method public ##### Endpoint N.A. ``` -------------------------------- ### Environment Variable Configuration Reference Source: https://github.com/okta/okta-sdk-java/wiki/Creating-a-Client Reference for Okta client configuration properties that can be set via environment variables. ```ini OKTA_CLIENT_TOKEN: OKTA_CLIENT_ORGURL: OKTA_CLIENT_CONNECTIONTIMEOUT: # of seconds OKTA_CLIENT_PROXY_PORT: OKTA_CLIENT_PROXY_HOST: OKTA_CLIENT_PROXY_USERNAME: OKTA_CLIENT_PROXY_PASSWORD: ``` -------------------------------- ### Get a User with Okta SDK for Java Source: https://github.com/okta/okta-sdk-java/blob/master/README.md Instantiate UserApi and call getUser to retrieve a specific user by their ID. Ensure you have an initialized ApiClient. ```java UserApi userApi = new UserApi(client); userApi.getUser("userId", "application/json", "true"); ``` -------------------------------- ### Create Okta Client Instance Source: https://github.com/okta/okta-sdk-java/blob/master/README.md Instantiate an ApiClient using your Okta domain and API token. For production, consider more secure methods for storing credentials. ```java ApiClient client = Clients.builder() .setOrgUrl("https://{yourOktaDomain}") // e.g. https://dev-123456.okta.com .setClientCredentials(new TokenClientCredentials("{apiToken}")) .build(); ``` -------------------------------- ### User Object Schema Changes (After v25.0.0) Source: https://github.com/okta/okta-sdk-java/blob/master/MIGRATING.md Example of accessing user type information after schema changes in v25.0.0, requiring separate API calls. ```java User user = userApi.getUser(userId); // user.getType() may return null or different structure // Use UserTypeApi to get type information separately UserTypeApi userTypeApi = new UserTypeApi(client); List types = userTypeApi.listUserTypes(); // Find user's type from the types list or user's _links ``` -------------------------------- ### Execute Release Script Source: https://github.com/okta/okta-sdk-java/wiki/Release-Guide Checkout the release branch and execute the release script to build and upload versioned artifacts to a staging repository. ```bash git checkout # ensure git status reports no changes: git status # assuming no reported changes: ./src/ci/release.sh ``` -------------------------------- ### Update ApiModelProperty for Certificate Private Key Source: https://github.com/okta/okta-sdk-java/blob/master/japicmp-11_0_0_vs_10_3_0.html The `io.swagger.annotations.ApiModelProperty` has been modified to include `required=true` and an `example` value for the certificate private key. This provides more explicit documentation for the API property. ```java io.swagger.annotations.ApiModelProperty ``` ```java value Certificate private key ``` ```java required true ``` ```java example "-----BEGIN PRIVATE KEY-----\nMIIEvgIBADANBgkqhkiG9w0AAQEFAASCBKgwghSkAgEAAoIBAQC5cyk6y63iBJSW\nstgsOBqIxfO8euPHcRnyWsL9dsvnbNyOnyvcqFWxdiW3sh2cItzYtoN1Zfgj5lWG\nOVXbHxP0VaNG9fHVX3+NHP6LFHQz92BzAYQmpqi9zaP/aKJklk6LdPFbVLGhuZfm\nbL71K+VnpZdlEC1s38EvjRTFKFZTKVw5wpWgCZQq/AZYj9RxR23IIuRcUJ8TQ2py\noc3kIXPWjiIarSgBlA8G9kCsxgzXP2RyLwKrIBIo+qyHweifpPYW28ipdSbPjiyp\nAMdpbGLDAgMBAAECggEAUXVfT91z6IqghhKwO8QtC5T/+fN06B8rCYSKj/FFoZL0\n0oTiLFuYwImoCadoUDQUE/Efj0rKE2LSgFHg/44IItQXE01m+5WmHmL1ADxsyoLH\nz9yDosKj7jNM7RyV8F8Bg0pL1hU+rU4rhhL/MaS0mx4eFYjC4UmcWBmXTdelSVJa\nkvXvQLT5y86bqh7tqMjM/kALTWRz5CgNJFk/ONA1yo5RTX9S7SIXimBgAvuGqP8i\nMPEhJou7U3DfzXVfvP8byqNdsZs6ZNhG3wXspl61mRyrY+51SOaNLA7Bkji7x4bH\nNw6mJI0IJTAP9oc1Z8fYeMuxT1bfuD7VOupSP0mAMQKBgQDk+KuyQkmPymeP/Wwu\nII4DUpleVzxTK9obMQQoCEEElbQ6+jTb+8ixP0bWLvBXg/rX734j7OWfn/bljWLH\nXLrSoqQZF1+XMVeY4g4wx9UuTK9D2n791zdOgQivxbIPdWL3a4ap86ar8uyMgJu8\nBLXfFBAOc+9myqUkbeO7wt0e6QKBgQDPV04jPtIJoMrggpQDNreGrANKOmsXWxj4\nOHW13QNdJ2KGQpoTdoqQ8ZmlxuA8Bf2RjHsnB2kgGVTVQR74zRib4MByhvsdhvVm\nF2LNsJoIDfqtv3c+oj13VonRUGuzUeJpwT/snyaL+jQ/ZZcYz0jDgDhIODTcFYj8\nDMSD5SHgywKBgHH6MwWuJ44TNBAiF2qyu959jGjAxf+k0ZI9iRMgYLUWjDvbdtqW\ncCWDGRDfFraJtSEuTz003GzkJPPJuIUC7OCTI1p2HxhU8ITi6itwHfdJJyk4J4TW\nT+qdIqTUpTk6tsPw23zYE3x+lS+viVZDhgEArKl1HpOthh0nMnixnH6ZAoGBAKGn\nV+xy1h9bldFk/TFkP8Jn6ki9MzGKfPVKT7vzDORcCJzU4Hu8OFy5gSmW3Mzvfrsz\n4/CR/oxgM5vwoc0pWr5thJ3GT5K93iYypX3o6q7M91zvonDa3UFl3x2qrc2pUfVS\nDhzWGJ+Z+5JSCnP1aK3EEh18dPoCcELTUYPj6X3xAoGBALAllTb3RCIaqIqk+s3Y\n6KDzikgwGM6j9lmOI2MH4XmCVym4Z40YGK5nxulDh2Ihn/n9zm13Z7ul2DJwgQSO\n0zBc7/CMOsMEBaNXuKL8Qj4enJXMtub4waQ/ywqHIdc50YaPI5Ax8dD/10h9M6Qc\nnUFLNE8pXSnsqb0eOL74f3uQ\n-----END PRIVATE KEY----- ``` -------------------------------- ### Instantiate Okta API Clients (New Version) Source: https://github.com/okta/okta-sdk-java/blob/master/MIGRATING.md In newer versions (10.x.x), instantiate API-specific clients (e.g., `UserApi`, `ApplicationApi`) using a shared `ApiClient`. This provides a more modular approach. ```java ApiClient client = Clients.builder() .setOrgUrl("https://{yourOktaDomain}") // e.g. https://dev-123456.okta.com .setClientCredentials(new TokenClientCredentials("{apiToken}")) .build(); UserApi userApi = new UserApi(client); User user = userApi.getUser("userId"); ApplicationApi applicationApi = new ApplicationApi(client); Application app = applicationApi.getApplication("appId", null); ``` -------------------------------- ### Paginate Users with Filters and Search (Java) Source: https://github.com/okta/okta-sdk-java/blob/master/README.md Demonstrates filtering users by status and searching by email prefix using `PagedIterable`. The `filter` parameter uses SCIM filter expressions, while `search` uses search expressions. Ensure correct syntax for these parameters. ```java UserApi userApi = new UserApi(client); // Filter by status for (User user : userApi.listUsersPagedIterable(null, null, 200, "status eq \"ACTIVE\"", null, null, null)) { System.out.println(user.getProfile().getEmail()); } // Search by email prefix for (User user : userApi.listUsersPagedIterable(null, null, 200, null, "profile.email sw \"admin\"", null, null)) { System.out.println(user.getProfile().getEmail()); } ``` -------------------------------- ### List All Users with Okta SDK for Java Source: https://github.com/okta/okta-sdk-java/blob/master/README.md Use the UserApi to list users. This method fetches a single page of users and can be streamed. Consider using *Paged() methods for automatic pagination. ```java UserApi userApi = new UserApi(client); List users = userApi.listUsers("application/json", null, null, 5, null, null, null, null); // stream users.stream() .forEach(user -> { // do something }); ``` -------------------------------- ### Custom AuthenticationStateHandler Implementation in Java Source: https://github.com/okta/okta-sdk-java/wiki/Migration-from-v0.0.4-to-1.x Implement AuthenticationStateHandlerAdapter to manage different authentication states. This example shows handling unknown responses, successful authentication with session token, and password expiration. ```java public class ExampleAuthenticationStateHandler extends AuthenticationStateHandlerAdapter { @Override public void handleUnknown(AuthenticationResponse unknownResponse) { // redirect to "/error" } @Override public void handleSuccess(AuthenticationResponse successResponse) { // a user is ONLY considered authenticated if a sessionToken exists if (Strings.hasLength(successResponse.getSessionToken())) { String relayState = successResponse.getRelayState(); String dest = relayState != null ? relayState : "/"; // redirect to dest } // other state transition successful } @Override public void handlePasswordExpired(AuthenticationResponse passwordExpired) { // redirect to "/login/change-password" } // Other implemented states here } ``` -------------------------------- ### PolicyMappingLinksAllOfApplication Constructor Source: https://github.com/okta/okta-sdk-java/blob/master/japicmp-11_0_0_vs_10_3_0.html The constructor for PolicyMappingLinksAllOfApplication has been added. ```APIDOC ## PolicyMappingLinksAllOfApplication() ### Description Constructor for the PolicyMappingLinksAllOfApplication class. ### Method Constructor ### Endpoint n.a. ### Parameters None ### Request Example None ### Response None ``` -------------------------------- ### Activate Maven Profiles for Release Source: https://github.com/okta/okta-sdk-java/wiki/Release-Guide Enable the 'sonatype-oss-release' and 'okta-signature' profiles in your Maven settings.xml to activate release configurations and GPG signing. ```xml sonatype-oss-release okta-signature ``` -------------------------------- ### Create a User with Groups using Okta SDK for Java Source: https://github.com/okta/okta-sdk-java/blob/master/README.md Extend user creation by providing a list of group IDs to the UserBuilder before calling buildAndCreate. This assigns the user to specified groups upon creation. ```java UserApi userApi = new UserApi(client); User user = UserBuilder.instance() .setEmail("joe.coder@example.com") .setFirstName("Joe") .setLastName("Code") .setGroups(Arrays.asList("groupId-1", "groupId-2")) .buildAndCreate(userApi); ``` -------------------------------- ### Migrate ResourceSet API Usage in Okta SDK Java Source: https://github.com/okta/okta-sdk-java/blob/master/MIGRATING.md When migrating from v24.x to v25.0.0, review how you access `_links.resources` in the `ResourceSet` API, as its property type has changed. This example shows the typical usage before and after the update. ```java // Before (v24.x) ResourceSetApi resourceSetApi = new ResourceSetApi(client); ResourceSet resourceSet = resourceSetApi.getResourceSet(resourceSetId); // Accessing _links.resources as previous type // After (v25.0.0) ResourceSetApi resourceSetApi = new ResourceSetApi(client); ResourceSet resourceSet = resourceSetApi.getResourceSet(resourceSetId); // _links.resources property type has changed - review new structure ``` -------------------------------- ### org.openapitools.client.model.ApplicationLayoutsLinks Source: https://github.com/okta/okta-sdk-java/blob/master/japicmp-11_0_0_vs_10_3_0.html New class and methods for Application Layouts Links. ```APIDOC ## ApplicationLayoutsLinks Class ### Description Introduces the `ApplicationLayoutsLinks` class with new methods for adding different types of link items. ### Class `public class org.openapitools.client.model.ApplicationLayoutsLinks` ### Fields - `JSON_PROPERTY_GENERAL` (public static final java.lang.String) - `JSON_PROPERTY_PROVISIONING` (public static final java.lang.String) - `JSON_PROPERTY_SIGN_ON` (public static final java.lang.String) ### Constructors - `ApplicationLayoutsLinks()` ### Methods - **addGeneralItem(org.openapitools.client.model.HrefObject)**: Returns `org.openapitools.client.model.ApplicationLayoutsLinks`. - **addProvisioningItem(org.openapitools.client.model.HrefObject)**: Returns `org.openapitools.client.model.ApplicationLayoutsLinks`. - **addSignOnItem(org.openapitools.client.model.HrefObject)**: Returns `org.openapitools.client.model.ApplicationLayoutsLinks`. - **equals(java.lang.Object)**: Returns `boolean`. ``` -------------------------------- ### Unified Client Operations in Java SDK Source: https://github.com/okta/okta-sdk-java/wiki/Migration-from-v0.0.4-to-1.x In v1.x, all operations start from a single client object, unlike v0.0.4 which required separate API client objects for each resource. This simplifies client instantiation and usage. ```java client.listUsers(); client.listApplications(); ``` ```java // Previously: userApiClient.getUsers(); appInstanceApiClient.getAppInstances(); ``` -------------------------------- ### Okta YAML Configuration Reference Source: https://github.com/okta/okta-sdk-java/wiki/Creating-a-Client Reference for properties that can be configured in the `okta.yaml` file, including client credentials, timeouts, and proxy settings. ```yaml okta: client: token: orgUrl: connectionTimeout: # of seconds proxy: port: host: username: password: ``` -------------------------------- ### PolicyMapping Class Additions Source: https://github.com/okta/okta-sdk-java/blob/master/japicmp-11_0_0_vs_10_3_0.html This section details new public methods added to the PolicyMapping class, including methods for setting and getting policy mapping details and links, as well as a new toString() method. ```APIDOC ## NEW public class org.openapitools.client.model.PolicyMapping ### Description This class represents a policy mapping within the Okta system. The following methods have been added: ### Methods Added: - `public int hashCode()`: Returns a hash code value for the object. - `public void setId(java.lang.String id)`: Sets the ID for the policy mapping. - `public org.openapitools.client.model.PolicyMappingLinks links(org.openapitools.client.model.PolicyMappingLinks links)`: Sets the links for the policy mapping. - `public void setLinks(org.openapitools.client.model.PolicyMappingLinks links)`: Sets the links for the policy mapping. - `public java.lang.String toString()`: Returns a string representation of the object. ``` -------------------------------- ### org.openapitools.client.model.ApplicationLayouts Source: https://github.com/okta/okta-sdk-java/blob/master/japicmp-11_0_0_vs_10_3_0.html New class and methods for Application Layouts. ```APIDOC ## ApplicationLayouts Class ### Description Introduces the `ApplicationLayouts` class with new methods for managing application layouts. ### Class `public class org.openapitools.client.model.ApplicationLayouts` ### Fields - `JSON_PROPERTY_LINKS` (public static final java.lang.String) ### Constructors - `ApplicationLayouts()` ### Methods - **equals(java.lang.Object)**: Returns `boolean`. - **getLinks()**: Returns `org.openapitools.client.model.ApplicationLayoutsLinks`. - **hashCode()**: Returns `int`. - **links(org.openapitools.client.model.ApplicationLayoutsLinks)**: Returns `org.openapitools.client.model.ApplicationLayouts`. - **setLinks(org.openapitools.client.model.ApplicationLayoutsLinks)**: Returns `void`. - **toString()**: Returns `java.lang.String`. ``` -------------------------------- ### Create Client Programmatically Source: https://github.com/okta/okta-sdk-java/wiki/Creating-a-Client Configure client attributes like API token and organization URL directly in your code. This is useful for dynamic configurations or when a config file is not present. ```java Client client = Clients.builder() .setClientCredentials(new TokenClientCredentials("")) .setOrgUrl("https://dev-123456.oktapreview.com) .build(); ``` -------------------------------- ### Accessing Object-Specific Data in Java SDK Source: https://github.com/okta/okta-sdk-java/wiki/Migration-from-v0.0.4-to-1.x Object-specific methods are now part of the model objects. For instance, to get groups for a user, you call a method on the user object itself, rather than a separate API client method. ```java client.getUser("userId").getGroups(); ``` ```java // Previously: userApiClient.getUserGroups("userId"); ``` -------------------------------- ### org.openapitools.client.model.PostAPIServiceIntegrationInstance Constructor Source: https://github.com/okta/okta-sdk-java/blob/master/japicmp-11_0_0_vs_10_3_0.html Introduces a new public constructor for the `PostAPIServiceIntegrationInstance` class, allowing for the instantiation of this model. ```APIDOC ## CONSTRUCTOR PostAPIServiceIntegrationInstance() ### Description Constructs a new instance of the `PostAPIServiceIntegrationInstance` class. ``` -------------------------------- ### Okta Configuration File Source: https://github.com/okta/okta-sdk-java/wiki/Creating-a-Client Define your organization URL and API token in the `~/.okta/okta.yaml` file. This is the recommended way to store sensitive credentials. ```yaml okta: client: token: orgUrl: https://dev-123456.oktapreview.com ``` -------------------------------- ### hints(org.openapitools.client.model.HrefObjectHints) Source: https://github.com/okta/okta-sdk-java/blob/master/japicmp-11_0_0_vs_10_3_0.html Sets the hints for the application. This method is new. ```APIDOC ## hints(org.openapitools.client.model.HrefObjectHints) ### Description Setter for hints. ### Method public org.openapitools.client.model.PolicyMappingLinksAllOfApplication hints(org.openapitools.client.model.HrefObjectHints) ### Endpoint n.a. ### Parameters * **hints** (org.openapitools.client.model.HrefObjectHints) - The hints object to set. ### Request Example None ### Response * **org.openapitools.client.model.PolicyMappingLinksAllOfApplication** - The updated PolicyMappingLinksAllOfApplication object. ### Response Example None ``` -------------------------------- ### Client Class New Method Source: https://github.com/okta/okta-sdk-java/blob/master/MIGRATING.md Details a new method added to the `com.okta.sdk.client.Client` interface for managing identity provider keys. ```APIDOC ## Package `com.okta.sdk.client.Client` ### New Method Added - `void deleteIdentityProviderKey(String keyId)`: This method allows for the deletion of an identity provider key using its ID. ``` -------------------------------- ### SamlApplicationSettingsSignOn Methods Source: https://github.com/okta/okta-sdk-java/blob/master/MIGRATING.md New and updated methods for managing SAML application sign-on settings, including ACS endpoints and multi-endpoint configurations. ```APIDOC ## Package `com.okta.sdk.resource.application.SamlApplicationSettingsSignOn` ### Description Provides methods to manage SAML application sign-on settings, such as Access Control Server (ACS) endpoints and their configurations. ### Methods - `List getAcsEndpoints()`: Retrieves the list of ACS endpoints. - `Boolean getAllowMultipleAcsEndpoints()`: Checks if multiple ACS endpoints are allowed. - `SamlApplicationSettingsSignOn setAcsEndpoints(List acsEndpoints)`: Sets the ACS endpoints for the SAML application. - `SamlApplicationSettingsSignOn setAllowMultipleAcsEndpoints(Boolean allowMultipleAcsEndpoints)`: Configures whether multiple ACS endpoints are permitted. ``` -------------------------------- ### SourceLinks Constructor and Methods Source: https://github.com/okta/okta-sdk-java/blob/master/japicmp-11_0_0_vs_10_3_0.html Introduces the SourceLinks class with a constructor, equals method, and getSchema method. ```APIDOC ## SourceLinks ### Description Represents links related to the source, including schema information. ### Constructor ```java public SourceLinks() ``` ### Methods #### equals ```java public boolean equals(Object obj) ``` #### getSchema ```java public org.openapitools.client.model.HrefObject getSchema() ``` ### Returns * **org.openapitools.client.model.HrefObject** - The HrefObject associated with the schema. ``` -------------------------------- ### createApplication Source: https://github.com/okta/okta-sdk-java/blob/master/japicmp-11_0_0_vs_10_3_0.html This method was added to the public class in version 11.0.0. It allows for the creation of an application with additional parameters. ```APIDOC ## createApplication ### Description Creates a new application. ### Method POST ### Endpoint /api/v1/applications ### Parameters #### Path Parameters None #### Query Parameters - **application** (org.openapitools.client.model.Application) - Required - The application object to create. - **isNewApp** (java.lang.Boolean) - Optional - Indicates if this is a new application. - **queryParameters** (java.lang.String) - Optional - Additional query parameters. - **headers** (java.util.Map) - Optional - Custom headers. ### Request Example ```json { "example": "request body" } ``` ### Response #### Success Response (200) - **application** (org.openapitools.client.model.Application) - The created application object. #### Response Example ```json { "example": "response body" } ``` ``` -------------------------------- ### org.openapitools.client.model.ProvisioningGroupsAction.toUrlQueryString Source: https://github.com/okta/okta-sdk-java/blob/master/japicmp-11_0_0_vs_10_3_0.html A new method `toUrlQueryString` has been added to the public class `org.openapitools.client.model.ProvisioningGroupsAction`. ```APIDOC ## METHOD ADDED TO PUBLIC CLASS ### Class `org.openapitools.client.model.ProvisioningGroupsAction` ### Method `public java.lang.String toUrlQueryString(java.lang.String)` ```