public final class ConfigurationValidator
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static void |
assertApiToken(java.lang.String token)
Asserts that an API token is not null and contains does not contain the string
{apiToken}. |
static void |
assertClientId(java.lang.String clientId)
Asserts that a
clientId is not null and contains does not contain the string {clientId}. |
static void |
assertClientSecret(java.lang.String clientSecret)
Asserts that a client secret is not null and contains does not contain the string
{clientSecret}. |
static void |
assertIssuer(java.lang.String url)
Asserts the
url is a well formed HTTPS URL and does not contain common typos. |
static void |
assertOrgUrl(java.lang.String url)
Asserts the
url is a well formed HTTPS URL and does not contain common typos. |
static void |
assertOrgUrl(java.lang.String url,
boolean allowNonHttpsForTesting)
Deprecated.
use
validateOrgUrl(String) instead, disabling this check is NOT recommended, and should
ONLY be done in testing scenarios |
static ValidationResponse |
validateApiToken(java.lang.String token)
Returns a
ValidationResponse checking to make sure the API token is not null and
contains does not contain the string {apiToken}. |
static ValidationResponse |
validateClientId(java.lang.String clientId)
Returns a
ValidationResponse checking the clientId is not null and contains does not contain the string {apiToclientIdken}. |
static ValidationResponse |
validateClientSecret(java.lang.String clientSecret)
Returns a
ValidationResponse checking the clientSecret is not null and contains does not contain the string {clientSecret}. |
static ValidationResponse |
validateIssuer(java.lang.String url)
Returns a
ValidationResponse checking the url is a well formed HTTPS URL and
does not contain common typos. |
static ValidationResponse |
validateOrgUrl(java.lang.String url)
Returns a
ValidationResponse checking to make sure the url is a well formed HTTPS URL and does
not contain common typos. |
static ValidationResponse |
validateOrgUrl(java.lang.String url,
boolean allowNonHttpsForTesting)
Deprecated.
use
validateOrgUrl(String) instead, disabling this check is NOT recommended, and should
ONLY be done in testing scenarios |
public static void assertOrgUrl(java.lang.String url)
url is a well formed HTTPS URL and does not contain common typos. The checks include:
url - The url to be validatedjava.lang.IllegalArgumentException - Thrown if URL is invalid@Deprecated
public static void assertOrgUrl(java.lang.String url,
boolean allowNonHttpsForTesting)
validateOrgUrl(String) instead, disabling this check is NOT recommended, and should
ONLY be done in testing scenariosurl is a well formed HTTPS URL and does not contain common typos. The checks include:
url - The url to be validatedallowNonHttpsForTesting - Allow orgUrl to be non-https, likely used for testing.java.lang.IllegalArgumentException - Thrown if URL is invalidpublic static ValidationResponse validateOrgUrl(java.lang.String url)
ValidationResponse checking to make sure the url is a well formed HTTPS URL and does
not contain common typos. The checks include:
url - The url to be validated@Deprecated public static ValidationResponse validateOrgUrl(java.lang.String url, boolean allowNonHttpsForTesting)
validateOrgUrl(String) instead, disabling this check is NOT recommended, and should
ONLY be done in testing scenariosValidationResponse checking to make sure the url is a well formed HTTPS URL and does
not contain common typos. The checks include:
url - The url to be validatedallowNonHttpsForTesting - Allow orgUrl to be non-https, likely used for testing.public static void assertApiToken(java.lang.String token)
{apiToken}.token - The API Token to be validatedjava.lang.IllegalArgumentException - Thrown if token is invalidpublic static ValidationResponse validateApiToken(java.lang.String token)
ValidationResponse checking to make sure the API token is not null and
contains does not contain the string {apiToken}.token - The API Token to be validatedpublic static void assertIssuer(java.lang.String url)
url is a well formed HTTPS URL and does not contain common typos. The checks include:
url - The url to be validatedjava.lang.IllegalArgumentException - Thrown if URL is invalidpublic static ValidationResponse validateIssuer(java.lang.String url)
ValidationResponse checking the url is a well formed HTTPS URL and
does not contain common typos. The checks include:
url - The url to be validatedpublic static void assertClientId(java.lang.String clientId)
clientId is not null and contains does not contain the string {clientId}.clientId - The client Id to be validatedjava.lang.IllegalArgumentException - Thrown if URL is invalidpublic static ValidationResponse validateClientId(java.lang.String clientId)
ValidationResponse checking the clientId is not null and contains does not contain the string {apiToclientIdken}.clientId - The client Id to be validatedpublic static void assertClientSecret(java.lang.String clientSecret)
{clientSecret}.clientSecret - the Client Secret to be validatedjava.lang.IllegalArgumentException - Thrown if URL is invalidpublic static ValidationResponse validateClientSecret(java.lang.String clientSecret)
ValidationResponse checking the clientSecret is not null and contains does not contain the string {clientSecret}.clientSecret - the Client Secret to be validatedCopyright © 2018-2021 Okta. All Rights Reserved.