public class MACTokenCreator extends java.lang.Object implements TokenCreator
| Modifier and Type | Class and Description | 
|---|---|
private static class  | 
MACTokenCreator.InsecureHostnameVerifier
Trustful implementation of the interface  
HostnameVerifier. | 
private static class  | 
MACTokenCreator.InsecureTrustManager
Trustful implementation of the interface  
X509TrustManager. | 
| Modifier and Type | Field and Description | 
|---|---|
private static java.lang.String | 
AUTHORIZATION_HEADER
Authorization token. 
 | 
private static java.lang.String | 
DP
Default password. 
 | 
private static java.lang.String | 
HANDSHAKE_SERVICE
URL path for Hand shake service used for JWT token validation. 
 | 
private static java.lang.String | 
HASH_ALGORITHM
Algorithm used for hashing. 
 | 
private java.security.Key | 
key
Key used for message authentication code algorithm initialization. 
 | 
private static java.lang.String | 
KSP
Key specification default password. 
 | 
private static java.util.logging.Logger | 
LOGGER
Logger instance. 
 | 
private static java.lang.String | 
MAC_PASSWORD
Key for password parameter. 
 | 
private java.lang.String | 
macPassword
MAC password. 
 | 
private static java.lang.String | 
PAR_SERVER_URL
Name of properties parameter used for obtaining host address. 
 | 
private static java.lang.String | 
PREFIX
Prefix for parameters configured in a properties file. 
 | 
private static java.lang.String | 
SERVICE_URL
Key for web service used for token validation. 
 | 
private java.lang.String | 
serviceUrl
URL of web service used to token validation. 
 | 
private static int | 
STATUS_OK
HTTP response status  
OK. | 
private static java.lang.String | 
TRUST_CERT
Parameter name for trusting server certificate. 
 | 
private static java.lang.String | 
TRUST_NAME
Parameter name for trusting server name. 
 | 
| Constructor and Description | 
|---|
MACTokenCreator()  | 
| Modifier and Type | Method and Description | 
|---|---|
java.lang.String | 
create(JWTClaimsSet claimsSet)
Creates token value. 
 | 
private java.lang.String | 
getConfigFilePath()
Returns path to the  
ues-client.properties file which contains configuration
 used for calling a web service. | 
private java.lang.String | 
getValidationWebServiceURL()
Determines URL of web service which is used for token validation. 
 | 
private java.lang.String | 
hash(java.lang.String value)
Generates hash from the specified value. 
 | 
private void | 
checkRemotely(java.lang.String token)
Checks specified token by invoking a web service. 
 | 
void | 
init(java.util.Properties parameters)
Initializes token verifier instance. 
 | 
private boolean | 
isTrue(java.lang.String value)
Determines whether the given value means boolean  
true value. | 
JWTClaimsSet | 
parse(java.lang.String token)
Parse secured form of JWT token to JWTClaimsSet instance. 
 | 
OK.init in interface TokenCreatorparameters - Parameters for the token verifier instance.TokenCreator.init(java.util.Properties)value - Value used as input data for hash function.create in interface TokenCreatorclaimsSet - Claims set to be used for token creation.cz.ues.platform.security.uutoken.internal.TokenCreator#create(com.nimbusds.jwt.JWTClaimsSet)parse in interface TokenCreatortoken - Value to be parsed.TokenCreator.parse(java.lang.String)token - Token to be checked.true value.value - Tested value.true if the value is "true"; otherwise false.ues-client.properties file which contains configuration
 used for calling a web service.ues-client.properties file. The path contains 
 ${ues.home} expression.