public final class ClientValidator extends Object
Modifier and Type | Field and Description |
---|---|
static Integer |
CLIENT_ID_MAX_LENGTH
The Constant CLIENT_ID_MAX_LENGTH defines the maximal length of a client id.
|
static Integer |
CLIENT_ID_MIN_LENGTH
The Constant CLIENT_ID_MIN_LENGTH defines the minimal length of a client id.
|
static String |
CLIENT_ID_REGEX_PATTERN
The Constant CLIENT_ID_REGEX_PATTERN defines the pattern for a client id.
|
static String |
CLIENT_ID_VALID_SYMBOLD
Part of the pattern containing all valid symbols for the client id.
|
Modifier and Type | Method and Description |
---|---|
static void |
assertValidClientId(String clientId)
Test that the client ID is valid.
|
static boolean |
validateClientId(String id)
Validate client id against the regex pattern.
|
static boolean |
validateClientIdLength(String id)
Validate the client id length.
|
public static final String CLIENT_ID_VALID_SYMBOLD
public static final String CLIENT_ID_REGEX_PATTERN
public static final Integer CLIENT_ID_MAX_LENGTH
public static final Integer CLIENT_ID_MIN_LENGTH
public static void assertValidClientId(String clientId) throws InvalidClientIdException
clientId
- the client ID to testInvalidClientIdException
- in case the ID is not validpublic static boolean validateClientId(String id)
id
- the idpublic static boolean validateClientIdLength(String id)
id
- the idCopyright © 2019 Communote team. All rights reserved.