All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.stormpath.sdk.impl.okta.OktaApiPaths Maven / Gradle / Ivy

Go to download

The Stormpath Java SDK core implemenation .jar is used at runtime to support API invocations. This implementation jar should be a runtime dependency only and should NOT be depended on at compile time by your code. The implementations within this jar can change at any time without warning - use it with runtime scope only.

There is a newer version: 2.0.4-okta
Show newest version
package com.stormpath.sdk.impl.okta;

/**
 * Static path properties in one place.
 */
public final class OktaApiPaths {

    public static final String API_V1 = "/api/v1/";

    public static final String USERS = API_V1 + "users/";

    public static final String PASSWORD_RECOVERY = API_V1 + "authn/recovery/password";

    public static String apiPath(String ... parts) {

        return buildPath(API_V1, parts);
    }

    private static String buildPath(String base, String ... parts) {
        StringBuilder urlPart = new StringBuilder(base);
        for (String part : parts) {
            if ('/' != urlPart.charAt(urlPart.length()-1)) {
                urlPart.append("/");
            }
            urlPart.append(part);
        }
        return urlPart.toString();
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy